Merge branch 'master' into HEAD

pull/14124/head
Vijay Pai 7 years ago
commit d2a575a458
  1. 2
      .github/CODEOWNERS
  2. 4
      .gitignore
  3. 13
      BUILD
  4. 90
      CMakeLists.txt
  5. 2794
      Makefile
  6. 9
      Rakefile
  7. 2
      bazel/grpc_build_system.bzl
  8. 29
      build.yaml
  9. 4
      cmake/OWNERS
  10. 209
      config.m4
  11. 209
      config.w32
  12. 156
      doc/command_line_tool.md
  13. 1
      doc/environment_variables.md
  14. 409
      examples/cpp/helloworld/cocoapods/HelloWorldCpp.xcodeproj/project.pbxproj
  15. 23
      examples/cpp/helloworld/cocoapods/HelloWorldCpp/AppDelegate.h
  16. 22
      examples/cpp/helloworld/cocoapods/HelloWorldCpp/AppDelegate.mm
  17. 93
      examples/cpp/helloworld/cocoapods/HelloWorldCpp/Assets.xcassets/AppIcon.appiconset/Contents.json
  18. 25
      examples/cpp/helloworld/cocoapods/HelloWorldCpp/Base.lproj/LaunchScreen.storyboard
  19. 24
      examples/cpp/helloworld/cocoapods/HelloWorldCpp/Base.lproj/Main.storyboard
  20. 45
      examples/cpp/helloworld/cocoapods/HelloWorldCpp/Info.plist
  21. 23
      examples/cpp/helloworld/cocoapods/HelloWorldCpp/ViewController.h
  22. 101
      examples/cpp/helloworld/cocoapods/HelloWorldCpp/ViewController.mm
  23. 26
      examples/cpp/helloworld/cocoapods/HelloWorldCpp/main.m
  24. 8
      examples/cpp/helloworld/cocoapods/Podfile
  25. 685
      gRPC-C++.podspec
  26. 13
      gRPC-Core.podspec
  27. 7
      grpc.def
  28. 222
      grpc.gemspec
  29. 386
      grpc.gyp
  30. 21
      include/grpc++/impl/codegen/call.h
  31. 35
      include/grpc/compression.h
  32. 48
      include/grpc/compression_ruby.h
  33. 70
      include/grpc/impl/codegen/compression_types.h
  34. 4
      include/grpc/impl/codegen/grpc_types.h
  35. 1
      include/grpc/module.modulemap
  36. 5
      include/grpc/support/alloc.h
  37. 222
      package.xml
  38. 3
      setup.py
  39. 2887
      src/boringssl/crypto_test_data.cc
  40. 1046
      src/boringssl/err_data.c
  41. 15
      src/boringssl/gen_build_yaml.py
  42. 10
      src/core/ext/filters/client_channel/client_channel.cc
  43. 2
      src/core/ext/filters/client_channel/http_proxy.cc
  44. 67
      src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc
  45. 865
      src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
  46. 5
      src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
  47. 2
      src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
  48. 5
      src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
  49. 6
      src/core/ext/filters/client_channel/subchannel.cc
  50. 3
      src/core/ext/filters/http/client/http_client_filter.cc
  51. 145
      src/core/ext/filters/http/message_compress/message_compress_filter.cc
  52. 3
      src/core/ext/filters/http/server/http_server_filter.cc
  53. 4
      src/core/ext/filters/load_reporting/server_load_reporting_filter.cc
  54. 55
      src/core/ext/transport/chttp2/transport/chttp2_transport.cc
  55. 6
      src/core/ext/transport/chttp2/transport/hpack_parser.cc
  56. 14
      src/core/ext/transport/chttp2/transport/parsing.cc
  57. 7
      src/core/ext/transport/chttp2/transport/writing.cc
  58. 98
      src/core/lib/channel/channel_args.cc
  59. 31
      src/core/lib/channel/channel_args.h
  60. 19
      src/core/lib/compression/algorithm_metadata.h
  61. 280
      src/core/lib/compression/compression.cc
  62. 273
      src/core/lib/compression/compression_internal.cc
  63. 86
      src/core/lib/compression/compression_internal.h
  64. 66
      src/core/lib/compression/compression_ruby.cc
  65. 22
      src/core/lib/compression/message_compress.cc
  66. 7
      src/core/lib/compression/message_compress.h
  67. 16
      src/core/lib/gpr/alloc.cc
  68. 31
      src/core/lib/gpr/arena.cc
  69. 16
      src/core/lib/gpr/fork.cc
  70. 12
      src/core/lib/gpr/sync_posix.cc
  71. 58
      src/core/lib/gprpp/inlined_vector.h
  72. 6
      src/core/lib/iomgr/call_combiner.cc
  73. 6
      src/core/lib/iomgr/closure.h
  74. 22
      src/core/lib/iomgr/combiner.cc
  75. 25
      src/core/lib/iomgr/error.cc
  76. 67
      src/core/lib/iomgr/ev_epoll1_linux.cc
  77. 37
      src/core/lib/iomgr/ev_epollex_linux.cc
  78. 21
      src/core/lib/iomgr/ev_epollsig_linux.cc
  79. 13
      src/core/lib/iomgr/ev_poll_posix.cc
  80. 45
      src/core/lib/iomgr/ev_posix.cc
  81. 3
      src/core/lib/iomgr/exec_ctx.cc
  82. 17
      src/core/lib/iomgr/tcp_posix.cc
  83. 3
      src/core/lib/iomgr/wakeup_fd_eventfd.cc
  84. 23
      src/core/lib/profiling/timers.h
  85. 4
      src/core/lib/security/transport/client_auth_filter.cc
  86. 4
      src/core/lib/security/transport/secure_endpoint.cc
  87. 13
      src/core/lib/slice/slice_intern.cc
  88. 45
      src/core/lib/slice/slice_string_helpers.cc
  89. 6
      src/core/lib/slice/slice_string_helpers.h
  90. 9
      src/core/lib/surface/byte_buffer_reader.cc
  91. 343
      src/core/lib/surface/call.cc
  92. 14
      src/core/lib/surface/call_test_only.h
  93. 35
      src/core/lib/surface/channel.cc
  94. 37
      src/core/lib/surface/completion_queue.cc
  95. 2
      src/core/lib/surface/init.cc
  96. 16
      src/core/lib/transport/metadata.cc
  97. 454
      src/core/lib/transport/static_metadata.cc
  98. 150
      src/core/lib/transport/static_metadata.h
  99. 8
      src/core/plugin_registry/grpc_cronet_plugin_registry.cc
  100. 8
      src/core/plugin_registry/grpc_plugin_registry.cc
  101. Some files were not shown because too many files have changed in this diff Show More

@ -3,5 +3,7 @@
# 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/dockerfile/** @jtattermusch @matt-kwong @nicolasnoble
/tools/run_tests/performance/** @ncteisen @matt-kwong @ctiller

4
.gitignore vendored

@ -94,9 +94,9 @@ DerivedData
*.pbrpc.*
# Cocoapods artifacts
# Podfile.lock and the workspace file are tracked, to ease deleting them. That's
# needed to trigger "pod install" to rerun the preinstall commands.
Pods/
Podfile.lock
*.xcworkspace
# Artifacts directory
/artifacts/

13
BUILD

@ -93,6 +93,7 @@ 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",
@ -264,6 +265,11 @@ grpc_cc_library(
],
)
grpc_cc_library(
name = "grpc++_public_hdrs",
hdrs = GRPCXX_PUBLIC_HDRS,
)
grpc_cc_library(
name = "grpc++",
srcs = [
@ -629,6 +635,8 @@ grpc_cc_library(
"src/core/lib/channel/handshaker_factory.cc",
"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",
@ -764,6 +772,7 @@ grpc_cc_library(
"src/core/lib/channel/handshaker_factory.h",
"src/core/lib/channel/handshaker_registry.h",
"src/core/lib/compression/algorithm_metadata.h",
"src/core/lib/compression/compression_internal.h",
"src/core/lib/compression/message_compress.h",
"src/core/lib/compression/stream_compression.h",
"src/core/lib/compression/stream_compression_gzip.h",
@ -1524,14 +1533,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",

@ -392,6 +392,7 @@ add_dependencies(buildtests_c connection_prefix_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)
@ -590,6 +591,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_dependencies(buildtests_cxx server_crash_test)
endif()
add_dependencies(buildtests_cxx server_crash_test_client)
add_dependencies(buildtests_cxx server_early_return_test)
add_dependencies(buildtests_cxx server_request_call_test)
add_dependencies(buildtests_cxx shutdown_test)
add_dependencies(buildtests_cxx stats_test)
@ -801,6 +803,8 @@ add_library(grpc
src/core/lib/channel/handshaker_factory.cc
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
@ -978,8 +982,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
@ -1102,6 +1106,7 @@ 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
@ -1141,6 +1146,8 @@ add_library(grpc_cronet
src/core/lib/channel/handshaker_factory.cc
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
@ -1343,8 +1350,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
@ -1464,6 +1471,8 @@ add_library(grpc_test_util
src/core/lib/channel/handshaker_factory.cc
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
@ -1731,6 +1740,8 @@ add_library(grpc_test_util_unsecure
src/core/lib/channel/handshaker_factory.cc
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
@ -1981,6 +1992,8 @@ add_library(grpc_unsecure
src/core/lib/channel/handshaker_factory.cc
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
@ -2248,6 +2261,7 @@ 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
@ -2521,6 +2535,7 @@ 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
@ -2710,6 +2725,8 @@ add_library(grpc++_cronet
src/core/lib/channel/handshaker_factory.cc
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
@ -2993,6 +3010,7 @@ 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
@ -3722,6 +3740,7 @@ 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
@ -11702,6 +11721,44 @@ target_link_libraries(server_crash_test_client
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
add_executable(server_early_return_test
test/cpp/end2end/server_early_return_test.cc
third_party/googletest/googletest/src/gtest-all.cc
third_party/googletest/googlemock/src/gmock-all.cc
)
target_include_directories(server_early_return_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}
PRIVATE third_party/googletest/googletest/include
PRIVATE third_party/googletest/googletest
PRIVATE third_party/googletest/googlemock/include
PRIVATE third_party/googletest/googlemock
PRIVATE ${_gRPC_PROTO_GENS_DIR}
)
target_link_libraries(server_early_return_test
${_gRPC_PROTOBUF_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
grpc++_test_util
grpc_test_util
grpc++
grpc
gpr_test_util
gpr
${_gRPC_GFLAGS_LIBRARIES}
)
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
add_executable(server_request_call_test
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo_messages.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo_messages.grpc.pb.cc
@ -12390,6 +12447,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
)

2794
Makefile

File diff suppressed because it is too large Load Diff

@ -99,7 +99,7 @@ task 'dlls' do
env_comp = "CC=#{opt[:cross]}-gcc "
env_comp += "CXX=#{opt[:cross]}-g++ "
env_comp += "LD=#{opt[:cross]}-gcc "
docker_for_windows "gem update --system && #{env} #{env_comp} make -j #{out} && #{opt[:cross]}-strip -x -S #{out} && cp #{out} #{opt[:out]}"
docker_for_windows "gem update --system --no-ri --no-doc && #{env} #{env_comp} make -j #{out} && #{opt[:cross]}-strip -x -S #{out} && cp #{out} #{opt[:out]}"
end
end
@ -113,10 +113,15 @@ task 'gem:native' do
if RUBY_PLATFORM =~ /darwin/
FileUtils.touch 'grpc_c.32.ruby'
FileUtils.touch 'grpc_c.64.ruby'
unless '2.5' == /(\d+\.\d+)/.match(RUBY_VERSION).to_s
fail "rake gem:native (the rake task to build the binary packages) is being " \
"invoked on macos with ruby #{RUBY_VERSION}. The ruby macos artifact " \
"build should be running on ruby 2.5."
end
system "rake cross native gem RUBY_CC_VERSION=2.5.0:2.4.0:2.3.0:2.2.2:2.1.6:2.0.0 V=#{verbose} GRPC_CONFIG=#{grpc_config}"
else
Rake::Task['dlls'].execute
docker_for_windows "gem update --system && bundle && rake cross native gem RUBY_CC_VERSION=2.5.0:2.4.0:2.3.0:2.2.2:2.1.6:2.0.0 V=#{verbose} GRPC_CONFIG=#{grpc_config}"
docker_for_windows "gem update --system --no-ri --no-doc && bundle && rake cross native gem RUBY_CC_VERSION=2.5.0:2.4.0:2.3.0:2.2.2:2.1.6:2.0.0 V=#{verbose} GRPC_CONFIG=#{grpc_config}"
end
end

@ -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)

@ -159,6 +159,8 @@ filegroups:
- src/core/lib/channel/handshaker_factory.cc
- 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
@ -295,6 +297,7 @@ 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
@ -315,6 +318,7 @@ filegroups:
- src/core/lib/channel/handshaker_factory.h
- src/core/lib/channel/handshaker_registry.h
- src/core/lib/compression/algorithm_metadata.h
- src/core/lib/compression/compression_internal.h
- src/core/lib/compression/message_compress.h
- src/core/lib/compression/stream_compression.h
- src/core/lib/compression/stream_compression_gzip.h
@ -931,19 +935,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
@ -4704,6 +4708,19 @@ targets:
- grpc
- gpr_test_util
- gpr
- name: server_early_return_test
gtest: true
build: test
language: c++
src:
- test/cpp/end2end/server_early_return_test.cc
deps:
- grpc++_test_util
- grpc_test_util
- grpc++
- grpc
- gpr_test_util
- gpr
- name: server_request_call_test
gtest: true
build: test
@ -5042,9 +5059,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
@ -5052,7 +5071,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

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

@ -93,6 +93,8 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/channel/handshaker_factory.cc \
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 \
@ -270,8 +272,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 \
@ -335,9 +337,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 \
@ -361,7 +360,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 \
@ -369,8 +367,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 \
@ -382,44 +378,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 \
@ -431,29 +408,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 \
@ -463,24 +427,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 \
@ -491,30 +451,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 \
@ -529,7 +483,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 \
@ -555,7 +508,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 \
@ -603,41 +555,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)
@ -701,44 +654,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)

@ -70,6 +70,8 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\channel\\handshaker_factory.cc " +
"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 " +
@ -247,8 +249,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 " +
@ -312,9 +314,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 " +
@ -338,7 +337,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 " +
@ -346,8 +344,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 " +
@ -359,44 +355,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 " +
@ -408,29 +385,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 " +
@ -440,24 +404,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 " +
@ -468,30 +428,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 " +
@ -506,7 +460,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 " +
@ -532,7 +485,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 " +
@ -580,41 +532,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 " +
@ -719,44 +672,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.

@ -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

@ -0,0 +1,409 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 48;
objects = {
/* Begin PBXBuildFile section */
3DC71E95B8670DC619CF8693 /* libPods-HelloWorldCpp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E3077D82811A6434769B437 /* libPods-HelloWorldCpp.a */; };
5E9D65611FFD689B00C955D4 /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5E9D65601FFD689B00C955D4 /* AppDelegate.mm */; };
5E9D65641FFD689B00C955D4 /* ViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5E9D65631FFD689B00C955D4 /* ViewController.mm */; };
5E9D65671FFD689B00C955D4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5E9D65651FFD689B00C955D4 /* Main.storyboard */; };
5E9D65691FFD689B00C955D4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5E9D65681FFD689B00C955D4 /* Assets.xcassets */; };
5E9D656C1FFD689B00C955D4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5E9D656A1FFD689B00C955D4 /* LaunchScreen.storyboard */; };
5E9D656F1FFD689C00C955D4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E9D656E1FFD689C00C955D4 /* main.m */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
0A6137606FDBA874FCF64753 /* Pods-HelloWorldCpp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorldCpp.release.xcconfig"; path = "Pods/Target Support Files/Pods-HelloWorldCpp/Pods-HelloWorldCpp.release.xcconfig"; sourceTree = "<group>"; };
5E9D655C1FFD689B00C955D4 /* HelloWorldCpp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloWorldCpp.app; sourceTree = BUILT_PRODUCTS_DIR; };
5E9D655F1FFD689B00C955D4 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
5E9D65601FFD689B00C955D4 /* AppDelegate.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AppDelegate.mm; sourceTree = "<group>"; };
5E9D65621FFD689B00C955D4 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
5E9D65631FFD689B00C955D4 /* ViewController.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = ViewController.mm; sourceTree = "<group>"; };
5E9D65661FFD689B00C955D4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
5E9D65681FFD689B00C955D4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
5E9D656B1FFD689B00C955D4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
5E9D656D1FFD689C00C955D4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5E9D656E1FFD689C00C955D4 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
8E3077D82811A6434769B437 /* libPods-HelloWorldCpp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HelloWorldCpp.a"; sourceTree = BUILT_PRODUCTS_DIR; };
AF0FF6EB66DA2C30CFC575EA /* Pods-HelloWorldCpp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorldCpp.debug.xcconfig"; path = "Pods/Target Support Files/Pods-HelloWorldCpp/Pods-HelloWorldCpp.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
5E9D65591FFD689B00C955D4 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
3DC71E95B8670DC619CF8693 /* libPods-HelloWorldCpp.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
08FBFA5AB49E037A86EA64D7 /* Frameworks */ = {
isa = PBXGroup;
children = (
8E3077D82811A6434769B437 /* libPods-HelloWorldCpp.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
5E9D65531FFD689B00C955D4 = {
isa = PBXGroup;
children = (
5E9D655E1FFD689B00C955D4 /* HelloWorldCpp */,
5E9D655D1FFD689B00C955D4 /* Products */,
E40B264856595518D408CF3E /* Pods */,
08FBFA5AB49E037A86EA64D7 /* Frameworks */,
);
sourceTree = "<group>";
};
5E9D655D1FFD689B00C955D4 /* Products */ = {
isa = PBXGroup;
children = (
5E9D655C1FFD689B00C955D4 /* HelloWorldCpp.app */,
);
name = Products;
sourceTree = "<group>";
};
5E9D655E1FFD689B00C955D4 /* HelloWorldCpp */ = {
isa = PBXGroup;
children = (
5E9D655F1FFD689B00C955D4 /* AppDelegate.h */,
5E9D65601FFD689B00C955D4 /* AppDelegate.mm */,
5E9D65621FFD689B00C955D4 /* ViewController.h */,
5E9D65631FFD689B00C955D4 /* ViewController.mm */,
5E9D65651FFD689B00C955D4 /* Main.storyboard */,
5E9D65681FFD689B00C955D4 /* Assets.xcassets */,
5E9D656A1FFD689B00C955D4 /* LaunchScreen.storyboard */,
5E9D656D1FFD689C00C955D4 /* Info.plist */,
5E9D656E1FFD689C00C955D4 /* main.m */,
);
path = HelloWorldCpp;
sourceTree = "<group>";
};
E40B264856595518D408CF3E /* Pods */ = {
isa = PBXGroup;
children = (
AF0FF6EB66DA2C30CFC575EA /* Pods-HelloWorldCpp.debug.xcconfig */,
0A6137606FDBA874FCF64753 /* Pods-HelloWorldCpp.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
5E9D655B1FFD689B00C955D4 /* HelloWorldCpp */ = {
isa = PBXNativeTarget;
buildConfigurationList = 5E9D65721FFD689C00C955D4 /* Build configuration list for PBXNativeTarget "HelloWorldCpp" */;
buildPhases = (
4D66D60BD88AA4D5813859A9 /* [CP] Check Pods Manifest.lock */,
5E9D65581FFD689B00C955D4 /* Sources */,
5E9D65591FFD689B00C955D4 /* Frameworks */,
5E9D655A1FFD689B00C955D4 /* Resources */,
CA89B315EACC5A6F8816FD26 /* [CP] Embed Pods Frameworks */,
6C4D930C765719D03893663B /* [CP] Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
);
name = HelloWorldCpp;
productName = HelloWorldCpp;
productReference = 5E9D655C1FFD689B00C955D4 /* HelloWorldCpp.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
5E9D65541FFD689B00C955D4 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0920;
ORGANIZATIONNAME = gRPC;
TargetAttributes = {
5E9D655B1FFD689B00C955D4 = {
CreatedOnToolsVersion = 9.2;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = 5E9D65571FFD689B00C955D4 /* Build configuration list for PBXProject "HelloWorldCpp" */;
compatibilityVersion = "Xcode 8.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 5E9D65531FFD689B00C955D4;
productRefGroup = 5E9D655D1FFD689B00C955D4 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
5E9D655B1FFD689B00C955D4 /* HelloWorldCpp */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
5E9D655A1FFD689B00C955D4 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5E9D656C1FFD689B00C955D4 /* LaunchScreen.storyboard in Resources */,
5E9D65691FFD689B00C955D4 /* Assets.xcassets in Resources */,
5E9D65671FFD689B00C955D4 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
4D66D60BD88AA4D5813859A9 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-HelloWorldCpp-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
6C4D930C765719D03893663B /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-HelloWorldCpp/Pods-HelloWorldCpp-resources.sh\"\n";
showEnvVarsInLog = 0;
};
CA89B315EACC5A6F8816FD26 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-HelloWorldCpp/Pods-HelloWorldCpp-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
5E9D65581FFD689B00C955D4 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5E9D65641FFD689B00C955D4 /* ViewController.mm in Sources */,
5E9D656F1FFD689C00C955D4 /* main.m in Sources */,
5E9D65611FFD689B00C955D4 /* AppDelegate.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
5E9D65651FFD689B00C955D4 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
5E9D65661FFD689B00C955D4 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
5E9D656A1FFD689B00C955D4 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
5E9D656B1FFD689B00C955D4 /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
5E9D65701FFD689C00C955D4 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.2;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
};
5E9D65711FFD689C00C955D4 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.2;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
5E9D65731FFD689C00C955D4 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = AF0FF6EB66DA2C30CFC575EA /* Pods-HelloWorldCpp.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = EQHXZ8M8AV;
INFOPLIST_FILE = HelloWorldCpp/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.grpc.HelloWorldCpp;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
5E9D65741FFD689C00C955D4 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 0A6137606FDBA874FCF64753 /* Pods-HelloWorldCpp.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = EQHXZ8M8AV;
INFOPLIST_FILE = HelloWorldCpp/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.grpc.HelloWorldCpp;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
5E9D65571FFD689B00C955D4 /* Build configuration list for PBXProject "HelloWorldCpp" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5E9D65701FFD689C00C955D4 /* Debug */,
5E9D65711FFD689C00C955D4 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5E9D65721FFD689C00C955D4 /* Build configuration list for PBXNativeTarget "HelloWorldCpp" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5E9D65731FFD689C00C955D4 /* Debug */,
5E9D65741FFD689C00C955D4 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 5E9D65541FFD689B00C955D4 /* Project object */;
}

@ -0,0 +1,23 @@
/*
*
* Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end

@ -0,0 +1,22 @@
/*
*
* Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#import "AppDelegate.h"
@implementation AppDelegate
@end

@ -0,0 +1,93 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" systemVersion="17A277" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" systemVersion="17A277" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

@ -0,0 +1,23 @@
/*
*
* Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end

@ -0,0 +1,101 @@
/*
*
* Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#import "ViewController.h"
#import <grpc++/grpc++.h>
#include <grpc++/generic/generic_stub.h>
#include <grpc++/generic/async_generic_service.h>
static void* tag(int i) { return (void*)(intptr_t)i; }
// Serialized Proto bytes of Hello World example
const uint8_t kMessage[] =
{0x0A, 0x0B, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x2D, 0x43};
@interface ViewController ()
@end
@implementation ViewController {
grpc::CompletionQueue cq_;
std::unique_ptr<grpc::GenericStub> generic_stub_;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Setup call stub
std::shared_ptr<grpc::Channel> channel =
CreateChannel("localhost:50051", grpc::InsecureChannelCredentials());
generic_stub_.reset(new grpc::GenericStub(channel));
const grpc::string kMethodName("/helloworld.Greeter/SayHello");
void* got_tag;
bool ok;
grpc::ClientContext cli_ctx;
std::unique_ptr<grpc::GenericClientAsyncReaderWriter> call =
generic_stub_->Call(&cli_ctx, kMethodName, &cq_, tag(1));
cq_.Next(&got_tag, &ok);
if (!ok || got_tag != tag(1)) {
NSLog(@"Failed to create call.");
abort();
}
grpc::Slice send_slice = grpc::Slice(kMessage, sizeof(kMessage) / sizeof(kMessage[0]));
std::unique_ptr<grpc::ByteBuffer> send_buffer(new grpc::ByteBuffer(&send_slice, 1));
call->Write(*send_buffer, tag(2));
cq_.Next(&got_tag, &ok);
if (!ok || got_tag != tag(2)) {
NSLog(@"Failed to send message.");
abort();
}
grpc::ByteBuffer recv_buffer;
call->Read(&recv_buffer, tag(3));
cq_.Next(&got_tag, &ok);
if (!ok || got_tag != tag(3)) {
NSLog(@"Failed to receive message.");
abort();
}
grpc::Status status;
call->Finish(&status, tag(4));
cq_.Next(&got_tag, &ok);
if (!ok || got_tag != tag(4)) {
NSLog(@"Failed to finish call.");
abort();
}
if (!status.ok()) {
NSLog(@"Received unsuccessful status code: %d", status.error_code());
abort();
}
std::vector<grpc::Slice> slices;
recv_buffer.Dump(&slices);
NSString *recvBytes = [[NSString alloc] init];
for (auto slice : slices) {
auto p = slice.begin();
while (p != slice.end()) {
recvBytes =
[recvBytes stringByAppendingString:[NSString stringWithFormat:@"%02x ", *p]];
p++;
}
}
NSLog(@"Hello World succeeded.\nReceived bytes: %@\n"
"Expected bytes: 0a 11 48 65 6c 6c 6f 20 4f 62 6a 65 63 74 69 76 65 2d 43", recvBytes);
}
@end

@ -0,0 +1,26 @@
/*
*
* Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}

@ -0,0 +1,8 @@
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
install! 'cocoapods', :deterministic_uuids => false
target 'HelloWorldCpp' do
pod 'gRPC-C++'
end

@ -0,0 +1,685 @@
# This file has been automatically generated from a template file.
# Please make modifications to `templates/gRPC-C++.podspec.template`
# instead. This file can be regenerated from the template by running
# `tools/buildgen/generate_projects.sh`.
# gRPC C++ CocoaPods podspec
#
# 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.
Pod::Spec.new do |s|
s.name = 'gRPC-C++'
# TODO (mxyan): use version that match gRPC version when pod is stabilized
# version = '1.10.0-dev'
version = '0.0.1'
s.version = version
s.summary = 'gRPC C++ library'
s.homepage = 'https://grpc.io'
s.license = 'Apache License, Version 2.0'
s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' }
grpc_version = '1.10.0-dev'
s.source = {
:git => 'https://github.com/grpc/grpc.git',
:tag => "v#{grpc_version}",
}
s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.9'
s.requires_arc = false
# Add include prefix `grpc++` (i.e. `#include <grpc++/xxx.h>`).
s.header_dir = 'grpc++'
s.pod_target_xcconfig = {
'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(PODS_TARGET_SRCROOT)/include"',
'USER_HEADER_SEARCH_PATHS' => '"$(PODS_TARGET_SRCROOT)"',
'GCC_PREPROCESSOR_DEFINITIONS' => '"$(inherited)" "COCOAPODS=1" "PB_NO_PACKED_STRUCTS=1"',
'CLANG_WARN_STRICT_PROTOTYPES' => 'NO',
'CLANG_WARN_DOCUMENTATION_COMMENTS' => 'NO',
# If we don't set these two settings, `include/grpc/support/time.h` and
# `src/core/lib/support/string.h` shadow the system `<time.h>` and `<string.h>`, breaking the
# build.
'USE_HEADERMAP' => 'NO',
'ALWAYS_SEARCH_USER_PATHS' => 'NO',
}
s.libraries = 'c++'
s.default_subspecs = 'Interface', 'Implementation'
s.subspec 'Interface' do |ss|
ss.header_mappings_dir = 'include/grpc++'
ss.source_files = 'include/grpc++/alarm.h',
'include/grpc++/channel.h',
'include/grpc++/client_context.h',
'include/grpc++/completion_queue.h',
'include/grpc++/create_channel.h',
'include/grpc++/create_channel_posix.h',
'include/grpc++/ext/health_check_service_server_builder_option.h',
'include/grpc++/generic/async_generic_service.h',
'include/grpc++/generic/generic_stub.h',
'include/grpc++/grpc++.h',
'include/grpc++/health_check_service_interface.h',
'include/grpc++/impl/call.h',
'include/grpc++/impl/channel_argument_option.h',
'include/grpc++/impl/client_unary_call.h',
'include/grpc++/impl/codegen/core_codegen.h',
'include/grpc++/impl/grpc_library.h',
'include/grpc++/impl/method_handler_impl.h',
'include/grpc++/impl/rpc_method.h',
'include/grpc++/impl/rpc_service_method.h',
'include/grpc++/impl/serialization_traits.h',
'include/grpc++/impl/server_builder_option.h',
'include/grpc++/impl/server_builder_plugin.h',
'include/grpc++/impl/server_initializer.h',
'include/grpc++/impl/service_type.h',
'include/grpc++/resource_quota.h',
'include/grpc++/security/auth_context.h',
'include/grpc++/security/auth_metadata_processor.h',
'include/grpc++/security/credentials.h',
'include/grpc++/security/server_credentials.h',
'include/grpc++/server.h',
'include/grpc++/server_builder.h',
'include/grpc++/server_context.h',
'include/grpc++/server_posix.h',
'include/grpc++/support/async_stream.h',
'include/grpc++/support/async_unary_call.h',
'include/grpc++/support/byte_buffer.h',
'include/grpc++/support/channel_arguments.h',
'include/grpc++/support/config.h',
'include/grpc++/support/slice.h',
'include/grpc++/support/status.h',
'include/grpc++/support/status_code_enum.h',
'include/grpc++/support/string_ref.h',
'include/grpc++/support/stub_options.h',
'include/grpc++/support/sync_stream.h',
'include/grpc++/support/time.h',
'include/grpc++/impl/codegen/async_stream.h',
'include/grpc++/impl/codegen/async_unary_call.h',
'include/grpc++/impl/codegen/byte_buffer.h',
'include/grpc++/impl/codegen/call.h',
'include/grpc++/impl/codegen/call_hook.h',
'include/grpc++/impl/codegen/channel_interface.h',
'include/grpc++/impl/codegen/client_context.h',
'include/grpc++/impl/codegen/client_unary_call.h',
'include/grpc++/impl/codegen/completion_queue.h',
'include/grpc++/impl/codegen/completion_queue_tag.h',
'include/grpc++/impl/codegen/config.h',
'include/grpc++/impl/codegen/core_codegen_interface.h',
'include/grpc++/impl/codegen/create_auth_context.h',
'include/grpc++/impl/codegen/grpc_library.h',
'include/grpc++/impl/codegen/metadata_map.h',
'include/grpc++/impl/codegen/method_handler_impl.h',
'include/grpc++/impl/codegen/rpc_method.h',
'include/grpc++/impl/codegen/rpc_service_method.h',
'include/grpc++/impl/codegen/security/auth_context.h',
'include/grpc++/impl/codegen/serialization_traits.h',
'include/grpc++/impl/codegen/server_context.h',
'include/grpc++/impl/codegen/server_interface.h',
'include/grpc++/impl/codegen/service_type.h',
'include/grpc++/impl/codegen/slice.h',
'include/grpc++/impl/codegen/status.h',
'include/grpc++/impl/codegen/status_code_enum.h',
'include/grpc++/impl/codegen/string_ref.h',
'include/grpc++/impl/codegen/stub_options.h',
'include/grpc++/impl/codegen/sync_stream.h',
'include/grpc++/impl/codegen/time.h'
end
s.subspec 'Implementation' do |ss|
ss.header_mappings_dir = '.'
ss.dependency "#{s.name}/Interface", version
ss.dependency 'gRPC-Core', grpc_version
ss.dependency 'nanopb', '~> 0.3'
ss.source_files = 'include/grpc++/impl/codegen/core_codegen.h',
'src/cpp/client/secure_credentials.h',
'src/cpp/common/secure_auth_context.h',
'src/cpp/server/secure_server_credentials.h',
'src/cpp/client/create_channel_internal.h',
'src/cpp/common/channel_filter.h',
'src/cpp/server/dynamic_thread_pool.h',
'src/cpp/server/health/default_health_check_service.h',
'src/cpp/server/health/health.pb.h',
'src/cpp/server/thread_pool_interface.h',
'src/cpp/thread_manager/thread_manager.h',
'src/cpp/client/insecure_credentials.cc',
'src/cpp/client/secure_credentials.cc',
'src/cpp/common/auth_property_iterator.cc',
'src/cpp/common/secure_auth_context.cc',
'src/cpp/common/secure_channel_arguments.cc',
'src/cpp/common/secure_create_auth_context.cc',
'src/cpp/server/insecure_server_credentials.cc',
'src/cpp/server/secure_server_credentials.cc',
'src/cpp/client/channel_cc.cc',
'src/cpp/client/client_context.cc',
'src/cpp/client/create_channel.cc',
'src/cpp/client/create_channel_internal.cc',
'src/cpp/client/create_channel_posix.cc',
'src/cpp/client/credentials_cc.cc',
'src/cpp/client/generic_stub.cc',
'src/cpp/common/channel_arguments.cc',
'src/cpp/common/channel_filter.cc',
'src/cpp/common/completion_queue_cc.cc',
'src/cpp/common/core_codegen.cc',
'src/cpp/common/resource_quota_cc.cc',
'src/cpp/common/rpc_method.cc',
'src/cpp/common/version_cc.cc',
'src/cpp/server/async_generic_service.cc',
'src/cpp/server/channel_argument_option.cc',
'src/cpp/server/create_default_thread_pool.cc',
'src/cpp/server/dynamic_thread_pool.cc',
'src/cpp/server/health/default_health_check_service.cc',
'src/cpp/server/health/health.pb.c',
'src/cpp/server/health/health_check_service.cc',
'src/cpp/server/health/health_check_service_server_builder_option.cc',
'src/cpp/server/server_builder.cc',
'src/cpp/server/server_cc.cc',
'src/cpp/server/server_context.cc',
'src/cpp/server/server_credentials.cc',
'src/cpp/server/server_posix.cc',
'src/cpp/thread_manager/thread_manager.cc',
'src/cpp/util/byte_buffer_cc.cc',
'src/cpp/util/slice_cc.cc',
'src/cpp/util/status.cc',
'src/cpp/util/string_ref.cc',
'src/cpp/util/time_cc.cc',
'src/cpp/codegen/codegen_init.cc',
'src/core/lib/gpr/arena.h',
'src/core/lib/gpr/env.h',
'src/core/lib/gpr/fork.h',
'src/core/lib/gpr/mpscq.h',
'src/core/lib/gpr/murmur_hash.h',
'src/core/lib/gpr/spinlock.h',
'src/core/lib/gpr/string.h',
'src/core/lib/gpr/string_windows.h',
'src/core/lib/gpr/thd_internal.h',
'src/core/lib/gpr/time_precise.h',
'src/core/lib/gpr/tmpfile.h',
'src/core/lib/gprpp/abstract.h',
'src/core/lib/gprpp/atomic.h',
'src/core/lib/gprpp/atomic_with_atm.h',
'src/core/lib/gprpp/atomic_with_std.h',
'src/core/lib/gprpp/manual_constructor.h',
'src/core/lib/gprpp/memory.h',
'src/core/lib/profiling/timers.h',
'src/core/ext/transport/chttp2/transport/bin_decoder.h',
'src/core/ext/transport/chttp2/transport/bin_encoder.h',
'src/core/ext/transport/chttp2/transport/chttp2_transport.h',
'src/core/ext/transport/chttp2/transport/flow_control.h',
'src/core/ext/transport/chttp2/transport/frame.h',
'src/core/ext/transport/chttp2/transport/frame_data.h',
'src/core/ext/transport/chttp2/transport/frame_goaway.h',
'src/core/ext/transport/chttp2/transport/frame_ping.h',
'src/core/ext/transport/chttp2/transport/frame_rst_stream.h',
'src/core/ext/transport/chttp2/transport/frame_settings.h',
'src/core/ext/transport/chttp2/transport/frame_window_update.h',
'src/core/ext/transport/chttp2/transport/hpack_encoder.h',
'src/core/ext/transport/chttp2/transport/hpack_parser.h',
'src/core/ext/transport/chttp2/transport/hpack_table.h',
'src/core/ext/transport/chttp2/transport/http2_settings.h',
'src/core/ext/transport/chttp2/transport/huffsyms.h',
'src/core/ext/transport/chttp2/transport/incoming_metadata.h',
'src/core/ext/transport/chttp2/transport/internal.h',
'src/core/ext/transport/chttp2/transport/stream_map.h',
'src/core/ext/transport/chttp2/transport/varint.h',
'src/core/ext/transport/chttp2/alpn/alpn.h',
'src/core/ext/filters/http/client/http_client_filter.h',
'src/core/ext/filters/http/message_compress/message_compress_filter.h',
'src/core/ext/filters/http/server/http_server_filter.h',
'src/core/lib/security/context/security_context.h',
'src/core/lib/security/credentials/composite/composite_credentials.h',
'src/core/lib/security/credentials/credentials.h',
'src/core/lib/security/credentials/fake/fake_credentials.h',
'src/core/lib/security/credentials/google_default/google_default_credentials.h',
'src/core/lib/security/credentials/iam/iam_credentials.h',
'src/core/lib/security/credentials/jwt/json_token.h',
'src/core/lib/security/credentials/jwt/jwt_credentials.h',
'src/core/lib/security/credentials/jwt/jwt_verifier.h',
'src/core/lib/security/credentials/oauth2/oauth2_credentials.h',
'src/core/lib/security/credentials/plugin/plugin_credentials.h',
'src/core/lib/security/credentials/ssl/ssl_credentials.h',
'src/core/lib/security/transport/auth_filters.h',
'src/core/lib/security/transport/lb_targets_info.h',
'src/core/lib/security/transport/secure_endpoint.h',
'src/core/lib/security/transport/security_connector.h',
'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/ssl_transport_security.h',
'src/core/tsi/ssl_types.h',
'src/core/tsi/transport_security_grpc.h',
'src/core/tsi/transport_security.h',
'src/core/tsi/transport_security_adapter.h',
'src/core/tsi/transport_security_interface.h',
'src/core/ext/transport/chttp2/server/chttp2_server.h',
'src/core/ext/filters/client_channel/backup_poller.h',
'src/core/ext/filters/client_channel/client_channel.h',
'src/core/ext/filters/client_channel/client_channel_factory.h',
'src/core/ext/filters/client_channel/connector.h',
'src/core/ext/filters/client_channel/http_connect_handshaker.h',
'src/core/ext/filters/client_channel/http_proxy.h',
'src/core/ext/filters/client_channel/lb_policy.h',
'src/core/ext/filters/client_channel/lb_policy_factory.h',
'src/core/ext/filters/client_channel/lb_policy_registry.h',
'src/core/ext/filters/client_channel/parse_address.h',
'src/core/ext/filters/client_channel/proxy_mapper.h',
'src/core/ext/filters/client_channel/proxy_mapper_registry.h',
'src/core/ext/filters/client_channel/resolver.h',
'src/core/ext/filters/client_channel/resolver_factory.h',
'src/core/ext/filters/client_channel/resolver_registry.h',
'src/core/ext/filters/client_channel/retry_throttle.h',
'src/core/ext/filters/client_channel/subchannel.h',
'src/core/ext/filters/client_channel/subchannel_index.h',
'src/core/ext/filters/client_channel/uri_parser.h',
'src/core/ext/filters/deadline/deadline_filter.h',
'src/core/ext/transport/chttp2/client/chttp2_connector.h',
'src/core/ext/transport/inproc/inproc_transport.h',
'src/core/lib/backoff/backoff.h',
'src/core/lib/channel/channel_args.h',
'src/core/lib/channel/channel_stack.h',
'src/core/lib/channel/channel_stack_builder.h',
'src/core/lib/channel/connected_channel.h',
'src/core/lib/channel/context.h',
'src/core/lib/channel/handshaker.h',
'src/core/lib/channel/handshaker_factory.h',
'src/core/lib/channel/handshaker_registry.h',
'src/core/lib/compression/algorithm_metadata.h',
'src/core/lib/compression/compression_internal.h',
'src/core/lib/compression/message_compress.h',
'src/core/lib/compression/stream_compression.h',
'src/core/lib/compression/stream_compression_gzip.h',
'src/core/lib/compression/stream_compression_identity.h',
'src/core/lib/debug/stats.h',
'src/core/lib/debug/stats_data.h',
'src/core/lib/gprpp/debug_location.h',
'src/core/lib/gprpp/inlined_vector.h',
'src/core/lib/gprpp/orphanable.h',
'src/core/lib/gprpp/ref_counted.h',
'src/core/lib/gprpp/ref_counted_ptr.h',
'src/core/lib/http/format_request.h',
'src/core/lib/http/httpcli.h',
'src/core/lib/http/parser.h',
'src/core/lib/iomgr/block_annotate.h',
'src/core/lib/iomgr/call_combiner.h',
'src/core/lib/iomgr/closure.h',
'src/core/lib/iomgr/combiner.h',
'src/core/lib/iomgr/endpoint.h',
'src/core/lib/iomgr/endpoint_pair.h',
'src/core/lib/iomgr/error.h',
'src/core/lib/iomgr/error_internal.h',
'src/core/lib/iomgr/ev_epoll1_linux.h',
'src/core/lib/iomgr/ev_epollex_linux.h',
'src/core/lib/iomgr/ev_epollsig_linux.h',
'src/core/lib/iomgr/ev_poll_posix.h',
'src/core/lib/iomgr/ev_posix.h',
'src/core/lib/iomgr/exec_ctx.h',
'src/core/lib/iomgr/executor.h',
'src/core/lib/iomgr/gethostname.h',
'src/core/lib/iomgr/iocp_windows.h',
'src/core/lib/iomgr/iomgr.h',
'src/core/lib/iomgr/iomgr_internal.h',
'src/core/lib/iomgr/iomgr_posix.h',
'src/core/lib/iomgr/iomgr_uv.h',
'src/core/lib/iomgr/is_epollexclusive_available.h',
'src/core/lib/iomgr/load_file.h',
'src/core/lib/iomgr/lockfree_event.h',
'src/core/lib/iomgr/nameser.h',
'src/core/lib/iomgr/network_status_tracker.h',
'src/core/lib/iomgr/polling_entity.h',
'src/core/lib/iomgr/pollset.h',
'src/core/lib/iomgr/pollset_set.h',
'src/core/lib/iomgr/pollset_set_windows.h',
'src/core/lib/iomgr/pollset_uv.h',
'src/core/lib/iomgr/pollset_windows.h',
'src/core/lib/iomgr/port.h',
'src/core/lib/iomgr/resolve_address.h',
'src/core/lib/iomgr/resource_quota.h',
'src/core/lib/iomgr/sockaddr.h',
'src/core/lib/iomgr/sockaddr_posix.h',
'src/core/lib/iomgr/sockaddr_utils.h',
'src/core/lib/iomgr/sockaddr_windows.h',
'src/core/lib/iomgr/socket_factory_posix.h',
'src/core/lib/iomgr/socket_mutator.h',
'src/core/lib/iomgr/socket_utils.h',
'src/core/lib/iomgr/socket_utils_posix.h',
'src/core/lib/iomgr/socket_windows.h',
'src/core/lib/iomgr/sys_epoll_wrapper.h',
'src/core/lib/iomgr/tcp_client.h',
'src/core/lib/iomgr/tcp_client_posix.h',
'src/core/lib/iomgr/tcp_posix.h',
'src/core/lib/iomgr/tcp_server.h',
'src/core/lib/iomgr/tcp_server_utils_posix.h',
'src/core/lib/iomgr/tcp_uv.h',
'src/core/lib/iomgr/tcp_windows.h',
'src/core/lib/iomgr/time_averaged_stats.h',
'src/core/lib/iomgr/timer.h',
'src/core/lib/iomgr/timer_generic.h',
'src/core/lib/iomgr/timer_heap.h',
'src/core/lib/iomgr/timer_manager.h',
'src/core/lib/iomgr/timer_uv.h',
'src/core/lib/iomgr/udp_server.h',
'src/core/lib/iomgr/unix_sockets_posix.h',
'src/core/lib/iomgr/wakeup_fd_cv.h',
'src/core/lib/iomgr/wakeup_fd_pipe.h',
'src/core/lib/iomgr/wakeup_fd_posix.h',
'src/core/lib/json/json.h',
'src/core/lib/json/json_common.h',
'src/core/lib/json/json_reader.h',
'src/core/lib/json/json_writer.h',
'src/core/lib/slice/b64.h',
'src/core/lib/slice/percent_encoding.h',
'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',
'src/core/lib/surface/channel.h',
'src/core/lib/surface/channel_init.h',
'src/core/lib/surface/channel_stack_type.h',
'src/core/lib/surface/completion_queue.h',
'src/core/lib/surface/completion_queue_factory.h',
'src/core/lib/surface/event_string.h',
'src/core/lib/surface/init.h',
'src/core/lib/surface/lame_client.h',
'src/core/lib/surface/server.h',
'src/core/lib/surface/validate_metadata.h',
'src/core/lib/transport/bdp_estimator.h',
'src/core/lib/transport/byte_stream.h',
'src/core/lib/transport/connectivity_state.h',
'src/core/lib/transport/error_utils.h',
'src/core/lib/transport/http2_errors.h',
'src/core/lib/transport/metadata.h',
'src/core/lib/transport/metadata_batch.h',
'src/core/lib/transport/pid_controller.h',
'src/core/lib/transport/service_config.h',
'src/core/lib/transport/static_metadata.h',
'src/core/lib/transport/status_conversion.h',
'src/core/lib/transport/timeout_encoding.h',
'src/core/lib/transport/transport.h',
'src/core/lib/transport/transport_impl.h',
'src/core/lib/debug/trace.h',
'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h',
'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h',
'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h',
'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h',
'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h',
'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h',
'src/core/ext/filters/client_channel/lb_policy/subchannel_list.h',
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h',
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h',
'src/core/ext/filters/load_reporting/server_load_reporting_filter.h',
'src/core/ext/filters/load_reporting/server_load_reporting_plugin.h',
'src/core/ext/filters/max_age/max_age_filter.h',
'src/core/ext/filters/message_size/message_size_filter.h',
'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h',
'src/core/ext/filters/workarounds/workaround_utils.h'
ss.private_header_files = 'include/grpc++/impl/codegen/core_codegen.h',
'src/cpp/client/secure_credentials.h',
'src/cpp/common/secure_auth_context.h',
'src/cpp/server/secure_server_credentials.h',
'src/cpp/client/create_channel_internal.h',
'src/cpp/common/channel_filter.h',
'src/cpp/server/dynamic_thread_pool.h',
'src/cpp/server/health/default_health_check_service.h',
'src/cpp/server/health/health.pb.h',
'src/cpp/server/thread_pool_interface.h',
'src/cpp/thread_manager/thread_manager.h',
'src/core/lib/gpr/arena.h',
'src/core/lib/gpr/env.h',
'src/core/lib/gpr/fork.h',
'src/core/lib/gpr/mpscq.h',
'src/core/lib/gpr/murmur_hash.h',
'src/core/lib/gpr/spinlock.h',
'src/core/lib/gpr/string.h',
'src/core/lib/gpr/string_windows.h',
'src/core/lib/gpr/thd_internal.h',
'src/core/lib/gpr/time_precise.h',
'src/core/lib/gpr/tmpfile.h',
'src/core/lib/gprpp/abstract.h',
'src/core/lib/gprpp/atomic.h',
'src/core/lib/gprpp/atomic_with_atm.h',
'src/core/lib/gprpp/atomic_with_std.h',
'src/core/lib/gprpp/manual_constructor.h',
'src/core/lib/gprpp/memory.h',
'src/core/lib/profiling/timers.h',
'src/core/lib/backoff/backoff.h',
'src/core/lib/channel/channel_args.h',
'src/core/lib/channel/channel_stack.h',
'src/core/lib/channel/channel_stack_builder.h',
'src/core/lib/channel/connected_channel.h',
'src/core/lib/channel/context.h',
'src/core/lib/channel/handshaker.h',
'src/core/lib/channel/handshaker_factory.h',
'src/core/lib/channel/handshaker_registry.h',
'src/core/lib/compression/algorithm_metadata.h',
'src/core/lib/compression/compression_internal.h',
'src/core/lib/compression/message_compress.h',
'src/core/lib/compression/stream_compression.h',
'src/core/lib/compression/stream_compression_gzip.h',
'src/core/lib/compression/stream_compression_identity.h',
'src/core/lib/debug/stats.h',
'src/core/lib/debug/stats_data.h',
'src/core/lib/gprpp/debug_location.h',
'src/core/lib/gprpp/inlined_vector.h',
'src/core/lib/gprpp/orphanable.h',
'src/core/lib/gprpp/ref_counted.h',
'src/core/lib/gprpp/ref_counted_ptr.h',
'src/core/lib/http/format_request.h',
'src/core/lib/http/httpcli.h',
'src/core/lib/http/parser.h',
'src/core/lib/iomgr/block_annotate.h',
'src/core/lib/iomgr/call_combiner.h',
'src/core/lib/iomgr/closure.h',
'src/core/lib/iomgr/combiner.h',
'src/core/lib/iomgr/endpoint.h',
'src/core/lib/iomgr/endpoint_pair.h',
'src/core/lib/iomgr/error.h',
'src/core/lib/iomgr/error_internal.h',
'src/core/lib/iomgr/ev_epoll1_linux.h',
'src/core/lib/iomgr/ev_epollex_linux.h',
'src/core/lib/iomgr/ev_epollsig_linux.h',
'src/core/lib/iomgr/ev_poll_posix.h',
'src/core/lib/iomgr/ev_posix.h',
'src/core/lib/iomgr/exec_ctx.h',
'src/core/lib/iomgr/executor.h',
'src/core/lib/iomgr/gethostname.h',
'src/core/lib/iomgr/iocp_windows.h',
'src/core/lib/iomgr/iomgr.h',
'src/core/lib/iomgr/iomgr_internal.h',
'src/core/lib/iomgr/iomgr_posix.h',
'src/core/lib/iomgr/iomgr_uv.h',
'src/core/lib/iomgr/is_epollexclusive_available.h',
'src/core/lib/iomgr/load_file.h',
'src/core/lib/iomgr/lockfree_event.h',
'src/core/lib/iomgr/nameser.h',
'src/core/lib/iomgr/network_status_tracker.h',
'src/core/lib/iomgr/polling_entity.h',
'src/core/lib/iomgr/pollset.h',
'src/core/lib/iomgr/pollset_set.h',
'src/core/lib/iomgr/pollset_set_windows.h',
'src/core/lib/iomgr/pollset_uv.h',
'src/core/lib/iomgr/pollset_windows.h',
'src/core/lib/iomgr/port.h',
'src/core/lib/iomgr/resolve_address.h',
'src/core/lib/iomgr/resource_quota.h',
'src/core/lib/iomgr/sockaddr.h',
'src/core/lib/iomgr/sockaddr_posix.h',
'src/core/lib/iomgr/sockaddr_utils.h',
'src/core/lib/iomgr/sockaddr_windows.h',
'src/core/lib/iomgr/socket_factory_posix.h',
'src/core/lib/iomgr/socket_mutator.h',
'src/core/lib/iomgr/socket_utils.h',
'src/core/lib/iomgr/socket_utils_posix.h',
'src/core/lib/iomgr/socket_windows.h',
'src/core/lib/iomgr/sys_epoll_wrapper.h',
'src/core/lib/iomgr/tcp_client.h',
'src/core/lib/iomgr/tcp_client_posix.h',
'src/core/lib/iomgr/tcp_posix.h',
'src/core/lib/iomgr/tcp_server.h',
'src/core/lib/iomgr/tcp_server_utils_posix.h',
'src/core/lib/iomgr/tcp_uv.h',
'src/core/lib/iomgr/tcp_windows.h',
'src/core/lib/iomgr/time_averaged_stats.h',
'src/core/lib/iomgr/timer.h',
'src/core/lib/iomgr/timer_generic.h',
'src/core/lib/iomgr/timer_heap.h',
'src/core/lib/iomgr/timer_manager.h',
'src/core/lib/iomgr/timer_uv.h',
'src/core/lib/iomgr/udp_server.h',
'src/core/lib/iomgr/unix_sockets_posix.h',
'src/core/lib/iomgr/wakeup_fd_cv.h',
'src/core/lib/iomgr/wakeup_fd_pipe.h',
'src/core/lib/iomgr/wakeup_fd_posix.h',
'src/core/lib/json/json.h',
'src/core/lib/json/json_common.h',
'src/core/lib/json/json_reader.h',
'src/core/lib/json/json_writer.h',
'src/core/lib/slice/b64.h',
'src/core/lib/slice/percent_encoding.h',
'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',
'src/core/lib/surface/channel.h',
'src/core/lib/surface/channel_init.h',
'src/core/lib/surface/channel_stack_type.h',
'src/core/lib/surface/completion_queue.h',
'src/core/lib/surface/completion_queue_factory.h',
'src/core/lib/surface/event_string.h',
'src/core/lib/surface/init.h',
'src/core/lib/surface/lame_client.h',
'src/core/lib/surface/server.h',
'src/core/lib/surface/validate_metadata.h',
'src/core/lib/transport/bdp_estimator.h',
'src/core/lib/transport/byte_stream.h',
'src/core/lib/transport/connectivity_state.h',
'src/core/lib/transport/error_utils.h',
'src/core/lib/transport/http2_errors.h',
'src/core/lib/transport/metadata.h',
'src/core/lib/transport/metadata_batch.h',
'src/core/lib/transport/pid_controller.h',
'src/core/lib/transport/service_config.h',
'src/core/lib/transport/static_metadata.h',
'src/core/lib/transport/status_conversion.h',
'src/core/lib/transport/timeout_encoding.h',
'src/core/lib/transport/transport.h',
'src/core/lib/transport/transport_impl.h',
'src/core/lib/debug/trace.h',
'src/core/ext/transport/inproc/inproc_transport.h'
end
s.subspec 'Tests' do |ss|
ss.header_mappings_dir = '.'
ss.dependency "#{s.name}/Interface", version
ss.dependency "#{s.name}/Implementation", version
ss.dependency "gRPC-Core/Tests", grpc_version
ss.source_files = 'test/cpp/util/create_test_channel.cc',
'test/cpp/util/string_ref_helper.cc',
'test/cpp/util/subprocess.cc',
'test/cpp/util/test_credentials_provider.cc',
'test/cpp/util/create_test_channel.h',
'test/cpp/util/string_ref_helper.h',
'test/cpp/util/subprocess.h',
'test/cpp/util/test_credentials_provider.h',
'test/core/util/test_config.h',
'test/core/end2end/data/ssl_test_data.h',
'test/core/security/oauth2_utils.h',
'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h',
'test/core/end2end/cq_verifier.h',
'test/core/end2end/fixtures/http_proxy_fixture.h',
'test/core/end2end/fixtures/proxy.h',
'test/core/iomgr/endpoint_tests.h',
'test/core/util/debugger_macros.h',
'test/core/util/grpc_profiler.h',
'test/core/util/histogram.h',
'test/core/util/memory_counters.h',
'test/core/util/mock_endpoint.h',
'test/core/util/parse_hexstring.h',
'test/core/util/passthru_endpoint.h',
'test/core/util/port.h',
'test/core/util/port_server_client.h',
'test/core/util/slice_splitter.h',
'test/core/util/tracer_util.h',
'test/core/util/trickle_endpoint.h',
'src/core/ext/filters/client_channel/backup_poller.h',
'src/core/ext/filters/client_channel/client_channel.h',
'src/core/ext/filters/client_channel/client_channel_factory.h',
'src/core/ext/filters/client_channel/connector.h',
'src/core/ext/filters/client_channel/http_connect_handshaker.h',
'src/core/ext/filters/client_channel/http_proxy.h',
'src/core/ext/filters/client_channel/lb_policy.h',
'src/core/ext/filters/client_channel/lb_policy_factory.h',
'src/core/ext/filters/client_channel/lb_policy_registry.h',
'src/core/ext/filters/client_channel/parse_address.h',
'src/core/ext/filters/client_channel/proxy_mapper.h',
'src/core/ext/filters/client_channel/proxy_mapper_registry.h',
'src/core/ext/filters/client_channel/resolver.h',
'src/core/ext/filters/client_channel/resolver_factory.h',
'src/core/ext/filters/client_channel/resolver_registry.h',
'src/core/ext/filters/client_channel/retry_throttle.h',
'src/core/ext/filters/client_channel/subchannel.h',
'src/core/ext/filters/client_channel/subchannel_index.h',
'src/core/ext/filters/client_channel/uri_parser.h',
'src/core/ext/filters/deadline/deadline_filter.h',
'src/core/ext/transport/chttp2/transport/bin_decoder.h',
'src/core/ext/transport/chttp2/transport/bin_encoder.h',
'src/core/ext/transport/chttp2/transport/chttp2_transport.h',
'src/core/ext/transport/chttp2/transport/flow_control.h',
'src/core/ext/transport/chttp2/transport/frame.h',
'src/core/ext/transport/chttp2/transport/frame_data.h',
'src/core/ext/transport/chttp2/transport/frame_goaway.h',
'src/core/ext/transport/chttp2/transport/frame_ping.h',
'src/core/ext/transport/chttp2/transport/frame_rst_stream.h',
'src/core/ext/transport/chttp2/transport/frame_settings.h',
'src/core/ext/transport/chttp2/transport/frame_window_update.h',
'src/core/ext/transport/chttp2/transport/hpack_encoder.h',
'src/core/ext/transport/chttp2/transport/hpack_parser.h',
'src/core/ext/transport/chttp2/transport/hpack_table.h',
'src/core/ext/transport/chttp2/transport/http2_settings.h',
'src/core/ext/transport/chttp2/transport/huffsyms.h',
'src/core/ext/transport/chttp2/transport/incoming_metadata.h',
'src/core/ext/transport/chttp2/transport/internal.h',
'src/core/ext/transport/chttp2/transport/stream_map.h',
'src/core/ext/transport/chttp2/transport/varint.h',
'src/core/ext/transport/chttp2/alpn/alpn.h',
'src/core/ext/filters/http/client/http_client_filter.h',
'src/core/ext/filters/http/message_compress/message_compress_filter.h',
'src/core/ext/filters/http/server/http_server_filter.h'
end
s.prepare_command = <<-END_OF_COMMAND
find src/cpp/ -type f -exec sed -E -i'.back' 's;#include "third_party/nanopb/(.*)";#include <nanopb/\\1>;g' {} \\\;
find src/cpp/ -name "*.back" -type f -delete
find src/core/ -regex ".*\.h" -type f -exec sed -E -i'.back' 's;#include "third_party/nanopb/(.*)";#include <nanopb/\\1>;g' {} \\\;
find src/core/ -name "*.back" -type f -delete
END_OF_COMMAND
end

@ -173,6 +173,7 @@ 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',
@ -188,7 +189,7 @@ 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.
@ -297,8 +298,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',
@ -338,6 +339,7 @@ Pod::Spec.new do |s|
'src/core/lib/channel/handshaker_factory.h',
'src/core/lib/channel/handshaker_registry.h',
'src/core/lib/compression/algorithm_metadata.h',
'src/core/lib/compression/compression_internal.h',
'src/core/lib/compression/message_compress.h',
'src/core/lib/compression/stream_compression.h',
'src/core/lib/compression/stream_compression_gzip.h',
@ -479,6 +481,8 @@ Pod::Spec.new do |s|
'src/core/lib/channel/handshaker_factory.cc',
'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',
@ -656,8 +660,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',
@ -779,8 +783,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',
@ -820,6 +824,7 @@ Pod::Spec.new do |s|
'src/core/lib/channel/handshaker_factory.h',
'src/core/lib/channel/handshaker_registry.h',
'src/core/lib/compression/algorithm_metadata.h',
'src/core/lib/compression/compression_internal.h',
'src/core/lib/compression/message_compress.h',
'src/core/lib/compression/stream_compression.h',
'src/core/lib/compression/stream_compression_gzip.h',

@ -1,14 +1,15 @@
EXPORTS
grpc_compression_algorithm_is_message
grpc_compression_algorithm_is_stream
grpc_compression_algorithm_parse
grpc_compression_algorithm_name
grpc_stream_compression_algorithm_name
grpc_compression_algorithm_for_level
grpc_stream_compression_algorithm_for_level
grpc_compression_options_init
grpc_compression_options_enable_algorithm
grpc_compression_options_disable_algorithm
grpc_compression_options_is_algorithm_enabled
grpc_compression_options_is_stream_compression_algorithm_enabled
grpc_compression_algorithm_parse_ruby
grpc_compression_algorithm_name_ruby
grpc_metadata_array_init
grpc_metadata_array_destroy
grpc_call_details_init

@ -170,6 +170,7 @@ 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 )
@ -223,8 +224,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 )
@ -264,6 +265,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/channel/handshaker_factory.h )
s.files += %w( src/core/lib/channel/handshaker_registry.h )
s.files += %w( src/core/lib/compression/algorithm_metadata.h )
s.files += %w( src/core/lib/compression/compression_internal.h )
s.files += %w( src/core/lib/compression/message_compress.h )
s.files += %w( src/core/lib/compression/stream_compression.h )
s.files += %w( src/core/lib/compression/stream_compression_gzip.h )
@ -409,6 +411,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/channel/handshaker_factory.cc )
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 )
@ -586,8 +590,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 )
@ -650,31 +654,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 )
@ -717,6 +725,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 )
@ -741,11 +750,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 )
@ -754,9 +763,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 )
@ -780,7 +786,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 )
@ -788,8 +793,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 )
@ -801,44 +804,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 )
@ -850,29 +834,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 )
@ -882,24 +853,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 )
@ -910,30 +877,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 )
@ -948,7 +909,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 )
@ -974,7 +934,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 )
@ -1022,41 +981,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 )

@ -234,6 +234,8 @@
'src/core/lib/channel/handshaker_factory.cc',
'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',
@ -411,8 +413,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',
@ -528,6 +530,8 @@
'src/core/lib/channel/handshaker_factory.cc',
'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',
@ -740,6 +744,8 @@
'src/core/lib/channel/handshaker_factory.cc',
'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',
@ -934,6 +940,8 @@
'src/core/lib/channel/handshaker_factory.cc',
'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',
@ -1557,9 +1565,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',
@ -1583,7 +1588,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',
@ -1591,8 +1595,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',
@ -1604,44 +1606,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',
@ -1653,29 +1636,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',
@ -1685,24 +1655,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',
@ -1713,30 +1679,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',
@ -1751,7 +1711,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',
@ -1777,7 +1736,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',
@ -1825,41 +1783,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',
],
},
{
@ -1874,14 +1833,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',
],
},
{
@ -1918,25 +1877,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',
],
},
{
@ -1947,7 +1906,7 @@
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/cipher/aead_test.cc',
'third_party/boringssl/crypto/cipher_extra/aead_test.cc',
],
},
{
@ -1958,7 +1917,7 @@
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/cipher/cipher_test.cc',
'third_party/boringssl/crypto/cipher_extra/cipher_test.cc',
],
},
{
@ -1972,6 +1931,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',
@ -2017,36 +1987,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',
],
},
{
@ -2061,69 +2031,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',
],
},
{
@ -2145,7 +2181,7 @@
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/hmac/hmac_test.cc',
'third_party/boringssl/crypto/hmac_extra/hmac_test.cc',
],
},
{
@ -2160,25 +2196,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',
],
},
{
@ -2237,25 +2273,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',
],
},
{
@ -2277,7 +2335,7 @@
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/x509v3/tab_test.c',
'third_party/boringssl/crypto/x509v3/tab_test.cc',
],
},
{
@ -2288,7 +2346,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',
],
},
{

@ -216,14 +216,12 @@ class CallOpSendInitialMetadata {
public:
CallOpSendInitialMetadata() : send_(false) {
maybe_compression_level_.is_set = false;
maybe_stream_compression_level_.is_set = false;
}
void SendInitialMetadata(
const std::multimap<grpc::string, grpc::string>& metadata,
uint32_t flags) {
maybe_compression_level_.is_set = false;
maybe_stream_compression_level_.is_set = false;
send_ = true;
flags_ = flags;
initial_metadata_ =
@ -235,11 +233,6 @@ class CallOpSendInitialMetadata {
maybe_compression_level_.level = level;
}
void set_stream_compression_level(grpc_stream_compression_level level) {
maybe_stream_compression_level_.is_set = true;
maybe_stream_compression_level_.level = level;
}
protected:
void AddOp(grpc_op* ops, size_t* nops) {
if (!send_) return;
@ -255,12 +248,6 @@ class CallOpSendInitialMetadata {
op->data.send_initial_metadata.maybe_compression_level.level =
maybe_compression_level_.level;
}
op->data.send_initial_metadata.maybe_stream_compression_level.is_set =
maybe_stream_compression_level_.is_set;
if (maybe_stream_compression_level_.is_set) {
op->data.send_initial_metadata.maybe_stream_compression_level.level =
maybe_stream_compression_level_.level;
}
}
void FinishOp(bool* status) {
if (!send_) return;
@ -276,10 +263,6 @@ class CallOpSendInitialMetadata {
bool is_set;
grpc_compression_level level;
} maybe_compression_level_;
struct {
bool is_set;
grpc_stream_compression_level level;
} maybe_stream_compression_level_;
};
class CallOpSendMessage {
@ -624,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
@ -641,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);

@ -30,42 +30,30 @@
extern "C" {
#endif
/** Return if an algorithm is message compression algorithm. */
GRPCAPI int grpc_compression_algorithm_is_message(
grpc_compression_algorithm algorithm);
/** Return if an algorithm is stream compression algorithm. */
GRPCAPI int grpc_compression_algorithm_is_stream(
grpc_compression_algorithm algorithm);
/** Parses the \a slice as a grpc_compression_algorithm instance and updating \a
* algorithm. Returns 1 upon success, 0 otherwise. */
GRPCAPI int grpc_compression_algorithm_parse(
grpc_slice value, grpc_compression_algorithm* algorithm);
/** Parses the \a slice as a grpc_stream_compression_algorithm instance and
* updating \a algorithm. Returns 1 upon success, 0 otherwise. */
int grpc_stream_compression_algorithm_parse(
grpc_slice name, grpc_stream_compression_algorithm* algorithm);
/** Updates \a name with the encoding name corresponding to a valid \a
* algorithm. Note that \a name is statically allocated and must *not* be freed.
* Returns 1 upon success, 0 otherwise. */
GRPCAPI int grpc_compression_algorithm_name(
grpc_compression_algorithm algorithm, const char** name);
/** Updates \a name with the encoding name corresponding to a valid \a
* algorithm. Note that \a name is statically allocated and must *not* be freed.
* Returns 1 upon success, 0 otherwise. */
GRPCAPI int grpc_stream_compression_algorithm_name(
grpc_stream_compression_algorithm algorithm, const char** name);
/** Returns the compression algorithm corresponding to \a level for the
* compression algorithms encoded in the \a accepted_encodings bitset.
*
* It abort()s for unknown levels. */
* compression algorithms encoded in the \a accepted_encodings bitset.*/
GRPCAPI grpc_compression_algorithm grpc_compression_algorithm_for_level(
grpc_compression_level level, uint32_t accepted_encodings);
/** Returns the stream compression algorithm corresponding to \a level for the
* compression algorithms encoded in the \a accepted_stream_encodings bitset.
* It abort()s for unknown levels. */
GRPCAPI grpc_stream_compression_algorithm
grpc_stream_compression_algorithm_for_level(grpc_stream_compression_level level,
uint32_t accepted_stream_encodings);
GRPCAPI void grpc_compression_options_init(grpc_compression_options* opts);
/** Mark \a algorithm as enabled in \a opts. */
@ -80,11 +68,6 @@ GRPCAPI void grpc_compression_options_disable_algorithm(
GRPCAPI int grpc_compression_options_is_algorithm_enabled(
const grpc_compression_options* opts, grpc_compression_algorithm algorithm);
/** Returns true if \a algorithm is marked as enabled in \a opts. */
GRPCAPI int grpc_compression_options_is_stream_compression_algorithm_enabled(
const grpc_compression_options* opts,
grpc_stream_compression_algorithm algorithm);
#ifdef __cplusplus
}
#endif

@ -0,0 +1,48 @@
/*
*
* 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 */

@ -29,11 +29,6 @@ extern "C" {
* algorithm */
#define GRPC_COMPRESSION_REQUEST_ALGORITHM_MD_KEY \
"grpc-internal-encoding-request"
/** To be used as initial metadata key for the request of a concrete stream
* compression
* algorithm */
#define GRPC_STREAM_COMPRESSION_REQUEST_ALGORITHM_MD_KEY \
"grpc-internal-stream-encoding-request"
/** To be used in channel arguments.
*
@ -43,17 +38,9 @@ extern "C" {
* Its value is an int from the \a grpc_compression_algorithm enum. */
#define GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM \
"grpc.default_compression_algorithm"
/** Default stream compression algorithm for the channel.
* Its value is an int from the \a grpc_stream_compression_algorithm enum. */
#define GRPC_STREAM_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM \
"grpc.default_stream_compression_algorithm"
/** Default compression level for the channel.
* Its value is an int from the \a grpc_compression_level enum. */
#define GRPC_COMPRESSION_CHANNEL_DEFAULT_LEVEL "grpc.default_compression_level"
/** Default stream compression level for the channel.
* Its value is an int from the \a grpc_stream_compression_level enum. */
#define GRPC_STREAM_COMPRESSION_CHANNEL_DEFAULT_LEVEL \
"grpc.default_stream_compression_level"
/** Compression algorithms supported by the channel.
* Its value is a bitset (an int). Bits correspond to algorithms in \a
* grpc_compression_algorithm. For example, its LSB corresponds to
@ -63,33 +50,18 @@ extern "C" {
* be ignored). */
#define GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET \
"grpc.compression_enabled_algorithms_bitset"
/** Stream compression algorithms supported by the channel.
* Its value is a bitset (an int). Bits correspond to algorithms in \a
* grpc_stream_compression_algorithm. For example, its LSB corresponds to
* GRPC_STREAM_COMPRESS_NONE, the next bit to GRPC_STREAM_COMPRESS_DEFLATE, etc.
* Unset bits disable support for the algorithm. By default all algorithms are
* supported. It's not possible to disable GRPC_STREAM_COMPRESS_NONE (the
* attempt will be ignored). */
#define GRPC_STREAM_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET \
"grpc.stream_compression_enabled_algorithms_bitset"
/** \} */
/** The various compression algorithms supported by gRPC */
typedef enum {
GRPC_COMPRESS_NONE = 0,
GRPC_COMPRESS_DEFLATE,
GRPC_COMPRESS_GZIP,
GRPC_COMPRESS_MESSAGE_DEFLATE,
GRPC_COMPRESS_MESSAGE_GZIP,
GRPC_COMPRESS_STREAM_GZIP,
/* TODO(ctiller): snappy */
GRPC_COMPRESS_ALGORITHMS_COUNT
} grpc_compression_algorithm;
/** Stream compresssion algorithms supported by gRPC */
typedef enum {
GRPC_STREAM_COMPRESS_NONE = 0,
GRPC_STREAM_COMPRESS_GZIP,
GRPC_STREAM_COMPRESS_ALGORITHMS_COUNT
} grpc_stream_compression_algorithm;
/** Compression levels allow a party with knowledge of its peer's accepted
* encodings to request compression in an abstract way. The level-algorithm
* mapping is performed internally and depends on the peer's supported
@ -102,41 +74,22 @@ typedef enum {
GRPC_COMPRESS_LEVEL_COUNT
} grpc_compression_level;
/** Compression levels for stream compression algorithms */
typedef enum {
GRPC_STREAM_COMPRESS_LEVEL_NONE = 0,
GRPC_STREAM_COMPRESS_LEVEL_LOW,
GRPC_STREAM_COMPRESS_LEVEL_MED,
GRPC_STREAM_COMPRESS_LEVEL_HIGH,
GRPC_STREAM_COMPRESS_LEVEL_COUNT
} grpc_stream_compression_level;
typedef struct grpc_compression_options {
/** All algs are enabled by default. This option corresponds to the channel
* argument key behind \a GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET
*/
uint32_t enabled_algorithms_bitset;
uint32_t enabled_stream_compression_algorithms_bitset;
/** The default message-wise compression level. It'll be used in the absence
* of * call specific settings. This option corresponds to the channel
/** The default compression level. It'll be used in the absence of call
* specific settings. This option corresponds to the channel
* argument key behind \a GRPC_COMPRESSION_CHANNEL_DEFAULT_LEVEL. If present,
* takes precedence over \a default_algorithm and \a
* default_stream_compression_algorithm.
* takes precedence over \a default_algorithm.
* TODO(dgq): currently only available for server channels. */
struct grpc_compression_options_default_level {
int is_set;
grpc_compression_level level;
} default_level;
/** The default stream compression level. It'll be used in the absence of call
* specefic settings. If present, takes precedence over \a default_level,
* \a default_algorithm and \a default_stream_compression_algorithm. */
struct grpc_stream_compression_options_default_level {
int is_set;
grpc_stream_compression_level level;
} default_stream_compression_level;
/** The default message compression algorithm. It'll be used in the absence of
* call specific settings. This option corresponds to the channel argument key
* behind \a GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM. */
@ -144,17 +97,6 @@ typedef struct grpc_compression_options {
int is_set;
grpc_compression_algorithm algorithm;
} default_algorithm;
/** The default stream compression algorithm. It'll be used in the absence of
* call specific settings. If present, takes precedence over \a
* default_algorithm. This option corresponds to the channel
* argument key behind \a GRPC_STREAM_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM.
*/
struct grpc_stream_compression_options_default_algorithm {
int is_set;
grpc_stream_compression_algorithm algorithm;
} default_stream_compression_algorithm;
} grpc_compression_options;
#ifdef __cplusplus

@ -515,10 +515,6 @@ typedef struct grpc_op {
uint8_t is_set;
grpc_compression_level level;
} maybe_compression_level;
struct grpc_op_send_initial_metadata_maybe_stream_compression_level {
uint8_t is_set;
grpc_stream_compression_level level;
} maybe_stream_compression_level;
} send_initial_metadata;
struct grpc_op_send_message {
/** This op takes ownership of the slices in send_message. After

@ -45,6 +45,7 @@ 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"

@ -46,8 +46,9 @@ GPRAPI void* gpr_zalloc(size_t size);
GPRAPI void gpr_free(void* ptr);
/** realloc, never returns NULL */
GPRAPI void* gpr_realloc(void* p, size_t size);
/** aligned malloc, never returns NULL, will align to 1 << alignment_log */
GPRAPI void* gpr_malloc_aligned(size_t size, size_t alignment_log);
/** aligned malloc, never returns NULL, will align to alignment, which
* must be a power of 2. */
GPRAPI void* gpr_malloc_aligned(size_t size, size_t alignment);
/** free memory allocated by gpr_malloc_aligned */
GPRAPI void gpr_free_aligned(void* ptr);

@ -177,6 +177,7 @@
<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" />
@ -230,8 +231,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" />
@ -271,6 +272,7 @@
<file baseinstalldir="/" name="src/core/lib/channel/handshaker_factory.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/handshaker_registry.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/compression/algorithm_metadata.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/compression/compression_internal.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/compression/message_compress.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/compression/stream_compression.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/compression/stream_compression_gzip.h" role="src" />
@ -416,6 +418,8 @@
<file baseinstalldir="/" name="src/core/lib/channel/handshaker_factory.cc" role="src" />
<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" />
@ -593,8 +597,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" />
@ -657,31 +661,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" />
@ -724,6 +732,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" />
@ -748,11 +757,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" />
@ -761,9 +770,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" />
@ -787,7 +793,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" />
@ -795,8 +800,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" />
@ -808,44 +811,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" />
@ -857,29 +841,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" />
@ -889,24 +860,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" />
@ -917,30 +884,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" />
@ -955,7 +916,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" />
@ -981,7 +941,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" />
@ -1029,41 +988,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" />

@ -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'])))
]
}

@ -1333,12 +1333,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 +1347,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 +1369,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 +1391,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 +1417,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 */

@ -115,6 +115,7 @@ static bool proxy_mapper_map_name(grpc_proxy_mapper* mapper,
"unable to split host and port, not checking no_proxy list for "
"host '%s'",
server_uri);
gpr_free(no_proxy_str);
} else {
size_t uri_len = strlen(server_host);
char** no_proxy_hosts;
@ -139,6 +140,7 @@ static bool proxy_mapper_map_name(grpc_proxy_mapper* mapper,
gpr_free(no_proxy_hosts);
gpr_free(server_host);
gpr_free(server_port);
gpr_free(no_proxy_str);
if (!use_proxy) goto no_use_proxy;
}
}

@ -69,11 +69,13 @@ static grpc_error* init_call_elem(grpc_call_element* elem,
call_data* calld = (call_data*)elem->call_data;
// Get stats object from context and take a ref.
GPR_ASSERT(args->context != nullptr);
GPR_ASSERT(args->context[GRPC_GRPCLB_CLIENT_STATS].value != nullptr);
calld->client_stats = grpc_grpclb_client_stats_ref(
(grpc_grpclb_client_stats*)args->context[GRPC_GRPCLB_CLIENT_STATS].value);
// Record call started.
grpc_grpclb_client_stats_add_call_started(calld->client_stats);
if (args->context[GRPC_GRPCLB_CLIENT_STATS].value != nullptr) {
calld->client_stats = grpc_grpclb_client_stats_ref(
(grpc_grpclb_client_stats*)args->context[GRPC_GRPCLB_CLIENT_STATS]
.value);
// Record call started.
grpc_grpclb_client_stats_add_call_started(calld->client_stats);
}
return GRPC_ERROR_NONE;
}
@ -81,40 +83,43 @@ static void destroy_call_elem(grpc_call_element* elem,
const grpc_call_final_info* final_info,
grpc_closure* ignored) {
call_data* calld = (call_data*)elem->call_data;
// Record call finished, optionally setting client_failed_to_send and
// received.
grpc_grpclb_client_stats_add_call_finished(
!calld->send_initial_metadata_succeeded /* client_failed_to_send */,
calld->recv_initial_metadata_succeeded /* known_received */,
calld->client_stats);
// All done, so unref the stats object.
grpc_grpclb_client_stats_unref(calld->client_stats);
if (calld->client_stats != nullptr) {
// Record call finished, optionally setting client_failed_to_send and
// received.
grpc_grpclb_client_stats_add_call_finished(
!calld->send_initial_metadata_succeeded /* client_failed_to_send */,
calld->recv_initial_metadata_succeeded /* known_received */,
calld->client_stats);
// All done, so unref the stats object.
grpc_grpclb_client_stats_unref(calld->client_stats);
}
}
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);
// Intercept send_initial_metadata.
if (batch->send_initial_metadata) {
calld->original_on_complete_for_send = batch->on_complete;
GRPC_CLOSURE_INIT(&calld->on_complete_for_send, on_complete_for_send, calld,
grpc_schedule_on_exec_ctx);
batch->on_complete = &calld->on_complete_for_send;
}
// Intercept recv_initial_metadata.
if (batch->recv_initial_metadata) {
calld->original_recv_initial_metadata_ready =
batch->payload->recv_initial_metadata.recv_initial_metadata_ready;
GRPC_CLOSURE_INIT(&calld->recv_initial_metadata_ready,
recv_initial_metadata_ready, calld,
grpc_schedule_on_exec_ctx);
batch->payload->recv_initial_metadata.recv_initial_metadata_ready =
&calld->recv_initial_metadata_ready;
GPR_TIMER_SCOPE("clr_start_transport_stream_op_batch", 0);
if (calld->client_stats != nullptr) {
// Intercept send_initial_metadata.
if (batch->send_initial_metadata) {
calld->original_on_complete_for_send = batch->on_complete;
GRPC_CLOSURE_INIT(&calld->on_complete_for_send, on_complete_for_send,
calld, grpc_schedule_on_exec_ctx);
batch->on_complete = &calld->on_complete_for_send;
}
// Intercept recv_initial_metadata.
if (batch->recv_initial_metadata) {
calld->original_recv_initial_metadata_ready =
batch->payload->recv_initial_metadata.recv_initial_metadata_ready;
GRPC_CLOSURE_INIT(&calld->recv_initial_metadata_ready,
recv_initial_metadata_ready, calld,
grpc_schedule_on_exec_ctx);
batch->payload->recv_initial_metadata.recv_initial_metadata_ready =
&calld->recv_initial_metadata_ready;
}
}
// 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 = {

@ -131,7 +131,6 @@ 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);
}
}
@ -261,6 +260,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);
@ -297,7 +299,6 @@ 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);
} else {
dns_ares_maybe_finish_next_locked(r);

@ -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);
}

@ -106,7 +106,6 @@ 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);
}
}
@ -119,7 +118,6 @@ 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);
} else {
dns_maybe_finish_next_locked(r);
@ -160,6 +158,9 @@ 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();

@ -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>

@ -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 */

@ -27,6 +27,7 @@
#include "src/core/ext/filters/http/message_compress/message_compress_filter.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/compression/algorithm_metadata.h"
#include "src/core/lib/compression/compression_internal.h"
#include "src/core/lib/compression/message_compress.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/profiling/timers.h"
@ -53,7 +54,7 @@ struct call_data {
grpc_linked_mdelem accept_stream_encoding_storage;
/** Compression algorithm we'll try to use. It may be given by incoming
* metadata, or by the channel's default compression settings. */
grpc_compression_algorithm compression_algorithm;
grpc_message_compression_algorithm message_compression_algorithm;
initial_metadata_state send_initial_metadata_state;
grpc_error* cancel_error;
grpc_closure start_send_message_batch_in_call_combiner;
@ -68,15 +69,10 @@ struct call_data {
struct channel_data {
/** The default, channel-level, compression algorithm */
grpc_compression_algorithm default_compression_algorithm;
/** Bitset of enabled algorithms */
/** Bitset of enabled compression algorithms */
uint32_t enabled_algorithms_bitset;
/** Supported compression algorithms */
uint32_t supported_compression_algorithms;
/** The default, channel-level, stream compression algorithm */
grpc_stream_compression_algorithm default_stream_compression_algorithm;
/** Bitset of enabled stream compression algorithms */
uint32_t enabled_stream_compression_algorithms_bitset;
uint32_t supported_message_compression_algorithms;
/** Supported stream compression algorithms */
uint32_t supported_stream_compression_algorithms;
};
@ -91,7 +87,7 @@ static bool skip_compression(grpc_call_element* elem, uint32_t flags,
return true;
}
if (has_compression_algorithm) {
if (calld->compression_algorithm == GRPC_COMPRESS_NONE) {
if (calld->message_compression_algorithm == GRPC_MESSAGE_COMPRESS_NONE) {
return true;
}
return false; /* we have an actual call-specific algorithm */
@ -110,70 +106,53 @@ static grpc_error* process_send_initial_metadata(
call_data* calld = (call_data*)elem->call_data;
channel_data* channeld = (channel_data*)elem->channel_data;
*has_compression_algorithm = false;
grpc_compression_algorithm compression_algorithm;
grpc_stream_compression_algorithm stream_compression_algorithm =
GRPC_STREAM_COMPRESS_NONE;
if (initial_metadata->idx.named.grpc_internal_stream_encoding_request !=
nullptr) {
if (initial_metadata->idx.named.grpc_internal_encoding_request != nullptr) {
grpc_mdelem md =
initial_metadata->idx.named.grpc_internal_stream_encoding_request->md;
if (!grpc_stream_compression_algorithm_parse(
GRPC_MDVALUE(md), &stream_compression_algorithm)) {
initial_metadata->idx.named.grpc_internal_encoding_request->md;
if (!grpc_compression_algorithm_parse(GRPC_MDVALUE(md),
&compression_algorithm)) {
char* val = grpc_slice_to_c_string(GRPC_MDVALUE(md));
gpr_log(GPR_ERROR,
"Invalid stream compression algorithm: '%s' (unknown). Ignoring.",
val);
gpr_free(val);
stream_compression_algorithm = GRPC_STREAM_COMPRESS_NONE;
}
if (!GPR_BITGET(channeld->enabled_stream_compression_algorithms_bitset,
stream_compression_algorithm)) {
char* val = grpc_slice_to_c_string(GRPC_MDVALUE(md));
gpr_log(
GPR_ERROR,
"Invalid stream compression algorithm: '%s' (previously disabled). "
"Ignoring.",
val);
"Invalid compression algorithm: '%s' (unknown). Ignoring.", val);
gpr_free(val);
calld->message_compression_algorithm = GRPC_MESSAGE_COMPRESS_NONE;
stream_compression_algorithm = GRPC_STREAM_COMPRESS_NONE;
}
*has_compression_algorithm = true;
grpc_metadata_batch_remove(
initial_metadata,
initial_metadata->idx.named.grpc_internal_stream_encoding_request);
/* Disable message-wise compression */
calld->compression_algorithm = GRPC_COMPRESS_NONE;
if (initial_metadata->idx.named.grpc_internal_encoding_request != nullptr) {
grpc_metadata_batch_remove(
initial_metadata,
initial_metadata->idx.named.grpc_internal_encoding_request);
}
} else if (initial_metadata->idx.named.grpc_internal_encoding_request !=
nullptr) {
grpc_mdelem md =
initial_metadata->idx.named.grpc_internal_encoding_request->md;
if (!grpc_compression_algorithm_parse(GRPC_MDVALUE(md),
&calld->compression_algorithm)) {
if (!GPR_BITGET(channeld->enabled_algorithms_bitset,
compression_algorithm)) {
char* val = grpc_slice_to_c_string(GRPC_MDVALUE(md));
gpr_log(GPR_ERROR,
"Invalid compression algorithm: '%s' (unknown). Ignoring.", val);
"Invalid compression algorithm: '%s' (previously disabled). "
"Ignoring.",
val);
gpr_free(val);
calld->compression_algorithm = GRPC_COMPRESS_NONE;
calld->message_compression_algorithm = GRPC_MESSAGE_COMPRESS_NONE;
stream_compression_algorithm = GRPC_STREAM_COMPRESS_NONE;
}
*has_compression_algorithm = true;
grpc_metadata_batch_remove(
initial_metadata,
initial_metadata->idx.named.grpc_internal_encoding_request);
calld->message_compression_algorithm =
grpc_compression_algorithm_to_message_compression_algorithm(
compression_algorithm);
stream_compression_algorithm =
grpc_compression_algorithm_to_stream_compression_algorithm(
compression_algorithm);
} else {
/* If no algorithm was found in the metadata and we aren't
* exceptionally skipping compression, fall back to the channel
* default */
if (channeld->default_stream_compression_algorithm !=
GRPC_STREAM_COMPRESS_NONE) {
if (channeld->default_compression_algorithm != GRPC_COMPRESS_NONE) {
calld->message_compression_algorithm =
grpc_compression_algorithm_to_message_compression_algorithm(
channeld->default_compression_algorithm);
stream_compression_algorithm =
channeld->default_stream_compression_algorithm;
calld->compression_algorithm = GRPC_COMPRESS_NONE;
} else {
calld->compression_algorithm = channeld->default_compression_algorithm;
grpc_compression_algorithm_to_stream_compression_algorithm(
channeld->default_compression_algorithm);
}
*has_compression_algorithm = true;
}
@ -184,10 +163,12 @@ static grpc_error* process_send_initial_metadata(
error = grpc_metadata_batch_add_tail(
initial_metadata, &calld->stream_compression_algorithm_storage,
grpc_stream_compression_encoding_mdelem(stream_compression_algorithm));
} else if (calld->compression_algorithm != GRPC_COMPRESS_NONE) {
} else if (calld->message_compression_algorithm !=
GRPC_MESSAGE_COMPRESS_NONE) {
error = grpc_metadata_batch_add_tail(
initial_metadata, &calld->compression_algorithm_storage,
grpc_compression_encoding_mdelem(calld->compression_algorithm));
grpc_message_compression_encoding_mdelem(
calld->message_compression_algorithm));
}
if (error != GRPC_ERROR_NONE) return error;
@ -196,11 +177,12 @@ static grpc_error* process_send_initial_metadata(
error = grpc_metadata_batch_add_tail(
initial_metadata, &calld->accept_encoding_storage,
GRPC_MDELEM_ACCEPT_ENCODING_FOR_ALGORITHMS(
channeld->supported_compression_algorithms));
channeld->supported_message_compression_algorithms));
if (error != GRPC_ERROR_NONE) return error;
/* Do not overwrite accept-encoding header if it already presents. */
/* Do not overwrite accept-encoding header if it already presents (e.g. added
* by some proxy). */
if (!initial_metadata->idx.named.accept_encoding) {
error = grpc_metadata_batch_add_tail(
initial_metadata, &calld->accept_stream_encoding_storage,
@ -237,16 +219,16 @@ static void finish_send_message(grpc_call_element* elem) {
grpc_slice_buffer_init(&tmp);
uint32_t send_flags =
calld->send_message_batch->payload->send_message.send_message->flags;
bool did_compress =
grpc_msg_compress(calld->compression_algorithm, &calld->slices, &tmp);
bool did_compress = grpc_msg_compress(calld->message_compression_algorithm,
&calld->slices, &tmp);
if (did_compress) {
if (grpc_compression_trace.enabled()) {
const char* algo_name;
const size_t before_size = calld->slices.length;
const size_t after_size = tmp.length;
const float savings_ratio = 1.0f - (float)after_size / (float)before_size;
GPR_ASSERT(grpc_compression_algorithm_name(calld->compression_algorithm,
&algo_name));
GPR_ASSERT(grpc_message_compression_algorithm_name(
calld->message_compression_algorithm, &algo_name));
gpr_log(GPR_DEBUG,
"Compressed[%s] %" PRIuPTR " bytes vs. %" PRIuPTR
" bytes (%.2f%% savings)",
@ -257,8 +239,8 @@ static void finish_send_message(grpc_call_element* elem) {
} else {
if (grpc_compression_trace.enabled()) {
const char* algo_name;
GPR_ASSERT(grpc_compression_algorithm_name(calld->compression_algorithm,
&algo_name));
GPR_ASSERT(grpc_message_compression_algorithm_name(
calld->message_compression_algorithm, &algo_name));
gpr_log(GPR_DEBUG,
"Algorithm '%s' enabled but decided not to compress. Input size: "
"%" PRIuPTR,
@ -365,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);
@ -381,6 +363,7 @@ static void compress_start_transport_stream_op_batch(
GRPC_ERROR_REF(calld->cancel_error), "failing send_message op");
} else {
grpc_byte_stream_shutdown(
calld->send_message_batch->payload->send_message.send_message,
GRPC_ERROR_REF(calld->cancel_error));
}
@ -388,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) {
@ -400,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
@ -429,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 */
@ -470,12 +451,11 @@ static grpc_error* init_channel_elem(grpc_channel_element* elem,
grpc_channel_element_args* args) {
channel_data* channeld = (channel_data*)elem->channel_data;
/* Configuration for message compression */
channeld->enabled_algorithms_bitset =
grpc_channel_args_compression_algorithm_get_states(args->channel_args);
channeld->default_compression_algorithm =
grpc_channel_args_get_compression_algorithm(args->channel_args);
/* Make sure the default isn't disabled. */
if (!GPR_BITGET(channeld->enabled_algorithms_bitset,
channeld->default_compression_algorithm)) {
@ -485,31 +465,18 @@ static grpc_error* init_channel_elem(grpc_channel_element* elem,
channeld->default_compression_algorithm = GRPC_COMPRESS_NONE;
}
channeld->supported_compression_algorithms =
uint32_t supported_compression_algorithms =
(((1u << GRPC_COMPRESS_ALGORITHMS_COUNT) - 1) &
channeld->enabled_algorithms_bitset) |
1u;
/* Configuration for stream compression */
channeld->enabled_stream_compression_algorithms_bitset =
grpc_channel_args_stream_compression_algorithm_get_states(
args->channel_args);
channeld->default_stream_compression_algorithm =
grpc_channel_args_get_stream_compression_algorithm(args->channel_args);
if (!GPR_BITGET(channeld->enabled_stream_compression_algorithms_bitset,
channeld->default_stream_compression_algorithm)) {
gpr_log(GPR_DEBUG,
"stream compression algorithm %d not enabled: switching to none",
channeld->default_stream_compression_algorithm);
channeld->default_stream_compression_algorithm = GRPC_STREAM_COMPRESS_NONE;
}
channeld->supported_message_compression_algorithms =
grpc_compression_bitset_to_message_bitset(
supported_compression_algorithms);
channeld->supported_stream_compression_algorithms =
(((1u << GRPC_STREAM_COMPRESS_ALGORITHMS_COUNT) - 1) &
channeld->enabled_stream_compression_algorithms_bitset) |
1u;
grpc_compression_bitset_to_stream_bitset(
supported_compression_algorithms);
GPR_ASSERT(!args->is_last);
return GRPC_ERROR_NONE;

@ -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 = {

@ -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) {
@ -1886,7 +1875,7 @@ void grpc_chttp2_maybe_complete_recv_trailing_metadata(grpc_chttp2_transport* t,
grpc_chttp2_maybe_complete_recv_message(t, s);
if (s->recv_trailing_metadata_finished != nullptr && s->read_closed &&
s->write_closed) {
if (s->seen_error) {
if (s->seen_error || !t->is_client) {
grpc_slice_buffer_reset_and_unref_internal(&s->frame_storage);
if (!s->pending_byte_stream) {
grpc_slice_buffer_reset_and_unref_internal(
@ -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);
}

@ -222,21 +222,6 @@ grpc_compression_algorithm grpc_channel_args_get_compression_algorithm(
return GRPC_COMPRESS_NONE;
}
grpc_stream_compression_algorithm
grpc_channel_args_get_stream_compression_algorithm(const grpc_channel_args* a) {
size_t i;
if (a == nullptr) return GRPC_STREAM_COMPRESS_NONE;
for (i = 0; i < a->num_args; ++i) {
if (a->args[i].type == GRPC_ARG_INTEGER &&
!strcmp(GRPC_STREAM_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM,
a->args[i].key)) {
return (grpc_stream_compression_algorithm)a->args[i].value.integer;
break;
}
}
return GRPC_STREAM_COMPRESS_NONE;
}
grpc_channel_args* grpc_channel_args_set_compression_algorithm(
grpc_channel_args* a, grpc_compression_algorithm algorithm) {
GPR_ASSERT(algorithm < GRPC_COMPRESS_ALGORITHMS_COUNT);
@ -247,16 +232,6 @@ grpc_channel_args* grpc_channel_args_set_compression_algorithm(
return grpc_channel_args_copy_and_add(a, &tmp, 1);
}
grpc_channel_args* grpc_channel_args_set_stream_compression_algorithm(
grpc_channel_args* a, grpc_stream_compression_algorithm algorithm) {
GPR_ASSERT(algorithm < GRPC_STREAM_COMPRESS_ALGORITHMS_COUNT);
grpc_arg tmp;
tmp.type = GRPC_ARG_INTEGER;
tmp.key = (char*)GRPC_STREAM_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM;
tmp.value.integer = algorithm;
return grpc_channel_args_copy_and_add(a, &tmp, 1);
}
/** Returns 1 if the argument for compression algorithm's enabled states bitset
* was found in \a a, returning the arg's value in \a states. Otherwise, returns
* 0. */
@ -277,26 +252,6 @@ static int find_compression_algorithm_states_bitset(const grpc_channel_args* a,
return 0; /* GPR_FALSE */
}
/** Returns 1 if the argument for compression algorithm's enabled states bitset
* was found in \a a, returning the arg's value in \a states. Otherwise, returns
* 0. */
static int find_stream_compression_algorithm_states_bitset(
const grpc_channel_args* a, int** states_arg) {
if (a != nullptr) {
size_t i;
for (i = 0; i < a->num_args; ++i) {
if (a->args[i].type == GRPC_ARG_INTEGER &&
!strcmp(GRPC_STREAM_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET,
a->args[i].key)) {
*states_arg = &a->args[i].value.integer;
**states_arg |= 0x1; /* forcefully enable support for no compression */
return 1;
}
}
}
return 0; /* GPR_FALSE */
}
grpc_channel_args* grpc_channel_args_compression_algorithm_set_state(
grpc_channel_args** a, grpc_compression_algorithm algorithm, int state) {
int* states_arg = nullptr;
@ -337,48 +292,6 @@ grpc_channel_args* grpc_channel_args_compression_algorithm_set_state(
return result;
}
grpc_channel_args* grpc_channel_args_stream_compression_algorithm_set_state(
grpc_channel_args** a, grpc_stream_compression_algorithm algorithm,
int state) {
int* states_arg = nullptr;
grpc_channel_args* result = *a;
const int states_arg_found =
find_stream_compression_algorithm_states_bitset(*a, &states_arg);
if (grpc_channel_args_get_stream_compression_algorithm(*a) == algorithm &&
state == 0) {
const char* algo_name = nullptr;
GPR_ASSERT(grpc_stream_compression_algorithm_name(algorithm, &algo_name) !=
0);
gpr_log(GPR_ERROR,
"Tried to disable default stream compression algorithm '%s'. The "
"operation has been ignored.",
algo_name);
} else if (states_arg_found) {
if (state != 0) {
GPR_BITSET((unsigned*)states_arg, algorithm);
} else if (algorithm != GRPC_STREAM_COMPRESS_NONE) {
GPR_BITCLEAR((unsigned*)states_arg, algorithm);
}
} else {
/* create a new arg */
grpc_arg tmp;
tmp.type = GRPC_ARG_INTEGER;
tmp.key = (char*)GRPC_STREAM_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET;
/* all enabled by default */
tmp.value.integer = (1u << GRPC_STREAM_COMPRESS_ALGORITHMS_COUNT) - 1;
if (state != 0) {
GPR_BITSET((unsigned*)&tmp.value.integer, algorithm);
} else if (algorithm != GRPC_STREAM_COMPRESS_NONE) {
GPR_BITCLEAR((unsigned*)&tmp.value.integer, algorithm);
}
result = grpc_channel_args_copy_and_add(*a, &tmp, 1);
grpc_channel_args_destroy(*a);
*a = result;
}
return result;
}
uint32_t grpc_channel_args_compression_algorithm_get_states(
const grpc_channel_args* a) {
int* states_arg;
@ -389,17 +302,6 @@ uint32_t grpc_channel_args_compression_algorithm_get_states(
}
}
uint32_t grpc_channel_args_stream_compression_algorithm_get_states(
const grpc_channel_args* a) {
int* states_arg;
if (find_stream_compression_algorithm_states_bitset(a, &states_arg)) {
return (uint32_t)*states_arg;
} else {
return (1u << GRPC_STREAM_COMPRESS_ALGORITHMS_COUNT) -
1; /* All algs. enabled */
}
}
grpc_channel_args* grpc_channel_args_set_socket_mutator(
grpc_channel_args* a, grpc_socket_mutator* mutator) {
grpc_arg tmp = grpc_socket_mutator_to_arg(mutator);

@ -59,24 +59,12 @@ void grpc_channel_args_destroy(grpc_channel_args* a);
grpc_compression_algorithm grpc_channel_args_get_compression_algorithm(
const grpc_channel_args* a);
/** Returns the stream compression algorithm set in \a a. */
grpc_stream_compression_algorithm
grpc_channel_args_get_stream_compression_algorithm(const grpc_channel_args* a);
/** Returns a channel arg instance with compression enabled. If \a a is
* non-NULL, its args are copied. N.B. GRPC_COMPRESS_NONE disables compression
* for the channel. */
grpc_channel_args* grpc_channel_args_set_compression_algorithm(
grpc_channel_args* a, grpc_compression_algorithm algorithm);
/** Returns a channel arg instance with stream compression enabled. If \a a is
* non-NULL, its args are copied. N.B. GRPC_STREAM_COMPRESS_NONE disables
* stream compression for the channel. If a value other than
* GRPC_STREAM_COMPRESS_NONE is set, it takes precedence over message-wise
* compression algorithms. */
grpc_channel_args* grpc_channel_args_set_stream_compression_algorithm(
grpc_channel_args* a, grpc_stream_compression_algorithm algorithm);
/** Sets the support for the given compression algorithm. By default, all
* compression algorithms are enabled. It's an error to disable an algorithm set
* by grpc_channel_args_set_compression_algorithm.
@ -87,17 +75,6 @@ grpc_channel_args* grpc_channel_args_set_stream_compression_algorithm(
grpc_channel_args* grpc_channel_args_compression_algorithm_set_state(
grpc_channel_args** a, grpc_compression_algorithm algorithm, int enabled);
/** Sets the support for the given stream compression algorithm. By default, all
* stream compression algorithms are enabled. It's an error to disable an
* algorithm set by grpc_channel_args_set_stream_compression_algorithm.
*
* Returns an instance with the updated algorithm states. The \a a pointer is
* modified to point to the returned instance (which may be different from the
* input value of \a a). */
grpc_channel_args* grpc_channel_args_stream_compression_algorithm_set_state(
grpc_channel_args** a, grpc_stream_compression_algorithm algorithm,
int enabled);
/** Returns the bitset representing the support state (true for enabled, false
* for disabled) for compression algorithms.
*
@ -106,14 +83,6 @@ grpc_channel_args* grpc_channel_args_stream_compression_algorithm_set_state(
uint32_t grpc_channel_args_compression_algorithm_get_states(
const grpc_channel_args* a);
/** Returns the bitset representing the support state (true for enabled, false
* for disabled) for stream compression algorithms.
*
* The i-th bit of the returned bitset corresponds to the i-th entry in the
* grpc_stream_compression_algorithm enum. */
uint32_t grpc_channel_args_stream_compression_algorithm_get_states(
const grpc_channel_args* a);
int grpc_channel_args_compare(const grpc_channel_args* a,
const grpc_channel_args* b);

@ -20,20 +20,27 @@
#define GRPC_CORE_LIB_COMPRESSION_ALGORITHM_METADATA_H
#include <grpc/compression.h>
#include "src/core/lib/compression/compression_internal.h"
#include "src/core/lib/transport/metadata.h"
/** Return compression algorithm based metadata value */
grpc_slice grpc_compression_algorithm_slice(
grpc_compression_algorithm algorithm);
/** Return stream compression algorithm based metadata value */
grpc_slice grpc_stream_compression_algorithm_slice(
grpc_stream_compression_algorithm algorithm);
/** Find compression algorithm based on passed in mdstr - returns
* GRPC_COMPRESS_ALGORITHM_COUNT on failure */
grpc_compression_algorithm grpc_compression_algorithm_from_slice(
grpc_slice str);
/** Return compression algorithm based metadata element (grpc-encoding: xxx) */
/** Return compression algorithm based metadata element */
grpc_mdelem grpc_compression_encoding_mdelem(
grpc_compression_algorithm algorithm);
/** Return message compression algorithm based metadata element (grpc-encoding:
* xxx) */
grpc_mdelem grpc_message_compression_encoding_mdelem(
grpc_message_compression_algorithm algorithm);
/** Return stream compression algorithm based metadata element
* (content-encoding: xxx) */
grpc_mdelem grpc_stream_compression_encoding_mdelem(
@ -41,8 +48,8 @@ grpc_mdelem grpc_stream_compression_encoding_mdelem(
/** Find compression algorithm based on passed in mdstr - returns
* GRPC_COMPRESS_ALGORITHM_COUNT on failure */
grpc_compression_algorithm grpc_compression_algorithm_from_slice(
grpc_slice str);
grpc_message_compression_algorithm
grpc_message_compression_algorithm_from_slice(grpc_slice str);
/** Find stream compression algorithm based on passed in mdstr - returns
* GRPC_STREAM_COMPRESS_ALGORITHM_COUNT on failure */

@ -23,40 +23,40 @@
#include <grpc/support/useful.h>
#include "src/core/lib/compression/algorithm_metadata.h"
#include "src/core/lib/compression/compression_internal.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/transport/static_metadata.h"
int grpc_compression_algorithm_is_message(
grpc_compression_algorithm algorithm) {
return (algorithm >= GRPC_COMPRESS_MESSAGE_DEFLATE &&
algorithm <= GRPC_COMPRESS_MESSAGE_GZIP)
? 1
: 0;
}
int grpc_compression_algorithm_is_stream(grpc_compression_algorithm algorithm) {
return (algorithm == GRPC_COMPRESS_STREAM_GZIP) ? 1 : 0;
}
int grpc_compression_algorithm_parse(grpc_slice name,
grpc_compression_algorithm* algorithm) {
/* we use strncmp not only because it's safer (even though in this case it
* doesn't matter, given that we are comparing against string literals, but
* because this way we needn't have "name" nil-terminated (useful for slice
* data, for example) */
if (grpc_slice_eq(name, GRPC_MDSTR_IDENTITY)) {
*algorithm = GRPC_COMPRESS_NONE;
return 1;
} else if (grpc_slice_eq(name, GRPC_MDSTR_GZIP)) {
*algorithm = GRPC_COMPRESS_GZIP;
return 1;
} else if (grpc_slice_eq(name, GRPC_MDSTR_DEFLATE)) {
*algorithm = GRPC_COMPRESS_DEFLATE;
} else if (grpc_slice_eq(name, GRPC_MDSTR_MESSAGE_SLASH_DEFLATE)) {
*algorithm = GRPC_COMPRESS_MESSAGE_DEFLATE;
return 1;
} else {
return 0;
}
}
int grpc_stream_compression_algorithm_parse(
grpc_slice name, grpc_stream_compression_algorithm* algorithm) {
if (grpc_slice_eq(name, GRPC_MDSTR_IDENTITY)) {
*algorithm = GRPC_STREAM_COMPRESS_NONE;
} else if (grpc_slice_eq(name, GRPC_MDSTR_MESSAGE_SLASH_GZIP)) {
*algorithm = GRPC_COMPRESS_MESSAGE_GZIP;
return 1;
} else if (grpc_slice_eq(name, GRPC_MDSTR_GZIP)) {
*algorithm = GRPC_STREAM_COMPRESS_GZIP;
} 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(grpc_compression_algorithm algorithm,
@ -67,113 +67,49 @@ int grpc_compression_algorithm_name(grpc_compression_algorithm algorithm,
case GRPC_COMPRESS_NONE:
*name = "identity";
return 1;
case GRPC_COMPRESS_DEFLATE:
*name = "deflate";
return 1;
case GRPC_COMPRESS_GZIP:
*name = "gzip";
case GRPC_COMPRESS_MESSAGE_DEFLATE:
*name = "message/deflate";
return 1;
case GRPC_COMPRESS_ALGORITHMS_COUNT:
return 0;
}
return 0;
}
int grpc_stream_compression_algorithm_name(
grpc_stream_compression_algorithm algorithm, const char** name) {
GRPC_API_TRACE(
"grpc_stream_compression_algorithm_parse(algorithm=%d, name=%p)", 2,
((int)algorithm, name));
switch (algorithm) {
case GRPC_STREAM_COMPRESS_NONE:
*name = "identity";
case GRPC_COMPRESS_MESSAGE_GZIP:
*name = "message/gzip";
return 1;
case GRPC_STREAM_COMPRESS_GZIP:
*name = "gzip";
case GRPC_COMPRESS_STREAM_GZIP:
*name = "stream/gzip";
return 1;
case GRPC_STREAM_COMPRESS_ALGORITHMS_COUNT:
case GRPC_COMPRESS_ALGORITHMS_COUNT:
return 0;
}
return 0;
}
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_DEFLATE)) return GRPC_COMPRESS_DEFLATE;
if (grpc_slice_eq(str, GRPC_MDSTR_GZIP)) return GRPC_COMPRESS_GZIP;
return GRPC_COMPRESS_ALGORITHMS_COUNT;
}
grpc_stream_compression_algorithm grpc_stream_compression_algorithm_from_slice(
grpc_slice str) {
if (grpc_slice_eq(str, GRPC_MDSTR_IDENTITY)) return GRPC_STREAM_COMPRESS_NONE;
if (grpc_slice_eq(str, GRPC_MDSTR_GZIP)) return GRPC_STREAM_COMPRESS_GZIP;
return GRPC_STREAM_COMPRESS_ALGORITHMS_COUNT;
}
grpc_slice grpc_compression_algorithm_slice(
grpc_compression_algorithm algorithm) {
switch (algorithm) {
case GRPC_COMPRESS_NONE:
return GRPC_MDSTR_IDENTITY;
case GRPC_COMPRESS_DEFLATE:
return GRPC_MDSTR_DEFLATE;
case GRPC_COMPRESS_GZIP:
return GRPC_MDSTR_GZIP;
case GRPC_COMPRESS_ALGORITHMS_COUNT:
return grpc_empty_slice();
}
return grpc_empty_slice();
}
grpc_slice grpc_stream_compression_algorithm_slice(
grpc_stream_compression_algorithm algorithm) {
switch (algorithm) {
case GRPC_STREAM_COMPRESS_NONE:
return GRPC_MDSTR_IDENTITY;
case GRPC_STREAM_COMPRESS_GZIP:
return GRPC_MDSTR_GZIP;
case GRPC_STREAM_COMPRESS_ALGORITHMS_COUNT:
return grpc_empty_slice();
}
return grpc_empty_slice();
}
grpc_mdelem grpc_compression_encoding_mdelem(
grpc_compression_algorithm algorithm) {
switch (algorithm) {
case GRPC_COMPRESS_NONE:
return GRPC_MDELEM_GRPC_ENCODING_IDENTITY;
case GRPC_COMPRESS_DEFLATE:
return GRPC_MDELEM_GRPC_ENCODING_DEFLATE;
case GRPC_COMPRESS_GZIP:
return GRPC_MDELEM_GRPC_ENCODING_GZIP;
default:
break;
}
return GRPC_MDNULL;
}
grpc_mdelem grpc_stream_compression_encoding_mdelem(
grpc_stream_compression_algorithm algorithm) {
switch (algorithm) {
case GRPC_STREAM_COMPRESS_NONE:
return GRPC_MDELEM_CONTENT_ENCODING_IDENTITY;
case GRPC_STREAM_COMPRESS_GZIP:
return GRPC_MDELEM_CONTENT_ENCODING_GZIP;
default:
break;
grpc_compression_algorithm grpc_compression_algorithm_for_level(
grpc_compression_level level, uint32_t accepted_encodings) {
grpc_compression_algorithm algo;
if (level == GRPC_COMPRESS_LEVEL_NONE) {
return GRPC_COMPRESS_NONE;
} else if (level <= GRPC_COMPRESS_LEVEL_HIGH) {
// TODO(mxyan): Design algorithm to select from all algorithms, including
// stream compression algorithm
if (!grpc_compression_algorithm_from_message_stream_compression_algorithm(
&algo,
grpc_message_compression_algorithm_for_level(
level,
grpc_compression_bitset_to_message_bitset(accepted_encodings)),
static_cast<grpc_stream_compression_algorithm>(0))) {
gpr_log(GPR_ERROR, "Parse compression level error");
return GRPC_COMPRESS_NONE;
}
return algo;
} else {
gpr_log(GPR_ERROR, "Unknown compression level: %d", level);
return GRPC_COMPRESS_NONE;
}
return GRPC_MDNULL;
}
void grpc_compression_options_init(grpc_compression_options* opts) {
memset(opts, 0, sizeof(*opts));
/* all enabled by default */
opts->enabled_algorithms_bitset = (1u << GRPC_COMPRESS_ALGORITHMS_COUNT) - 1;
opts->enabled_stream_compression_algorithms_bitset =
(1u << GRPC_STREAM_COMPRESS_ALGORITHMS_COUNT) - 1;
}
void grpc_compression_options_enable_algorithm(
@ -192,92 +128,48 @@ int grpc_compression_options_is_algorithm_enabled(
return GPR_BITGET(opts->enabled_algorithms_bitset, algorithm);
}
int grpc_compression_options_is_stream_compression_algorithm_enabled(
const grpc_compression_options* opts,
grpc_stream_compression_algorithm algorithm) {
return GPR_BITGET(opts->enabled_stream_compression_algorithms_bitset,
algorithm);
}
/* TODO(dgq): Add the ability to specify parameters to the individual
* compression algorithms */
grpc_compression_algorithm grpc_compression_algorithm_for_level(
grpc_compression_level level, uint32_t accepted_encodings) {
GRPC_API_TRACE("grpc_compression_algorithm_for_level(level=%d)", 1,
((int)level));
if (level > GRPC_COMPRESS_LEVEL_HIGH) {
gpr_log(GPR_ERROR, "Unknown compression level %d.", (int)level);
abort();
}
const size_t num_supported =
GPR_BITCOUNT(accepted_encodings) - 1; /* discard NONE */
if (level == GRPC_COMPRESS_LEVEL_NONE || num_supported == 0) {
return GRPC_COMPRESS_NONE;
}
GPR_ASSERT(level > 0);
/* Establish a "ranking" or compression algorithms in increasing order of
* compression.
* This is simplistic and we will probably want to introduce other dimensions
* in the future (cpu/memory cost, etc). */
const grpc_compression_algorithm algos_ranking[] = {GRPC_COMPRESS_GZIP,
GRPC_COMPRESS_DEFLATE};
/* intersect algos_ranking with the supported ones keeping the ranked order */
grpc_compression_algorithm
sorted_supported_algos[GRPC_COMPRESS_ALGORITHMS_COUNT];
size_t algos_supported_idx = 0;
for (size_t i = 0; i < GPR_ARRAY_SIZE(algos_ranking); i++) {
const grpc_compression_algorithm alg = algos_ranking[i];
for (size_t j = 0; j < num_supported; j++) {
if (GPR_BITGET(accepted_encodings, alg) == 1) {
/* if \a alg in supported */
sorted_supported_algos[algos_supported_idx++] = alg;
break;
}
}
if (algos_supported_idx == num_supported) break;
grpc_slice grpc_compression_algorithm_slice(
grpc_compression_algorithm algorithm) {
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_STREAM_GZIP:
return GRPC_MDSTR_STREAM_SLASH_GZIP;
case GRPC_COMPRESS_ALGORITHMS_COUNT:
return grpc_empty_slice();
}
switch (level) {
case GRPC_COMPRESS_LEVEL_NONE:
abort(); /* should have been handled already */
case GRPC_COMPRESS_LEVEL_LOW:
return sorted_supported_algos[0];
case GRPC_COMPRESS_LEVEL_MED:
return sorted_supported_algos[num_supported / 2];
case GRPC_COMPRESS_LEVEL_HIGH:
return sorted_supported_algos[num_supported - 1];
default:
abort();
};
return grpc_empty_slice();
}
GRPCAPI grpc_stream_compression_algorithm
grpc_stream_compression_algorithm_for_level(
grpc_stream_compression_level level, uint32_t accepted_stream_encodings) {
GRPC_API_TRACE("grpc_stream_compression_algorithm_for_level(level=%d)", 1,
((int)level));
if (level > GRPC_STREAM_COMPRESS_LEVEL_HIGH) {
gpr_log(GPR_ERROR, "Unknown compression level %d.", (int)level);
abort();
}
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_STREAM_SLASH_GZIP))
return GRPC_COMPRESS_STREAM_GZIP;
return GRPC_COMPRESS_ALGORITHMS_COUNT;
}
switch (level) {
case GRPC_STREAM_COMPRESS_LEVEL_NONE:
return GRPC_STREAM_COMPRESS_NONE;
case GRPC_STREAM_COMPRESS_LEVEL_LOW:
case GRPC_STREAM_COMPRESS_LEVEL_MED:
case GRPC_STREAM_COMPRESS_LEVEL_HIGH:
if (GPR_BITGET(accepted_stream_encodings, GRPC_STREAM_COMPRESS_GZIP) ==
1) {
return GRPC_STREAM_COMPRESS_GZIP;
} else {
return GRPC_STREAM_COMPRESS_NONE;
}
grpc_mdelem grpc_compression_encoding_mdelem(
grpc_compression_algorithm algorithm) {
switch (algorithm) {
case GRPC_COMPRESS_NONE:
return GRPC_MDELEM_GRPC_ENCODING_IDENTITY;
case GRPC_COMPRESS_MESSAGE_DEFLATE:
return GRPC_MDELEM_GRPC_ENCODING_DEFLATE;
case GRPC_COMPRESS_MESSAGE_GZIP:
return GRPC_MDELEM_GRPC_ENCODING_GZIP;
case GRPC_COMPRESS_STREAM_GZIP:
return GRPC_MDELEM_GRPC_ENCODING_GZIP;
default:
abort();
break;
}
return GRPC_MDNULL;
}

@ -0,0 +1,273 @@
/*
*
* Copyright 2015 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 <stdlib.h>
#include <string.h>
#include <grpc/compression.h>
#include <grpc/support/useful.h>
#include "src/core/lib/compression/algorithm_metadata.h"
#include "src/core/lib/compression/compression_internal.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/transport/static_metadata.h"
/* Interfaces related to MD */
grpc_message_compression_algorithm
grpc_message_compression_algorithm_from_slice(grpc_slice str) {
if (grpc_slice_eq(str, GRPC_MDSTR_IDENTITY))
return GRPC_MESSAGE_COMPRESS_NONE;
if (grpc_slice_eq(str, GRPC_MDSTR_DEFLATE))
return GRPC_MESSAGE_COMPRESS_DEFLATE;
if (grpc_slice_eq(str, GRPC_MDSTR_GZIP)) return GRPC_MESSAGE_COMPRESS_GZIP;
return GRPC_MESSAGE_COMPRESS_ALGORITHMS_COUNT;
}
grpc_stream_compression_algorithm grpc_stream_compression_algorithm_from_slice(
grpc_slice str) {
if (grpc_slice_eq(str, GRPC_MDSTR_IDENTITY)) return GRPC_STREAM_COMPRESS_NONE;
if (grpc_slice_eq(str, GRPC_MDSTR_GZIP)) return GRPC_STREAM_COMPRESS_GZIP;
return GRPC_STREAM_COMPRESS_ALGORITHMS_COUNT;
}
grpc_mdelem grpc_message_compression_encoding_mdelem(
grpc_message_compression_algorithm algorithm) {
switch (algorithm) {
case GRPC_MESSAGE_COMPRESS_NONE:
return GRPC_MDELEM_GRPC_ENCODING_IDENTITY;
case GRPC_MESSAGE_COMPRESS_DEFLATE:
return GRPC_MDELEM_GRPC_ENCODING_DEFLATE;
case GRPC_MESSAGE_COMPRESS_GZIP:
return GRPC_MDELEM_GRPC_ENCODING_GZIP;
default:
break;
}
return GRPC_MDNULL;
}
grpc_mdelem grpc_stream_compression_encoding_mdelem(
grpc_stream_compression_algorithm algorithm) {
switch (algorithm) {
case GRPC_STREAM_COMPRESS_NONE:
return GRPC_MDELEM_CONTENT_ENCODING_IDENTITY;
case GRPC_STREAM_COMPRESS_GZIP:
return GRPC_MDELEM_CONTENT_ENCODING_GZIP;
default:
break;
}
return GRPC_MDNULL;
}
/* Interfaces performing transformation between compression algorithms and
* levels. */
grpc_message_compression_algorithm
grpc_compression_algorithm_to_message_compression_algorithm(
grpc_compression_algorithm algo) {
switch (algo) {
case GRPC_COMPRESS_MESSAGE_DEFLATE:
return GRPC_MESSAGE_COMPRESS_DEFLATE;
case GRPC_COMPRESS_MESSAGE_GZIP:
return GRPC_MESSAGE_COMPRESS_GZIP;
default:
return GRPC_MESSAGE_COMPRESS_NONE;
}
}
grpc_stream_compression_algorithm
grpc_compression_algorithm_to_stream_compression_algorithm(
grpc_compression_algorithm algo) {
switch (algo) {
case GRPC_COMPRESS_STREAM_GZIP:
return GRPC_STREAM_COMPRESS_GZIP;
default:
return GRPC_STREAM_COMPRESS_NONE;
}
}
uint32_t grpc_compression_bitset_to_message_bitset(uint32_t bitset) {
return bitset & ((1u << GRPC_MESSAGE_COMPRESS_ALGORITHMS_COUNT) - 1);
}
uint32_t grpc_compression_bitset_to_stream_bitset(uint32_t bitset) {
uint32_t identity = (bitset & 1u);
uint32_t other_bits =
(bitset >> (GRPC_MESSAGE_COMPRESS_ALGORITHMS_COUNT - 1)) &
((1u << GRPC_STREAM_COMPRESS_ALGORITHMS_COUNT) - 2);
return identity | other_bits;
}
uint32_t grpc_compression_bitset_from_message_stream_compression_bitset(
uint32_t message_bitset, uint32_t stream_bitset) {
uint32_t offset_stream_bitset =
(stream_bitset & 1u) |
((stream_bitset & (~1u)) << (GRPC_MESSAGE_COMPRESS_ALGORITHMS_COUNT - 1));
return message_bitset | offset_stream_bitset;
}
int grpc_compression_algorithm_from_message_stream_compression_algorithm(
grpc_compression_algorithm* algorithm,
grpc_message_compression_algorithm message_algorithm,
grpc_stream_compression_algorithm stream_algorithm) {
if (message_algorithm != GRPC_MESSAGE_COMPRESS_NONE &&
stream_algorithm != GRPC_STREAM_COMPRESS_NONE) {
*algorithm = GRPC_COMPRESS_NONE;
return 0;
}
if (message_algorithm == GRPC_MESSAGE_COMPRESS_NONE) {
switch (stream_algorithm) {
case GRPC_STREAM_COMPRESS_NONE:
*algorithm = GRPC_COMPRESS_NONE;
return 1;
case GRPC_STREAM_COMPRESS_GZIP:
*algorithm = GRPC_COMPRESS_STREAM_GZIP;
return 1;
default:
*algorithm = GRPC_COMPRESS_NONE;
return 0;
}
} else {
switch (message_algorithm) {
case GRPC_MESSAGE_COMPRESS_NONE:
*algorithm = GRPC_COMPRESS_NONE;
return 1;
case GRPC_MESSAGE_COMPRESS_DEFLATE:
*algorithm = GRPC_COMPRESS_MESSAGE_DEFLATE;
return 1;
case GRPC_MESSAGE_COMPRESS_GZIP:
*algorithm = GRPC_COMPRESS_MESSAGE_GZIP;
return 1;
default:
*algorithm = GRPC_COMPRESS_NONE;
return 0;
}
}
return 0;
}
/* Interfaces for message compression. */
int grpc_message_compression_algorithm_name(
grpc_message_compression_algorithm algorithm, const char** name) {
GRPC_API_TRACE(
"grpc_message_compression_algorithm_parse(algorithm=%d, name=%p)", 2,
((int)algorithm, name));
switch (algorithm) {
case GRPC_MESSAGE_COMPRESS_NONE:
*name = "identity";
return 1;
case GRPC_MESSAGE_COMPRESS_DEFLATE:
*name = "deflate";
return 1;
case GRPC_MESSAGE_COMPRESS_GZIP:
*name = "gzip";
return 1;
case GRPC_MESSAGE_COMPRESS_ALGORITHMS_COUNT:
return 0;
}
return 0;
}
/* TODO(dgq): Add the ability to specify parameters to the individual
* compression algorithms */
grpc_message_compression_algorithm grpc_message_compression_algorithm_for_level(
grpc_compression_level level, uint32_t accepted_encodings) {
GRPC_API_TRACE("grpc_message_compression_algorithm_for_level(level=%d)", 1,
((int)level));
if (level > GRPC_COMPRESS_LEVEL_HIGH) {
gpr_log(GPR_ERROR, "Unknown message compression level %d.", (int)level);
abort();
}
const size_t num_supported =
GPR_BITCOUNT(accepted_encodings) - 1; /* discard NONE */
if (level == GRPC_COMPRESS_LEVEL_NONE || num_supported == 0) {
return GRPC_MESSAGE_COMPRESS_NONE;
}
GPR_ASSERT(level > 0);
/* Establish a "ranking" or compression algorithms in increasing order of
* compression.
* This is simplistic and we will probably want to introduce other dimensions
* in the future (cpu/memory cost, etc). */
const grpc_message_compression_algorithm algos_ranking[] = {
GRPC_MESSAGE_COMPRESS_GZIP, GRPC_MESSAGE_COMPRESS_DEFLATE};
/* intersect algos_ranking with the supported ones keeping the ranked order */
grpc_message_compression_algorithm
sorted_supported_algos[GRPC_MESSAGE_COMPRESS_ALGORITHMS_COUNT];
size_t algos_supported_idx = 0;
for (size_t i = 0; i < GPR_ARRAY_SIZE(algos_ranking); i++) {
const grpc_message_compression_algorithm alg = algos_ranking[i];
for (size_t j = 0; j < num_supported; j++) {
if (GPR_BITGET(accepted_encodings, alg) == 1) {
/* if \a alg in supported */
sorted_supported_algos[algos_supported_idx++] = alg;
break;
}
}
if (algos_supported_idx == num_supported) break;
}
switch (level) {
case GRPC_COMPRESS_LEVEL_NONE:
abort(); /* should have been handled already */
case GRPC_COMPRESS_LEVEL_LOW:
return sorted_supported_algos[0];
case GRPC_COMPRESS_LEVEL_MED:
return sorted_supported_algos[num_supported / 2];
case GRPC_COMPRESS_LEVEL_HIGH:
return sorted_supported_algos[num_supported - 1];
default:
abort();
};
}
int grpc_message_compression_algorithm_parse(
grpc_slice value, grpc_message_compression_algorithm* algorithm) {
if (grpc_slice_eq(value, GRPC_MDSTR_IDENTITY)) {
*algorithm = GRPC_MESSAGE_COMPRESS_NONE;
return 1;
} else if (grpc_slice_eq(value, GRPC_MDSTR_DEFLATE)) {
*algorithm = GRPC_MESSAGE_COMPRESS_DEFLATE;
return 1;
} else if (grpc_slice_eq(value, GRPC_MDSTR_GZIP)) {
*algorithm = GRPC_MESSAGE_COMPRESS_GZIP;
return 1;
} else {
return 0;
}
return 0;
}
/* Interfaces for stream compression. */
int grpc_stream_compression_algorithm_parse(
grpc_slice value, grpc_stream_compression_algorithm* algorithm) {
if (grpc_slice_eq(value, GRPC_MDSTR_IDENTITY)) {
*algorithm = GRPC_STREAM_COMPRESS_NONE;
return 1;
} else if (grpc_slice_eq(value, GRPC_MDSTR_GZIP)) {
*algorithm = GRPC_STREAM_COMPRESS_GZIP;
return 1;
} else {
return 0;
}
return 0;
}

@ -0,0 +1,86 @@
/*
*
* 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_CORE_LIB_COMPRESSION_COMPRESSION_INTERNAL_H
#define GRPC_CORE_LIB_COMPRESSION_COMPRESSION_INTERNAL_H
#include <grpc/impl/codegen/compression_types.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
GRPC_MESSAGE_COMPRESS_NONE = 0,
GRPC_MESSAGE_COMPRESS_DEFLATE,
GRPC_MESSAGE_COMPRESS_GZIP,
/* TODO(ctiller): snappy */
GRPC_MESSAGE_COMPRESS_ALGORITHMS_COUNT
} grpc_message_compression_algorithm;
/** Stream compresssion algorithms supported by gRPC */
typedef enum {
GRPC_STREAM_COMPRESS_NONE = 0,
GRPC_STREAM_COMPRESS_GZIP,
GRPC_STREAM_COMPRESS_ALGORITHMS_COUNT
} grpc_stream_compression_algorithm;
/* Interfaces performing transformation between compression algorithms and
* levels. */
grpc_message_compression_algorithm
grpc_compression_algorithm_to_message_compression_algorithm(
grpc_compression_algorithm algo);
grpc_stream_compression_algorithm
grpc_compression_algorithm_to_stream_compression_algorithm(
grpc_compression_algorithm algo);
uint32_t grpc_compression_bitset_to_message_bitset(uint32_t bitset);
uint32_t grpc_compression_bitset_to_stream_bitset(uint32_t bitset);
uint32_t grpc_compression_bitset_from_message_stream_compression_bitset(
uint32_t message_bitset, uint32_t stream_bitset);
int grpc_compression_algorithm_from_message_stream_compression_algorithm(
grpc_compression_algorithm* algorithm,
grpc_message_compression_algorithm message_algorithm,
grpc_stream_compression_algorithm stream_algorithm);
/* Interfaces for message compression. */
int grpc_message_compression_algorithm_name(
grpc_message_compression_algorithm algorithm, const char** name);
grpc_message_compression_algorithm grpc_message_compression_algorithm_for_level(
grpc_compression_level level, uint32_t accepted_encodings);
int grpc_message_compression_algorithm_parse(
grpc_slice value, grpc_message_compression_algorithm* algorithm);
/* Interfaces for stream compression. */
int grpc_stream_compression_algorithm_parse(
grpc_slice value, grpc_stream_compression_algorithm* algorithm);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_LIB_COMPRESSION_COMPRESSION_INTERNAL_H */

@ -0,0 +1,66 @@
/*
*
* 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;
}

@ -141,25 +141,25 @@ static int copy(grpc_slice_buffer* input, grpc_slice_buffer* output) {
return 1;
}
static int compress_inner(grpc_compression_algorithm algorithm,
static int compress_inner(grpc_message_compression_algorithm algorithm,
grpc_slice_buffer* input, grpc_slice_buffer* output) {
switch (algorithm) {
case GRPC_COMPRESS_NONE:
case GRPC_MESSAGE_COMPRESS_NONE:
/* the fallback path always needs to be send uncompressed: we simply
rely on that here */
return 0;
case GRPC_COMPRESS_DEFLATE:
case GRPC_MESSAGE_COMPRESS_DEFLATE:
return zlib_compress(input, output, 0);
case GRPC_COMPRESS_GZIP:
case GRPC_MESSAGE_COMPRESS_GZIP:
return zlib_compress(input, output, 1);
case GRPC_COMPRESS_ALGORITHMS_COUNT:
case GRPC_MESSAGE_COMPRESS_ALGORITHMS_COUNT:
break;
}
gpr_log(GPR_ERROR, "invalid compression algorithm %d", algorithm);
return 0;
}
int grpc_msg_compress(grpc_compression_algorithm algorithm,
int grpc_msg_compress(grpc_message_compression_algorithm algorithm,
grpc_slice_buffer* input, grpc_slice_buffer* output) {
if (!compress_inner(algorithm, input, output)) {
copy(input, output);
@ -168,16 +168,16 @@ int grpc_msg_compress(grpc_compression_algorithm algorithm,
return 1;
}
int grpc_msg_decompress(grpc_compression_algorithm algorithm,
int grpc_msg_decompress(grpc_message_compression_algorithm algorithm,
grpc_slice_buffer* input, grpc_slice_buffer* output) {
switch (algorithm) {
case GRPC_COMPRESS_NONE:
case GRPC_MESSAGE_COMPRESS_NONE:
return copy(input, output);
case GRPC_COMPRESS_DEFLATE:
case GRPC_MESSAGE_COMPRESS_DEFLATE:
return zlib_decompress(input, output, 0);
case GRPC_COMPRESS_GZIP:
case GRPC_MESSAGE_COMPRESS_GZIP:
return zlib_decompress(input, output, 1);
case GRPC_COMPRESS_ALGORITHMS_COUNT:
case GRPC_MESSAGE_COMPRESS_ALGORITHMS_COUNT:
break;
}
gpr_log(GPR_ERROR, "invalid compression algorithm %d", algorithm);

@ -19,19 +19,20 @@
#ifndef GRPC_CORE_LIB_COMPRESSION_MESSAGE_COMPRESS_H
#define GRPC_CORE_LIB_COMPRESSION_MESSAGE_COMPRESS_H
#include <grpc/compression.h>
#include <grpc/slice_buffer.h>
#include "src/core/lib/compression/compression_internal.h"
/* compress 'input' to 'output' using 'algorithm'.
On success, appends compressed slices to output and returns 1.
On failure, appends uncompressed slices to output and returns 0. */
int grpc_msg_compress(grpc_compression_algorithm algorithm,
int grpc_msg_compress(grpc_message_compression_algorithm algorithm,
grpc_slice_buffer* input, grpc_slice_buffer* output);
/* decompress 'input' to 'output' using 'algorithm'.
On success, appends slices to output and returns 1.
On failure, output is unchanged, and returns 0. */
int grpc_msg_decompress(grpc_compression_algorithm algorithm,
int grpc_msg_decompress(grpc_message_compression_algorithm algorithm,
grpc_slice_buffer* input, grpc_slice_buffer* output);
#endif /* GRPC_CORE_LIB_COMPRESSION_MESSAGE_COMPRESS_H */

@ -50,48 +50,44 @@ 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;
}
void* gpr_malloc_aligned(size_t size, size_t alignment_log) {
size_t alignment = ((size_t)1) << alignment_log;
void* gpr_malloc_aligned(size_t size, size_t alignment) {
GPR_ASSERT(((alignment - 1) & alignment) == 0); // Must be power of 2.
size_t extra = alignment - 1 + sizeof(void*);
void* p = gpr_malloc(size + extra);
void** ret = (void**)(((uintptr_t)p + extra) & ~(alignment - 1));

@ -17,11 +17,19 @@
*/
#include "src/core/lib/gpr/arena.h"
#include <string.h>
#include <grpc/support/alloc.h>
#include <grpc/support/atm.h>
#include <grpc/support/log.h>
#include <grpc/support/useful.h>
// TODO(roth): We currently assume that all callers need alignment of 16
// bytes, which may be wrong in some cases. As part of converting the
// arena API to C++, we should consider replacing gpr_arena_alloc() with a
// template that takes the type of the value being allocated, which
// would allow us to use the alignment actually needed by the caller.
#define ROUND_UP_TO_ALIGNMENT_SIZE(x) \
(((x) + GPR_MAX_ALIGNMENT - 1u) & ~(GPR_MAX_ALIGNMENT - 1u))
@ -36,9 +44,16 @@ struct gpr_arena {
zone initial_zone;
};
static void* zalloc_aligned(size_t size) {
void* ptr = gpr_malloc_aligned(size, GPR_MAX_ALIGNMENT);
memset(ptr, 0, size);
return ptr;
}
gpr_arena* gpr_arena_create(size_t initial_size) {
initial_size = ROUND_UP_TO_ALIGNMENT_SIZE(initial_size);
gpr_arena* a = (gpr_arena*)gpr_zalloc(sizeof(gpr_arena) + initial_size);
gpr_arena* a = (gpr_arena*)zalloc_aligned(
ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(gpr_arena)) + initial_size);
a->initial_zone.size_end = initial_size;
return a;
}
@ -46,10 +61,10 @@ gpr_arena* gpr_arena_create(size_t initial_size) {
size_t gpr_arena_destroy(gpr_arena* arena) {
gpr_atm size = gpr_atm_no_barrier_load(&arena->size_so_far);
zone* z = (zone*)gpr_atm_no_barrier_load(&arena->initial_zone.next_atm);
gpr_free(arena);
gpr_free_aligned(arena);
while (z) {
zone* next_z = (zone*)gpr_atm_no_barrier_load(&z->next_atm);
gpr_free(z);
gpr_free_aligned(z);
z = next_z;
}
return (size_t)size;
@ -64,11 +79,12 @@ void* gpr_arena_alloc(gpr_arena* arena, size_t size) {
zone* next_z = (zone*)gpr_atm_acq_load(&z->next_atm);
if (next_z == nullptr) {
size_t next_z_size = (size_t)gpr_atm_no_barrier_load(&arena->size_so_far);
next_z = (zone*)gpr_zalloc(sizeof(zone) + next_z_size);
next_z = (zone*)zalloc_aligned(ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(zone)) +
next_z_size);
next_z->size_begin = z->size_end;
next_z->size_end = z->size_end + next_z_size;
if (!gpr_atm_rel_cas(&z->next_atm, (gpr_atm)NULL, (gpr_atm)next_z)) {
gpr_free(next_z);
gpr_free_aligned(next_z);
next_z = (zone*)gpr_atm_acq_load(&z->next_atm);
}
}
@ -79,5 +95,8 @@ void* gpr_arena_alloc(gpr_arena* arena, size_t size) {
}
GPR_ASSERT(start >= z->size_begin);
GPR_ASSERT(start + size <= z->size_end);
return ((char*)(z + 1)) + start - z->size_begin;
char* ptr = (z == &arena->initial_zone)
? (char*)arena + ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(gpr_arena))
: (char*)z + ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(zone));
return ptr + start - z->size_begin;
}

@ -38,18 +38,32 @@ void grpc_fork_support_init() {
fork_support_enabled = 1;
#else
fork_support_enabled = 0;
#endif
bool env_var_set = false;
char* env = gpr_getenv("GRPC_ENABLE_FORK_SUPPORT");
if (env != nullptr) {
static const char* truthy[] = {"yes", "Yes", "YES", "true",
"True", "TRUE", "1"};
static const char* falsey[] = {"no", "No", "NO", "false",
"False", "FALSE", "0"};
for (size_t i = 0; i < GPR_ARRAY_SIZE(truthy); i++) {
if (0 == strcmp(env, truthy[i])) {
fork_support_enabled = 1;
env_var_set = true;
break;
}
}
if (!env_var_set) {
for (size_t i = 0; i < GPR_ARRAY_SIZE(falsey); i++) {
if (0 == strcmp(env, falsey[i])) {
fork_support_enabled = 0;
env_var_set = true;
break;
}
}
}
gpr_free(env);
}
#endif
if (override_fork_support_enabled != -1) {
fork_support_enabled = override_fork_support_enabled;
}

@ -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;
}

@ -40,24 +40,13 @@ namespace grpc_core {
// ANY METHOD ADDED HERE MUST COMPLY WITH THE INTERFACE IN THE absl
// IMPLEMENTATION!
//
// TODO(ctiller, nnoble, roth): Replace this with absl::InlinedVector
// once we integrate absl into the gRPC build system in a usable way.
// TODO(nnoble, roth): Replace this with absl::InlinedVector once we
// integrate absl into the gRPC build system in a usable way.
template <typename T, size_t N>
class InlinedVector {
public:
InlinedVector() {}
~InlinedVector() {
for (size_t i = 0; i < size_ && i < N; ++i) {
T& value = *reinterpret_cast<T*>(inline_ + i);
value.~T();
}
if (size_ > N) { // Avoid subtracting two signed values.
for (size_t i = 0; i < size_ - N; ++i) {
dynamic_[i].~T();
}
}
gpr_free(dynamic_);
}
InlinedVector() { init_data(); }
~InlinedVector() { destroy_elements(); }
// For now, we do not support copying.
InlinedVector(const InlinedVector&) = delete;
@ -72,6 +61,15 @@ class InlinedVector {
}
}
const T& operator[](size_t offset) const {
assert(offset < size_);
if (offset < N) {
return *reinterpret_cast<const T*>(inline_ + offset);
} else {
return dynamic_[offset - N];
}
}
template <typename... Args>
void emplace_back(Args&&... args) {
if (size_ < N) {
@ -100,11 +98,35 @@ class InlinedVector {
size_t size() const { return size_; }
void clear() {
destroy_elements();
init_data();
}
private:
void init_data() {
dynamic_ = nullptr;
size_ = 0;
dynamic_capacity_ = 0;
}
void destroy_elements() {
for (size_t i = 0; i < size_ && i < N; ++i) {
T& value = *reinterpret_cast<T*>(inline_ + i);
value.~T();
}
if (size_ > N) { // Avoid subtracting two signed values.
for (size_t i = 0; i < size_ - N; ++i) {
dynamic_[i].~T();
}
}
gpr_free(dynamic_);
}
typename std::aligned_storage<sizeof(T)>::type inline_[N];
T* dynamic_ = nullptr;
size_t size_ = 0;
size_t dynamic_capacity_ = 0;
T* dynamic_;
size_t size_;
size_t dynamic_capacity_;
};
} // namespace grpc_core

@ -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);
@ -680,7 +676,7 @@ static bool begin_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
pollset->begin_refs++;
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_ERROR, "PS:%p BEGIN_STARTS:%p", pollset, worker);
gpr_log(GPR_DEBUG, "PS:%p BEGIN_STARTS:%p", pollset, worker);
}
if (pollset->seen_inactive) {
@ -699,7 +695,7 @@ static bool begin_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
gpr_mu_lock(&neighborhood->mu);
gpr_mu_lock(&pollset->mu);
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_ERROR, "PS:%p BEGIN_REORG:%p kick_state=%s is_reassigning=%d",
gpr_log(GPR_DEBUG, "PS:%p BEGIN_REORG:%p kick_state=%s is_reassigning=%d",
pollset, worker, kick_state_string(worker->state),
is_reassigning);
}
@ -751,7 +747,7 @@ static bool begin_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
gpr_cv_init(&worker->cv);
while (worker->state == UNKICKED && !pollset->shutting_down) {
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_ERROR, "PS:%p BEGIN_WAIT:%p kick_state=%s shutdown=%d",
gpr_log(GPR_DEBUG, "PS:%p BEGIN_WAIT:%p kick_state=%s shutdown=%d",
pollset, worker, kick_state_string(worker->state),
pollset->shutting_down);
}
@ -768,7 +764,7 @@ static bool begin_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
}
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_ERROR,
gpr_log(GPR_DEBUG,
"PS:%p BEGIN_DONE:%p kick_state=%s shutdown=%d "
"kicked_without_poller: %d",
pollset, worker, kick_state_string(worker->state),
@ -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()) {
@ -1019,7 +1009,7 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
}
tmp = gpr_strvec_flatten(&log, nullptr);
gpr_strvec_destroy(&log);
gpr_log(GPR_ERROR, "%s", tmp);
gpr_log(GPR_DEBUG, "%s", tmp);
gpr_free(tmp);
}
@ -1030,7 +1020,7 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
GRPC_STATS_INC_POLLSET_KICKED_WITHOUT_POLLER();
pollset->kicked_without_poller = true;
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_ERROR, " .. kicked_without_poller");
gpr_log(GPR_DEBUG, " .. kicked_without_poller");
}
goto done;
}
@ -1038,14 +1028,14 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
if (root_worker->state == KICKED) {
GRPC_STATS_INC_POLLSET_KICKED_AGAIN();
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_ERROR, " .. already kicked %p", root_worker);
gpr_log(GPR_DEBUG, " .. already kicked %p", root_worker);
}
SET_KICK_STATE(root_worker, KICKED);
goto done;
} else if (next_worker->state == KICKED) {
GRPC_STATS_INC_POLLSET_KICKED_AGAIN();
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_ERROR, " .. already kicked %p", next_worker);
gpr_log(GPR_DEBUG, " .. already kicked %p", next_worker);
}
SET_KICK_STATE(next_worker, KICKED);
goto done;
@ -1056,7 +1046,7 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
&g_active_poller)) {
GRPC_STATS_INC_POLLSET_KICK_WAKEUP_FD();
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_ERROR, " .. kicked %p", root_worker);
gpr_log(GPR_DEBUG, " .. kicked %p", root_worker);
}
SET_KICK_STATE(root_worker, KICKED);
ret_err = grpc_wakeup_fd_wakeup(&global_wakeup_fd);
@ -1064,7 +1054,7 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
} else if (next_worker->state == UNKICKED) {
GRPC_STATS_INC_POLLSET_KICK_WAKEUP_CV();
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_ERROR, " .. kicked %p", next_worker);
gpr_log(GPR_DEBUG, " .. kicked %p", next_worker);
}
GPR_ASSERT(next_worker->initialized_cv);
SET_KICK_STATE(next_worker, KICKED);
@ -1074,7 +1064,7 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
if (root_worker->state != DESIGNATED_POLLER) {
if (grpc_polling_trace.enabled()) {
gpr_log(
GPR_ERROR,
GPR_DEBUG,
" .. kicked root non-poller %p (initialized_cv=%d) (poller=%p)",
root_worker, root_worker->initialized_cv, next_worker);
}
@ -1087,7 +1077,7 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
} else {
GRPC_STATS_INC_POLLSET_KICK_WAKEUP_FD();
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_ERROR, " .. non-root poller %p (root=%p)", next_worker,
gpr_log(GPR_DEBUG, " .. non-root poller %p (root=%p)", next_worker,
root_worker);
}
SET_KICK_STATE(next_worker, KICKED);
@ -1103,7 +1093,7 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
} else {
GRPC_STATS_INC_POLLSET_KICK_OWN_THREAD();
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_ERROR, " .. kicked while waking up");
gpr_log(GPR_DEBUG, " .. kicked while waking up");
}
goto done;
}
@ -1113,14 +1103,14 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
if (specific_worker->state == KICKED) {
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_ERROR, " .. specific worker already kicked");
gpr_log(GPR_DEBUG, " .. specific worker already kicked");
}
goto done;
} else if (gpr_tls_get(&g_current_thread_worker) ==
(intptr_t)specific_worker) {
GRPC_STATS_INC_POLLSET_KICK_OWN_THREAD();
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_ERROR, " .. mark %p kicked", specific_worker);
gpr_log(GPR_DEBUG, " .. mark %p kicked", specific_worker);
}
SET_KICK_STATE(specific_worker, KICKED);
goto done;
@ -1128,7 +1118,7 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
(grpc_pollset_worker*)gpr_atm_no_barrier_load(&g_active_poller)) {
GRPC_STATS_INC_POLLSET_KICK_WAKEUP_FD();
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_ERROR, " .. kick active poller");
gpr_log(GPR_DEBUG, " .. kick active poller");
}
SET_KICK_STATE(specific_worker, KICKED);
ret_err = grpc_wakeup_fd_wakeup(&global_wakeup_fd);
@ -1136,7 +1126,7 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
} else if (specific_worker->initialized_cv) {
GRPC_STATS_INC_POLLSET_KICK_WAKEUP_CV();
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_ERROR, " .. kick waiting worker");
gpr_log(GPR_DEBUG, " .. kick waiting worker");
}
SET_KICK_STATE(specific_worker, KICKED);
gpr_cv_signal(&specific_worker->cv);
@ -1144,13 +1134,12 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
} else {
GRPC_STATS_INC_POLLSET_KICKED_AGAIN();
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_ERROR, " .. kick non-waiting worker");
gpr_log(GPR_DEBUG, " .. kick non-waiting worker");
}
SET_KICK_STATE(specific_worker, KICKED);
goto done;
}
done:
GPR_TIMER_END("pollset_kick", 0);
return ret_err;
}

@ -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);
}

@ -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) {

@ -706,14 +706,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 +722,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 +768,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 +862,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 +878,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 +920,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 +1036,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 +1095,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;
}

@ -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 */

@ -266,7 +266,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;
@ -332,14 +332,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) {

@ -122,13 +122,13 @@ static const grpc_slice_refcount_vtable interned_slice_sub_vtable = {
grpc_slice_default_eq_impl, grpc_slice_default_hash_impl};
static void grow_shard(slice_shard* shard) {
GPR_TIMER_SCOPE("grow_strtab", 0);
size_t capacity = shard->capacity * 2;
size_t i;
interned_slice_refcount** strtab;
interned_slice_refcount *s, *next;
GPR_TIMER_BEGIN("grow_strtab", 0);
strtab = (interned_slice_refcount**)gpr_zalloc(
sizeof(interned_slice_refcount*) * capacity);
@ -140,12 +140,9 @@ static void grow_shard(slice_shard* shard) {
strtab[idx] = s;
}
}
gpr_free(shard->strs);
shard->strs = strtab;
shard->capacity = capacity;
GPR_TIMER_END("grow_strtab", 0);
}
static grpc_slice materialize(interned_slice_refcount* s) {
@ -200,9 +197,8 @@ bool grpc_slice_is_interned(grpc_slice slice) {
}
grpc_slice grpc_slice_intern(grpc_slice slice) {
GPR_TIMER_BEGIN("grpc_slice_intern", 0);
GPR_TIMER_SCOPE("grpc_slice_intern", 0);
if (GRPC_IS_STATIC_METADATA_STRING(slice)) {
GPR_TIMER_END("grpc_slice_intern", 0);
return slice;
}
@ -212,7 +208,6 @@ grpc_slice grpc_slice_intern(grpc_slice slice) {
static_metadata_hash[(hash + i) % GPR_ARRAY_SIZE(static_metadata_hash)];
if (ent.hash == hash && ent.idx < GRPC_STATIC_MDSTR_COUNT &&
grpc_slice_eq(grpc_static_slice_table[ent.idx], slice)) {
GPR_TIMER_END("grpc_slice_intern", 0);
return grpc_static_slice_table[ent.idx];
}
}
@ -235,7 +230,6 @@ grpc_slice grpc_slice_intern(grpc_slice slice) {
/* and treat this as if we were never here... sshhh */
} else {
gpr_mu_unlock(&shard->mu);
GPR_TIMER_END("grpc_slice_intern", 0);
return materialize(s);
}
}
@ -264,7 +258,6 @@ grpc_slice grpc_slice_intern(grpc_slice slice) {
gpr_mu_unlock(&shard->mu);
GPR_TIMER_END("grpc_slice_intern", 0);
return materialize(s);
}

@ -56,24 +56,59 @@ static int slice_find_separator_offset(const grpc_slice str, const char* sep,
return 0;
}
void grpc_slice_split(grpc_slice str, const char* sep, grpc_slice_buffer* dst) {
static void skip_leading_trailing_spaces(const uint8_t* str_buffer,
size_t* begin, size_t* end) {
while (*begin < *end && str_buffer[*begin] == ' ') {
(*begin)++;
}
while (*begin < *end && str_buffer[*end - 1] == ' ') {
(*end)--;
}
}
static void grpc_slice_split_inner(grpc_slice str, const char* sep,
grpc_slice_buffer* dst, bool no_space) {
const size_t sep_len = strlen(sep);
size_t begin, end;
const uint8_t* str_buffer = GRPC_SLICE_START_PTR(str);
size_t sep_pos;
GPR_ASSERT(sep_len > 0);
if (slice_find_separator_offset(str, sep, 0, &begin, &end) != 0) {
do {
sep_pos = end;
if (no_space) {
skip_leading_trailing_spaces(str_buffer, &begin, &end);
}
grpc_slice_buffer_add_indexed(dst, grpc_slice_sub(str, begin, end));
} while (slice_find_separator_offset(str, sep, end + sep_len, &begin,
} while (slice_find_separator_offset(str, sep, sep_pos + sep_len, &begin,
&end) != 0);
grpc_slice_buffer_add_indexed(
dst, grpc_slice_sub(str, end + sep_len, GRPC_SLICE_LENGTH(str)));
begin = sep_pos + sep_len;
end = GRPC_SLICE_LENGTH(str);
if (no_space) {
skip_leading_trailing_spaces(str_buffer, &begin, &end);
}
grpc_slice_buffer_add_indexed(dst, grpc_slice_sub(str, begin, end));
} else { /* no sep found, add whole input */
grpc_slice_buffer_add_indexed(dst, grpc_slice_ref_internal(str));
begin = 0;
end = GRPC_SLICE_LENGTH(str);
if (no_space) {
skip_leading_trailing_spaces(str_buffer, &begin, &end);
}
grpc_slice_buffer_add_indexed(dst, grpc_slice_sub(str, begin, end));
}
}
void grpc_slice_split(grpc_slice str, const char* sep, grpc_slice_buffer* dst) {
grpc_slice_split_inner(str, sep, dst, false);
}
void grpc_slice_split_without_space(grpc_slice str, const char* sep,
grpc_slice_buffer* dst) {
grpc_slice_split_inner(str, sep, dst, true);
}
bool grpc_parse_slice_to_uint32(grpc_slice str, uint32_t* result) {
return gpr_parse_bytes_to_uint32((const char*)GRPC_SLICE_START_PTR(str),
GRPC_SLICE_LENGTH(str), result) != 0;

@ -35,6 +35,12 @@ char* grpc_dump_slice(grpc_slice slice, uint32_t flags);
* should be a properly initialized instance. */
void grpc_slice_split(grpc_slice str, const char* sep, grpc_slice_buffer* dst);
/** Split \a str by the separator \a sep and remove the leading and trailing
* spaces of each resulting token. Results are stored in \a dst, which should be
* a properly initialized instance. */
void grpc_slice_split_without_space(grpc_slice str, const char* sep,
grpc_slice_buffer* dst);
bool grpc_parse_slice_to_uint32(grpc_slice str, uint32_t* result);
#endif /* GRPC_CORE_LIB_SLICE_SLICE_STRING_HELPERS_H */

@ -49,9 +49,12 @@ int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader,
case GRPC_BB_RAW:
grpc_slice_buffer_init(&decompressed_slices_buffer);
if (is_compressed(reader->buffer_in)) {
if (grpc_msg_decompress(reader->buffer_in->data.raw.compression,
&reader->buffer_in->data.raw.slice_buffer,
&decompressed_slices_buffer) == 0) {
if (grpc_msg_decompress(
grpc_compression_algorithm_to_message_compression_algorithm(
reader->buffer_in->data.raw.compression),
&reader->buffer_in->data.raw.slice_buffer,
&decompressed_slices_buffer) == 0) {
gpr_log(GPR_ERROR,
"Unexpected error decompressing data for algorithm with enum "
"value '%d'.",

@ -201,7 +201,7 @@ struct grpc_call {
grpc_call_final_info final_info;
/* Compression algorithm for *incoming* data */
grpc_compression_algorithm incoming_compression_algorithm;
grpc_message_compression_algorithm incoming_message_compression_algorithm;
/* Stream compression algorithm for *incoming* data */
grpc_stream_compression_algorithm incoming_stream_compression_algorithm;
/* Supported encodings (compression algorithms), a bitset */
@ -321,12 +321,12 @@ static parent_call* get_parent_call(grpc_call* call) {
grpc_error* grpc_call_create(const grpc_call_create_args* args,
grpc_call** out_call) {
GPR_TIMER_SCOPE("grpc_call_create", 0);
size_t i, j;
grpc_error* error = GRPC_ERROR_NONE;
grpc_channel_stack* channel_stack =
grpc_channel_get_channel_stack(args->channel);
grpc_call* call;
GPR_TIMER_BEGIN("grpc_call_create", 0);
size_t initial_size = grpc_channel_get_call_size_estimate(args->channel);
GRPC_STATS_INC_CALL_INITIAL_SIZE(initial_size);
gpr_arena* arena = gpr_arena_create(initial_size);
@ -340,7 +340,7 @@ grpc_error* grpc_call_create(const grpc_call_create_args* args,
call->cq = args->cq;
call->start_time = gpr_now(GPR_CLOCK_MONOTONIC);
/* Always support no compression */
GPR_BITSET(&call->encodings_accepted_by_peer, GRPC_COMPRESS_NONE);
GPR_BITSET(&call->encodings_accepted_by_peer, GRPC_MESSAGE_COMPRESS_NONE);
call->is_client = args->server_transport_data == nullptr;
if (call->is_client) {
GRPC_STATS_INC_CLIENT_CALLS_CREATED();
@ -449,9 +449,9 @@ grpc_error* grpc_call_create(const grpc_call_create_args* args,
cancel_with_error(call, STATUS_FROM_API_OVERRIDE, GRPC_ERROR_CANCELLED);
}
if (args->cq != nullptr) {
GPR_ASSERT(
args->pollset_set_alternative == nullptr &&
"Only one of 'cq' and 'pollset_set_alternative' should be non-NULL.");
GPR_ASSERT(args->pollset_set_alternative == nullptr &&
"Only one of 'cq' and 'pollset_set_alternative' should be "
"non-nullptr.");
GRPC_CQ_INTERNAL_REF(args->cq, "bind");
call->pollent =
grpc_polling_entity_create_from_pollset(grpc_cq_pollset(args->cq));
@ -467,7 +467,6 @@ grpc_error* grpc_call_create(const grpc_call_create_args* args,
grpc_slice_unref_internal(path);
GPR_TIMER_END("grpc_call_create", 0);
return error;
}
@ -511,10 +510,10 @@ static void release_call(void* call, grpc_error* error) {
static void set_status_value_directly(grpc_status_code status, void* dest);
static void destroy_call(void* call, grpc_error* error) {
GPR_TIMER_SCOPE("destroy_call", 0);
size_t i;
int ii;
grpc_call* c = (grpc_call*)call;
GPR_TIMER_BEGIN("destroy_call", 0);
for (i = 0; i < 2; i++) {
grpc_metadata_batch_destroy(
&c->metadata_batch[1 /* is_receiving */][i /* is_initial */]);
@ -551,7 +550,6 @@ static void destroy_call(void* call, grpc_error* error) {
grpc_call_stack_destroy(CALL_STACK_FROM_CALL(c), &c->final_info,
GRPC_CLOSURE_INIT(&c->release_call, release_call, c,
grpc_schedule_on_exec_ctx));
GPR_TIMER_END("destroy_call", 0);
}
void grpc_call_ref(grpc_call* c) { gpr_ref(&c->ext_ref); }
@ -559,10 +557,11 @@ void grpc_call_ref(grpc_call* c) { gpr_ref(&c->ext_ref); }
void grpc_call_unref(grpc_call* c) {
if (!gpr_unref(&c->ext_ref)) return;
GPR_TIMER_SCOPE("grpc_call_unref", 0);
child_call* cc = c->child;
grpc_core::ExecCtx exec_ctx;
GPR_TIMER_BEGIN("grpc_call_unref", 0);
GRPC_API_TRACE("grpc_call_unref(c=%p)", 1, (c));
if (cc) {
@ -594,8 +593,6 @@ void grpc_call_unref(grpc_call* c) {
grpc_call_combiner_set_notify_on_cancel(&c->call_combiner, nullptr);
}
GRPC_CALL_INTERNAL_UNREF(c, "destroy");
GPR_TIMER_END("grpc_call_unref", 0);
}
grpc_call_error grpc_call_cancel(grpc_call* call, void* reserved) {
@ -610,13 +607,12 @@ grpc_call_error grpc_call_cancel(grpc_call* call, void* reserved) {
// This is called via the call combiner to start sending a batch down
// the filter stack.
static void execute_batch_in_call_combiner(void* arg, grpc_error* ignored) {
GPR_TIMER_SCOPE("execute_batch", 0);
grpc_transport_stream_op_batch* batch = (grpc_transport_stream_op_batch*)arg;
grpc_call* call = (grpc_call*)batch->handler_private.extra_arg;
GPR_TIMER_BEGIN("execute_batch", 0);
grpc_call_element* elem = CALL_ELEM_FROM_CALL(call, 0);
GRPC_CALL_LOG_OP(GPR_INFO, elem, batch);
elem->filter->start_transport_stream_op_batch(elem, batch);
GPR_TIMER_END("execute_batch", 0);
}
// start_batch_closure points to a caller-allocated closure to be used
@ -801,10 +797,10 @@ static void set_status_from_error(grpc_call* call, status_source source,
* COMPRESSION
*/
static void set_incoming_compression_algorithm(
grpc_call* call, grpc_compression_algorithm algo) {
GPR_ASSERT(algo < GRPC_COMPRESS_ALGORITHMS_COUNT);
call->incoming_compression_algorithm = algo;
static void set_incoming_message_compression_algorithm(
grpc_call* call, grpc_message_compression_algorithm algo) {
GPR_ASSERT(algo < GRPC_MESSAGE_COMPRESS_ALGORITHMS_COUNT);
call->incoming_message_compression_algorithm = algo;
}
static void set_incoming_stream_compression_algorithm(
@ -815,8 +811,10 @@ static void set_incoming_stream_compression_algorithm(
grpc_compression_algorithm grpc_call_test_only_get_compression_algorithm(
grpc_call* call) {
grpc_compression_algorithm algorithm;
algorithm = call->incoming_compression_algorithm;
grpc_compression_algorithm algorithm = GRPC_COMPRESS_NONE;
grpc_compression_algorithm_from_message_stream_compression_algorithm(
&algorithm, call->incoming_message_compression_algorithm,
call->incoming_stream_compression_algorithm);
return algorithm;
}
@ -826,13 +824,6 @@ static grpc_compression_algorithm compression_algorithm_for_level_locked(
call->encodings_accepted_by_peer);
}
static grpc_stream_compression_algorithm
stream_compression_algorithm_for_level_locked(
grpc_call* call, grpc_stream_compression_level level) {
return grpc_stream_compression_algorithm_for_level(
level, call->stream_encodings_accepted_by_peer);
}
uint32_t grpc_call_test_only_get_message_flags(grpc_call* call) {
uint32_t flags;
flags = call->test_only_last_message_flags;
@ -841,9 +832,11 @@ uint32_t grpc_call_test_only_get_message_flags(grpc_call* call) {
static void destroy_encodings_accepted_by_peer(void* p) { return; }
static void set_encodings_accepted_by_peer(grpc_call* call, grpc_mdelem mdel) {
static void set_encodings_accepted_by_peer(grpc_call* call, grpc_mdelem mdel,
uint32_t* encodings_accepted_by_peer,
bool stream_encoding) {
size_t i;
grpc_compression_algorithm algorithm;
uint32_t algorithm;
grpc_slice_buffer accept_encoding_parts;
grpc_slice accept_encoding_slice;
void* accepted_user_data;
@ -851,69 +844,33 @@ static void set_encodings_accepted_by_peer(grpc_call* call, grpc_mdelem mdel) {
accepted_user_data =
grpc_mdelem_get_user_data(mdel, destroy_encodings_accepted_by_peer);
if (accepted_user_data != nullptr) {
call->encodings_accepted_by_peer =
*encodings_accepted_by_peer =
(uint32_t)(((uintptr_t)accepted_user_data) - 1);
return;
}
*encodings_accepted_by_peer = 0;
accept_encoding_slice = GRPC_MDVALUE(mdel);
grpc_slice_buffer_init(&accept_encoding_parts);
grpc_slice_split(accept_encoding_slice, ",", &accept_encoding_parts);
grpc_slice_split_without_space(accept_encoding_slice, ",",
&accept_encoding_parts);
/* No need to zero call->encodings_accepted_by_peer: grpc_call_create already
* zeroes the whole grpc_call */
/* Always support no compression */
GPR_BITSET(&call->encodings_accepted_by_peer, GRPC_COMPRESS_NONE);
GPR_BITSET(encodings_accepted_by_peer, GRPC_COMPRESS_NONE);
for (i = 0; i < accept_encoding_parts.count; i++) {
int r;
grpc_slice accept_encoding_entry_slice = accept_encoding_parts.slices[i];
if (grpc_compression_algorithm_parse(accept_encoding_entry_slice,
&algorithm)) {
GPR_BITSET(&call->encodings_accepted_by_peer, algorithm);
if (!stream_encoding) {
r = grpc_message_compression_algorithm_parse(
accept_encoding_entry_slice,
(grpc_message_compression_algorithm*)&algorithm);
} else {
char* accept_encoding_entry_str =
grpc_slice_to_c_string(accept_encoding_entry_slice);
gpr_log(GPR_ERROR,
"Invalid entry in accept encoding metadata: '%s'. Ignoring.",
accept_encoding_entry_str);
gpr_free(accept_encoding_entry_str);
r = grpc_stream_compression_algorithm_parse(
accept_encoding_entry_slice,
(grpc_stream_compression_algorithm*)&algorithm);
}
}
grpc_slice_buffer_destroy_internal(&accept_encoding_parts);
grpc_mdelem_set_user_data(
mdel, destroy_encodings_accepted_by_peer,
(void*)(((uintptr_t)call->encodings_accepted_by_peer) + 1));
}
static void set_stream_encodings_accepted_by_peer(grpc_call* call,
grpc_mdelem mdel) {
size_t i;
grpc_stream_compression_algorithm algorithm;
grpc_slice_buffer accept_encoding_parts;
grpc_slice accept_encoding_slice;
void* accepted_user_data;
accepted_user_data =
grpc_mdelem_get_user_data(mdel, destroy_encodings_accepted_by_peer);
if (accepted_user_data != nullptr) {
call->stream_encodings_accepted_by_peer =
(uint32_t)(((uintptr_t)accepted_user_data) - 1);
return;
}
accept_encoding_slice = GRPC_MDVALUE(mdel);
grpc_slice_buffer_init(&accept_encoding_parts);
grpc_slice_split(accept_encoding_slice, ",", &accept_encoding_parts);
/* Always support no compression */
GPR_BITSET(&call->stream_encodings_accepted_by_peer,
GRPC_STREAM_COMPRESS_NONE);
for (i = 0; i < accept_encoding_parts.count; i++) {
grpc_slice accept_encoding_entry_slice = accept_encoding_parts.slices[i];
if (grpc_stream_compression_algorithm_parse(accept_encoding_entry_slice,
&algorithm)) {
GPR_BITSET(&call->stream_encodings_accepted_by_peer, algorithm);
if (r) {
GPR_BITSET(encodings_accepted_by_peer, algorithm);
} else {
char* accept_encoding_entry_str =
grpc_slice_to_c_string(accept_encoding_entry_slice);
@ -928,7 +885,7 @@ static void set_stream_encodings_accepted_by_peer(grpc_call* call,
grpc_mdelem_set_user_data(
mdel, destroy_encodings_accepted_by_peer,
(void*)(((uintptr_t)call->stream_encodings_accepted_by_peer) + 1));
(void*)(((uintptr_t)(*encodings_accepted_by_peer)) + 1));
}
uint32_t grpc_call_test_only_get_encodings_accepted_by_peer(grpc_call* call) {
@ -937,13 +894,6 @@ uint32_t grpc_call_test_only_get_encodings_accepted_by_peer(grpc_call* call) {
return encodings_accepted_by_peer;
}
uint32_t grpc_call_test_only_get_stream_encodings_accepted_by_peer(
grpc_call* call) {
uint32_t stream_encodings_accepted_by_peer;
stream_encodings_accepted_by_peer = call->stream_encodings_accepted_by_peer;
return stream_encodings_accepted_by_peer;
}
grpc_stream_compression_algorithm
grpc_call_test_only_get_incoming_stream_encodings(grpc_call* call) {
return call->incoming_stream_compression_algorithm;
@ -1047,17 +997,18 @@ static uint32_t decode_status(grpc_mdelem md) {
return status;
}
static grpc_compression_algorithm decode_compression(grpc_mdelem md) {
grpc_compression_algorithm algorithm =
grpc_compression_algorithm_from_slice(GRPC_MDVALUE(md));
if (algorithm == GRPC_COMPRESS_ALGORITHMS_COUNT) {
static grpc_message_compression_algorithm decode_message_compression(
grpc_mdelem md) {
grpc_message_compression_algorithm algorithm =
grpc_message_compression_algorithm_from_slice(GRPC_MDVALUE(md));
if (algorithm == GRPC_MESSAGE_COMPRESS_ALGORITHMS_COUNT) {
char* md_c_str = grpc_slice_to_c_string(GRPC_MDVALUE(md));
gpr_log(GPR_ERROR,
"Invalid incoming compression algorithm: '%s'. Interpreting "
"incoming data as uncompressed.",
"Invalid incoming message compression algorithm: '%s'. "
"Interpreting incoming data as uncompressed.",
md_c_str);
gpr_free(md_c_str);
return GRPC_COMPRESS_NONE;
return GRPC_MESSAGE_COMPRESS_NONE;
}
return algorithm;
}
@ -1081,7 +1032,7 @@ static grpc_stream_compression_algorithm decode_stream_compression(
static void publish_app_metadata(grpc_call* call, grpc_metadata_batch* b,
int is_trailing) {
if (b->list.count == 0) return;
GPR_TIMER_BEGIN("publish_app_metadata", 0);
GPR_TIMER_SCOPE("publish_app_metadata", 0);
grpc_metadata_array* dest;
grpc_metadata* mdusr;
dest = call->buffered_metadata[is_trailing];
@ -1097,42 +1048,39 @@ static void publish_app_metadata(grpc_call* call, grpc_metadata_batch* b,
mdusr->key = GRPC_MDKEY(l->md);
mdusr->value = GRPC_MDVALUE(l->md);
}
GPR_TIMER_END("publish_app_metadata", 0);
}
static void recv_initial_filter(grpc_call* call, grpc_metadata_batch* b) {
if (b->idx.named.content_encoding != nullptr) {
if (b->idx.named.grpc_encoding != nullptr) {
gpr_log(GPR_ERROR,
"Received both content-encoding and grpc-encoding header. "
"Ignoring grpc-encoding.");
grpc_metadata_batch_remove(b, b->idx.named.grpc_encoding);
}
GPR_TIMER_BEGIN("incoming_stream_compression_algorithm", 0);
GPR_TIMER_SCOPE("incoming_stream_compression_algorithm", 0);
set_incoming_stream_compression_algorithm(
call, decode_stream_compression(b->idx.named.content_encoding->md));
GPR_TIMER_END("incoming_stream_compression_algorithm", 0);
grpc_metadata_batch_remove(b, b->idx.named.content_encoding);
} else if (b->idx.named.grpc_encoding != nullptr) {
GPR_TIMER_BEGIN("incoming_compression_algorithm", 0);
set_incoming_compression_algorithm(
call, decode_compression(b->idx.named.grpc_encoding->md));
GPR_TIMER_END("incoming_compression_algorithm", 0);
}
if (b->idx.named.grpc_encoding != nullptr) {
GPR_TIMER_SCOPE("incoming_message_compression_algorithm", 0);
set_incoming_message_compression_algorithm(
call, decode_message_compression(b->idx.named.grpc_encoding->md));
grpc_metadata_batch_remove(b, b->idx.named.grpc_encoding);
}
uint32_t message_encodings_accepted_by_peer = 1u;
uint32_t stream_encodings_accepted_by_peer = 1u;
if (b->idx.named.grpc_accept_encoding != nullptr) {
GPR_TIMER_BEGIN("encodings_accepted_by_peer", 0);
set_encodings_accepted_by_peer(call, b->idx.named.grpc_accept_encoding->md);
GPR_TIMER_SCOPE("encodings_accepted_by_peer", 0);
set_encodings_accepted_by_peer(call, b->idx.named.grpc_accept_encoding->md,
&message_encodings_accepted_by_peer, false);
grpc_metadata_batch_remove(b, b->idx.named.grpc_accept_encoding);
GPR_TIMER_END("encodings_accepted_by_peer", 0);
}
if (b->idx.named.accept_encoding != nullptr) {
GPR_TIMER_BEGIN("stream_encodings_accepted_by_peer", 0);
set_stream_encodings_accepted_by_peer(call,
b->idx.named.accept_encoding->md);
GPR_TIMER_SCOPE("stream_encodings_accepted_by_peer", 0);
set_encodings_accepted_by_peer(call, b->idx.named.accept_encoding->md,
&stream_encodings_accepted_by_peer, true);
grpc_metadata_batch_remove(b, b->idx.named.accept_encoding);
GPR_TIMER_END("stream_encodings_accepted_by_peer", 0);
}
call->encodings_accepted_by_peer =
grpc_compression_bitset_from_message_stream_compression_bitset(
message_encodings_accepted_by_peer,
stream_encodings_accepted_by_peer);
publish_app_metadata(call, b, false);
}
@ -1270,6 +1218,7 @@ static void post_batch_completion(batch_control* bctl) {
if (bctl->op.send_initial_metadata) {
grpc_metadata_batch_destroy(
&call->metadata_batch[0 /* is_receiving */][0 /* is_trailing */]);
}
if (bctl->op.send_message) {
@ -1277,6 +1226,7 @@ static void post_batch_completion(batch_control* bctl) {
}
if (bctl->op.send_trailing_metadata) {
grpc_metadata_batch_destroy(
&call->metadata_batch[0 /* is_receiving */][1 /* is_trailing */]);
}
if (bctl->op.recv_trailing_metadata) {
@ -1425,9 +1375,15 @@ static void process_data_after_md(batch_control* bctl) {
} else {
call->test_only_last_message_flags = call->receiving_stream->flags;
if ((call->receiving_stream->flags & GRPC_WRITE_INTERNAL_COMPRESS) &&
(call->incoming_compression_algorithm > GRPC_COMPRESS_NONE)) {
*call->receiving_buffer = grpc_raw_compressed_byte_buffer_create(
nullptr, 0, call->incoming_compression_algorithm);
(call->incoming_message_compression_algorithm >
GRPC_MESSAGE_COMPRESS_NONE)) {
grpc_compression_algorithm algo;
GPR_ASSERT(
grpc_compression_algorithm_from_message_stream_compression_algorithm(
&algo, call->incoming_message_compression_algorithm,
(grpc_stream_compression_algorithm)0));
*call->receiving_buffer =
grpc_raw_compressed_byte_buffer_create(nullptr, 0, algo);
} else {
*call->receiving_buffer = grpc_raw_byte_buffer_create(nullptr, 0);
}
@ -1469,88 +1425,66 @@ static void receiving_stream_ready_in_call_combiner(void* bctlp,
}
static void validate_filtered_metadata(batch_control* bctl) {
grpc_compression_algorithm compression_algorithm;
grpc_call* call = bctl->call;
/* validate compression algorithms */
if (call->incoming_stream_compression_algorithm !=
GRPC_STREAM_COMPRESS_NONE) {
const grpc_stream_compression_algorithm algo =
call->incoming_stream_compression_algorithm;
GRPC_STREAM_COMPRESS_NONE &&
call->incoming_message_compression_algorithm !=
GRPC_MESSAGE_COMPRESS_NONE) {
char* error_msg = nullptr;
const grpc_compression_options compression_options =
grpc_channel_compression_options(call->channel);
if (algo >= GRPC_STREAM_COMPRESS_ALGORITHMS_COUNT) {
gpr_asprintf(&error_msg,
"Invalid stream compression algorithm value '%d'.", algo);
gpr_log(GPR_ERROR, "%s", error_msg);
cancel_with_status(call, STATUS_FROM_SURFACE, GRPC_STATUS_UNIMPLEMENTED,
error_msg);
} else if (grpc_compression_options_is_stream_compression_algorithm_enabled(
&compression_options, algo) == 0) {
/* check if algorithm is supported by current channel config */
const char* algo_name = nullptr;
grpc_stream_compression_algorithm_name(algo, &algo_name);
gpr_asprintf(&error_msg, "Stream compression algorithm '%s' is disabled.",
algo_name);
gpr_log(GPR_ERROR, "%s", error_msg);
cancel_with_status(call, STATUS_FROM_SURFACE, GRPC_STATUS_UNIMPLEMENTED,
error_msg);
}
gpr_asprintf(&error_msg,
"Incoming stream has both stream compression (%d) and message "
"compression (%d).",
call->incoming_stream_compression_algorithm,
call->incoming_message_compression_algorithm);
gpr_log(GPR_ERROR, "%s", error_msg);
cancel_with_status(call, STATUS_FROM_SURFACE, GRPC_STATUS_INTERNAL,
error_msg);
gpr_free(error_msg);
GPR_ASSERT(call->stream_encodings_accepted_by_peer != 0);
if (!GPR_BITGET(call->stream_encodings_accepted_by_peer,
call->incoming_stream_compression_algorithm)) {
if (grpc_compression_trace.enabled()) {
const char* algo_name = nullptr;
grpc_stream_compression_algorithm_name(
call->incoming_stream_compression_algorithm, &algo_name);
gpr_log(
GPR_ERROR,
"Stream compression algorithm (content-encoding = '%s') not "
"present in the bitset of accepted encodings (accept-encodings: "
"'0x%x')",
algo_name, call->stream_encodings_accepted_by_peer);
}
}
} else if (call->incoming_compression_algorithm != GRPC_COMPRESS_NONE) {
const grpc_compression_algorithm algo =
call->incoming_compression_algorithm;
} else if (
grpc_compression_algorithm_from_message_stream_compression_algorithm(
&compression_algorithm, call->incoming_message_compression_algorithm,
call->incoming_stream_compression_algorithm) == 0) {
char* error_msg = nullptr;
gpr_asprintf(&error_msg,
"Error in incoming message compression (%d) or stream "
"compression (%d).",
call->incoming_stream_compression_algorithm,
call->incoming_message_compression_algorithm);
cancel_with_status(call, STATUS_FROM_SURFACE, GRPC_STATUS_INTERNAL,
error_msg);
gpr_free(error_msg);
} else {
char* error_msg = nullptr;
const grpc_compression_options compression_options =
grpc_channel_compression_options(call->channel);
/* check if algorithm is known */
if (algo >= GRPC_COMPRESS_ALGORITHMS_COUNT) {
if (compression_algorithm >= GRPC_COMPRESS_ALGORITHMS_COUNT) {
gpr_asprintf(&error_msg, "Invalid compression algorithm value '%d'.",
algo);
compression_algorithm);
gpr_log(GPR_ERROR, "%s", error_msg);
cancel_with_status(call, STATUS_FROM_SURFACE, GRPC_STATUS_UNIMPLEMENTED,
error_msg);
} else if (grpc_compression_options_is_algorithm_enabled(
&compression_options, algo) == 0) {
&compression_options, compression_algorithm) == 0) {
/* check if algorithm is supported by current channel config */
const char* algo_name = nullptr;
grpc_compression_algorithm_name(algo, &algo_name);
grpc_compression_algorithm_name(compression_algorithm, &algo_name);
gpr_asprintf(&error_msg, "Compression algorithm '%s' is disabled.",
algo_name);
gpr_log(GPR_ERROR, "%s", error_msg);
cancel_with_status(call, STATUS_FROM_SURFACE, GRPC_STATUS_UNIMPLEMENTED,
error_msg);
} else {
call->incoming_compression_algorithm = algo;
}
gpr_free(error_msg);
GPR_ASSERT(call->encodings_accepted_by_peer != 0);
if (!GPR_BITGET(call->encodings_accepted_by_peer,
call->incoming_compression_algorithm)) {
if (!GPR_BITGET(call->encodings_accepted_by_peer, compression_algorithm)) {
if (grpc_compression_trace.enabled()) {
const char* algo_name = nullptr;
grpc_compression_algorithm_name(call->incoming_compression_algorithm,
&algo_name);
grpc_compression_algorithm_name(compression_algorithm, &algo_name);
gpr_log(GPR_ERROR,
"Compression algorithm (grpc-encoding = '%s') not present in "
"the bitset of accepted encodings (grpc-accept-encodings: "
"'0x%x')",
"Compression algorithm ('%s') not present in the bitset of "
"accepted encodings ('0x%x')",
algo_name, call->encodings_accepted_by_peer);
}
}
@ -1580,9 +1514,8 @@ static void receiving_initial_metadata_ready(void* bctlp, grpc_error* error) {
recv_initial_filter(call, md);
/* TODO(ctiller): this could be moved into recv_initial_filter now */
GPR_TIMER_BEGIN("validate_filtered_metadata", 0);
GPR_TIMER_SCOPE("validate_filtered_metadata", 0);
validate_filtered_metadata(bctl);
GPR_TIMER_END("validate_filtered_metadata", 0);
if (md->deadline != GRPC_MILLIS_INF_FUTURE && !call->is_client) {
call->send_deadline = md->deadline;
@ -1635,6 +1568,8 @@ static void free_no_op_completion(void* p, grpc_cq_completion* completion) {
static grpc_call_error call_start_batch(grpc_call* call, const grpc_op* ops,
size_t nops, void* notify_tag,
int is_notify_tag_closure) {
GPR_TIMER_SCOPE("grpc_call_start_batch", 0);
size_t i;
const grpc_op* op;
batch_control* bctl;
@ -1643,7 +1578,6 @@ static grpc_call_error call_start_batch(grpc_call* call, const grpc_op* ops,
grpc_transport_stream_op_batch* stream_op;
grpc_transport_stream_op_batch_payload* stream_op_payload;
GPR_TIMER_BEGIN("grpc_call_start_batch", 0);
GRPC_CALL_LOG_BATCH(GPR_INFO, call, ops, nops, notify_tag);
if (nops == 0) {
@ -1693,56 +1627,28 @@ static grpc_call_error call_start_batch(grpc_call* call, const grpc_op* ops,
size_t additional_metadata_count = 0;
grpc_compression_level effective_compression_level =
GRPC_COMPRESS_LEVEL_NONE;
grpc_stream_compression_level effective_stream_compression_level =
GRPC_STREAM_COMPRESS_LEVEL_NONE;
bool level_set = false;
bool stream_compression = false;
if (op->data.send_initial_metadata.maybe_stream_compression_level
.is_set) {
effective_stream_compression_level =
op->data.send_initial_metadata.maybe_stream_compression_level
.level;
level_set = true;
stream_compression = true;
} else if (op->data.send_initial_metadata.maybe_compression_level
.is_set) {
if (op->data.send_initial_metadata.maybe_compression_level.is_set) {
effective_compression_level =
op->data.send_initial_metadata.maybe_compression_level.level;
level_set = true;
} else {
const grpc_compression_options copts =
grpc_channel_compression_options(call->channel);
if (copts.default_stream_compression_level.is_set) {
level_set = true;
effective_stream_compression_level =
copts.default_stream_compression_level.level;
stream_compression = true;
} else if (copts.default_level.is_set) {
if (copts.default_level.is_set) {
level_set = true;
effective_compression_level = copts.default_level.level;
}
}
if (level_set && !call->is_client) {
if (stream_compression) {
const grpc_stream_compression_algorithm calgo =
stream_compression_algorithm_for_level_locked(
call, effective_stream_compression_level);
call->compression_md.key =
GRPC_MDSTR_GRPC_INTERNAL_STREAM_ENCODING_REQUEST;
call->compression_md.value =
grpc_stream_compression_algorithm_slice(calgo);
} else {
const grpc_compression_algorithm calgo =
compression_algorithm_for_level_locked(
call, effective_compression_level);
/* the following will be picked up by the compress filter and used
* as the call's compression algorithm. */
call->compression_md.key =
GRPC_MDSTR_GRPC_INTERNAL_ENCODING_REQUEST;
call->compression_md.value =
grpc_compression_algorithm_slice(calgo);
additional_metadata_count++;
}
const grpc_compression_algorithm calgo =
compression_algorithm_for_level_locked(
call, effective_compression_level);
/* the following will be picked up by the compress filter and used
* as the call's compression algorithm. */
call->compression_md.key = GRPC_MDSTR_GRPC_INTERNAL_ENCODING_REQUEST;
call->compression_md.value = grpc_compression_algorithm_slice(calgo);
additional_metadata_count++;
}
if (op->data.send_initial_metadata.count + additional_metadata_count >
@ -2008,7 +1914,6 @@ static grpc_call_error call_start_batch(grpc_call* call, const grpc_op* ops,
execute_batch(call, stream_op, &bctl->start_batch);
done:
GPR_TIMER_END("grpc_call_start_batch", 0);
return error;
done_with_error:

@ -21,7 +21,7 @@
#include <grpc/grpc.h>
/** Return the compression algorithm from \a call.
/** Return the message compression algorithm from \a call.
*
* \warning This function should \b only be used in test code. */
grpc_compression_algorithm grpc_call_test_only_get_compression_algorithm(
@ -38,16 +38,4 @@ uint32_t grpc_call_test_only_get_message_flags(grpc_call* call);
* To be indexed by grpc_compression_algorithm enum values. */
uint32_t grpc_call_test_only_get_encodings_accepted_by_peer(grpc_call* call);
/** Returns a bitset for the stream encodings (stream compression algorithms)
* supported by \a call's peer.
*
* To be indexed by grpc_stream_compression_algorithm enum values. */
uint32_t grpc_call_test_only_get_stream_encodings_accepted_by_peer(
grpc_call* call);
/** Returns the incoming stream compression algorithm (content-encoding header)
* received by a call. */
grpc_stream_compression_algorithm
grpc_call_test_only_get_incoming_stream_encodings(grpc_call* call);
#endif /* GRPC_CORE_LIB_SURFACE_CALL_TEST_ONLY_H */

@ -142,50 +142,23 @@ grpc_channel* grpc_channel_create_with_builder(
GRPC_COMPRESSION_CHANNEL_DEFAULT_LEVEL)) {
channel->compression_options.default_level.is_set = true;
channel->compression_options.default_level.level =
(grpc_compression_level)grpc_channel_arg_get_integer(
static_cast<grpc_compression_level>(grpc_channel_arg_get_integer(
&args->args[i],
{GRPC_COMPRESS_LEVEL_NONE, GRPC_COMPRESS_LEVEL_NONE,
GRPC_COMPRESS_LEVEL_COUNT - 1});
} else if (0 == strcmp(args->args[i].key,
GRPC_STREAM_COMPRESSION_CHANNEL_DEFAULT_LEVEL)) {
channel->compression_options.default_stream_compression_level.is_set =
true;
channel->compression_options.default_stream_compression_level.level =
(grpc_stream_compression_level)grpc_channel_arg_get_integer(
&args->args[i],
{GRPC_STREAM_COMPRESS_LEVEL_NONE, GRPC_STREAM_COMPRESS_LEVEL_NONE,
GRPC_STREAM_COMPRESS_LEVEL_COUNT - 1});
GRPC_COMPRESS_LEVEL_COUNT - 1}));
} else if (0 == strcmp(args->args[i].key,
GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM)) {
channel->compression_options.default_algorithm.is_set = true;
channel->compression_options.default_algorithm.algorithm =
(grpc_compression_algorithm)grpc_channel_arg_get_integer(
static_cast<grpc_compression_algorithm>(grpc_channel_arg_get_integer(
&args->args[i], {GRPC_COMPRESS_NONE, GRPC_COMPRESS_NONE,
GRPC_COMPRESS_ALGORITHMS_COUNT - 1});
} else if (0 == strcmp(args->args[i].key,
GRPC_STREAM_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM)) {
channel->compression_options.default_stream_compression_algorithm.is_set =
true;
channel->compression_options.default_stream_compression_algorithm
.algorithm =
(grpc_stream_compression_algorithm)grpc_channel_arg_get_integer(
&args->args[i],
{GRPC_STREAM_COMPRESS_NONE, GRPC_STREAM_COMPRESS_NONE,
GRPC_STREAM_COMPRESS_ALGORITHMS_COUNT - 1});
GRPC_COMPRESS_ALGORITHMS_COUNT - 1}));
} else if (0 ==
strcmp(args->args[i].key,
GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET)) {
channel->compression_options.enabled_algorithms_bitset =
(uint32_t)args->args[i].value.integer |
0x1; /* always support no compression */
} else if (0 ==
strcmp(
args->args[i].key,
GRPC_STREAM_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET)) {
channel->compression_options
.enabled_stream_compression_algorithms_bitset =
(uint32_t)args->args[i].value.integer |
0x1; /* always support no compression */
}
}

@ -421,9 +421,9 @@ static long cq_event_queue_num_items(grpc_cq_event_queue* q) {
grpc_completion_queue* grpc_completion_queue_create_internal(
grpc_cq_completion_type completion_type,
grpc_cq_polling_type polling_type) {
grpc_completion_queue* cq;
GPR_TIMER_SCOPE("grpc_completion_queue_create_internal", 0);
GPR_TIMER_BEGIN("grpc_completion_queue_create_internal", 0);
grpc_completion_queue* cq;
GRPC_API_TRACE(
"grpc_completion_queue_create_internal(completion_type=%d, "
@ -452,9 +452,6 @@ grpc_completion_queue* grpc_completion_queue_create_internal(
GRPC_CLOSURE_INIT(&cq->pollset_shutdown_done, on_pollset_shutdown_done, cq,
grpc_schedule_on_exec_ctx);
GPR_TIMER_END("grpc_completion_queue_create_internal", 0);
return cq;
}
@ -622,7 +619,7 @@ static void cq_end_op_for_next(grpc_completion_queue* cq, void* tag,
void (*done)(void* done_arg,
grpc_cq_completion* storage),
void* done_arg, grpc_cq_completion* storage) {
GPR_TIMER_BEGIN("cq_end_op_for_next", 0);
GPR_TIMER_SCOPE("cq_end_op_for_next", 0);
if (grpc_api_trace.enabled() ||
(grpc_trace_operation_failures.enabled() && error != GRPC_ERROR_NONE)) {
@ -691,8 +688,6 @@ static void cq_end_op_for_next(grpc_completion_queue* cq, void* tag,
}
}
GPR_TIMER_END("cq_end_op_for_next", 0);
GRPC_ERROR_UNREF(error);
}
@ -704,11 +699,11 @@ static void cq_end_op_for_pluck(grpc_completion_queue* cq, void* tag,
void (*done)(void* done_arg,
grpc_cq_completion* storage),
void* done_arg, grpc_cq_completion* storage) {
GPR_TIMER_SCOPE("cq_end_op_for_pluck", 0);
cq_pluck_data* cqd = (cq_pluck_data*)DATA_FROM_CQ(cq);
int is_success = (error == GRPC_ERROR_NONE);
GPR_TIMER_BEGIN("cq_end_op_for_pluck", 0);
if (grpc_api_trace.enabled() ||
(grpc_trace_operation_failures.enabled() && error != GRPC_ERROR_NONE)) {
const char* errmsg = grpc_error_string(error);
@ -760,8 +755,6 @@ static void cq_end_op_for_pluck(grpc_completion_queue* cq, void* tag,
}
}
GPR_TIMER_END("cq_end_op_for_pluck", 0);
GRPC_ERROR_UNREF(error);
}
@ -840,11 +833,11 @@ static void dump_pending_tags(grpc_completion_queue* cq) {}
static grpc_event cq_next(grpc_completion_queue* cq, gpr_timespec deadline,
void* reserved) {
GPR_TIMER_SCOPE("grpc_completion_queue_next", 0);
grpc_event ret;
cq_next_data* cqd = (cq_next_data*)DATA_FROM_CQ(cq);
GPR_TIMER_BEGIN("grpc_completion_queue_next", 0);
GRPC_API_TRACE(
"grpc_completion_queue_next("
"cq=%p, "
@ -958,8 +951,6 @@ static grpc_event cq_next(grpc_completion_queue* cq, gpr_timespec deadline,
GPR_ASSERT(is_finished_arg.stolen_completion == nullptr);
GPR_TIMER_END("grpc_completion_queue_next", 0);
return ret;
}
@ -1078,14 +1069,14 @@ class ExecCtxPluck : public grpc_core::ExecCtx {
static grpc_event cq_pluck(grpc_completion_queue* cq, void* tag,
gpr_timespec deadline, void* reserved) {
GPR_TIMER_SCOPE("grpc_completion_queue_pluck", 0);
grpc_event ret;
grpc_cq_completion* c;
grpc_cq_completion* prev;
grpc_pollset_worker* worker = nullptr;
cq_pluck_data* cqd = (cq_pluck_data*)DATA_FROM_CQ(cq);
GPR_TIMER_BEGIN("grpc_completion_queue_pluck", 0);
if (grpc_cq_pluck_trace.enabled()) {
GRPC_API_TRACE(
"grpc_completion_queue_pluck("
@ -1191,8 +1182,6 @@ done:
GPR_ASSERT(is_finished_arg.stolen_completion == nullptr);
GPR_TIMER_END("grpc_completion_queue_pluck", 0);
return ret;
}
@ -1240,23 +1229,19 @@ static void cq_shutdown_pluck(grpc_completion_queue* cq) {
/* Shutdown simply drops a ref that we reserved at creation time; if we drop
to zero here, then enter shutdown mode and wake up any waiters */
void grpc_completion_queue_shutdown(grpc_completion_queue* cq) {
GPR_TIMER_SCOPE("grpc_completion_queue_shutdown", 0);
grpc_core::ExecCtx exec_ctx;
GPR_TIMER_BEGIN("grpc_completion_queue_shutdown", 0);
GRPC_API_TRACE("grpc_completion_queue_shutdown(cq=%p)", 1, (cq));
cq->vtable->shutdown(cq);
GPR_TIMER_END("grpc_completion_queue_shutdown", 0);
}
void grpc_completion_queue_destroy(grpc_completion_queue* cq) {
GPR_TIMER_SCOPE("grpc_completion_queue_destroy", 0);
GRPC_API_TRACE("grpc_completion_queue_destroy(cq=%p)", 1, (cq));
GPR_TIMER_BEGIN("grpc_completion_queue_destroy", 0);
grpc_completion_queue_shutdown(cq);
grpc_core::ExecCtx exec_ctx;
GRPC_CQ_INTERNAL_UNREF(cq, "destroy");
GPR_TIMER_END("grpc_completion_queue_destroy", 0);
}
grpc_pollset* grpc_cq_pollset(grpc_completion_queue* cq) {

@ -162,9 +162,9 @@ void grpc_shutdown(void) {
{
grpc_core::ExecCtx exec_ctx(0);
{
grpc_executor_shutdown();
grpc_timer_manager_set_threading(
false); // shutdown timer_manager thread
grpc_executor_shutdown();
for (i = g_number_of_plugins; i >= 0; i--) {
if (g_all_of_the_plugins[i].destroy != nullptr) {
g_all_of_the_plugins[i].destroy();

@ -166,12 +166,13 @@ static void ref_md_locked(mdtab_shard* shard,
}
static void gc_mdtab(mdtab_shard* shard) {
GPR_TIMER_SCOPE("gc_mdtab", 0);
size_t i;
interned_metadata** prev_next;
interned_metadata *md, *next;
gpr_atm num_freed = 0;
GPR_TIMER_BEGIN("gc_mdtab", 0);
for (i = 0; i < shard->capacity; i++) {
prev_next = &shard->elems[i];
for (md = shard->elems[i]; md; md = next) {
@ -194,18 +195,17 @@ static void gc_mdtab(mdtab_shard* shard) {
}
}
gpr_atm_no_barrier_fetch_add(&shard->free_estimate, -num_freed);
GPR_TIMER_END("gc_mdtab", 0);
}
static void grow_mdtab(mdtab_shard* shard) {
GPR_TIMER_SCOPE("grow_mdtab", 0);
size_t capacity = shard->capacity * 2;
size_t i;
interned_metadata** mdtab;
interned_metadata *md, *next;
uint32_t hash;
GPR_TIMER_BEGIN("grow_mdtab", 0);
mdtab =
(interned_metadata**)gpr_zalloc(sizeof(interned_metadata*) * capacity);
@ -220,12 +220,9 @@ static void grow_mdtab(mdtab_shard* shard) {
mdtab[idx] = md;
}
}
gpr_free(shard->elems);
shard->elems = mdtab;
shard->capacity = capacity;
GPR_TIMER_END("grow_mdtab", 0);
}
static void rehash_mdtab(mdtab_shard* shard) {
@ -280,7 +277,7 @@ grpc_mdelem grpc_mdelem_create(
mdtab_shard* shard = &g_shards[SHARD_IDX(hash)];
size_t idx;
GPR_TIMER_BEGIN("grpc_mdelem_from_metadata_strings", 0);
GPR_TIMER_SCOPE("grpc_mdelem_from_metadata_strings", 0);
gpr_mu_lock(&shard->mu);
@ -290,7 +287,6 @@ grpc_mdelem grpc_mdelem_create(
if (grpc_slice_eq(key, md->key) && grpc_slice_eq(value, md->value)) {
REF_MD_LOCKED(shard, md);
gpr_mu_unlock(&shard->mu);
GPR_TIMER_END("grpc_mdelem_from_metadata_strings", 0);
return GRPC_MAKE_MDELEM(md, GRPC_MDELEM_STORAGE_INTERNED);
}
}
@ -323,8 +319,6 @@ grpc_mdelem grpc_mdelem_create(
gpr_mu_unlock(&shard->mu);
GPR_TIMER_END("grpc_mdelem_from_metadata_strings", 0);
return GRPC_MAKE_MDELEM(md, GRPC_MDELEM_STORAGE_INTERNED);
}

@ -57,51 +57,53 @@ static uint8_t g_bytes[] = {
112, 111, 110, 115, 101, 95, 109, 101, 115, 115, 97, 103, 101, 95, 98,
121, 116, 101, 115, 47, 103, 114, 112, 99, 46, 108, 98, 46, 118, 49,
46, 76, 111, 97, 100, 66, 97, 108, 97, 110, 99, 101, 114, 47, 66,
97, 108, 97, 110, 99, 101, 76, 111, 97, 100, 48, 49, 50, 105, 100,
101, 110, 116, 105, 116, 121, 103, 122, 105, 112, 100, 101, 102, 108, 97,
116, 101, 116, 114, 97, 105, 108, 101, 114, 115, 97, 112, 112, 108, 105,
99, 97, 116, 105, 111, 110, 47, 103, 114, 112, 99, 80, 79, 83, 84,
50, 48, 48, 52, 48, 52, 104, 116, 116, 112, 104, 116, 116, 112, 115,
103, 114, 112, 99, 71, 69, 84, 80, 85, 84, 47, 47, 105, 110, 100,
101, 120, 46, 104, 116, 109, 108, 50, 48, 52, 50, 48, 54, 51, 48,
52, 52, 48, 48, 53, 48, 48, 97, 99, 99, 101, 112, 116, 45, 99,
104, 97, 114, 115, 101, 116, 103, 122, 105, 112, 44, 32, 100, 101, 102,
108, 97, 116, 101, 97, 99, 99, 101, 112, 116, 45, 108, 97, 110, 103,
117, 97, 103, 101, 97, 99, 99, 101, 112, 116, 45, 114, 97, 110, 103,
101, 115, 97, 99, 99, 101, 112, 116, 97, 99, 99, 101, 115, 115, 45,
99, 111, 110, 116, 114, 111, 108, 45, 97, 108, 108, 111, 119, 45, 111,
114, 105, 103, 105, 110, 97, 103, 101, 97, 108, 108, 111, 119, 97, 117,
116, 104, 111, 114, 105, 122, 97, 116, 105, 111, 110, 99, 97, 99, 104,
101, 45, 99, 111, 110, 116, 114, 111, 108, 99, 111, 110, 116, 101, 110,
116, 45, 100, 105, 115, 112, 111, 115, 105, 116, 105, 111, 110, 99, 111,
110, 116, 101, 110, 116, 45, 108, 97, 110, 103, 117, 97, 103, 101, 99,
111, 110, 116, 101, 110, 116, 45, 108, 101, 110, 103, 116, 104, 99, 111,
110, 116, 101, 110, 116, 45, 108, 111, 99, 97, 116, 105, 111, 110, 99,
111, 110, 116, 101, 110, 116, 45, 114, 97, 110, 103, 101, 99, 111, 111,
107, 105, 101, 100, 97, 116, 101, 101, 116, 97, 103, 101, 120, 112, 101,
99, 116, 101, 120, 112, 105, 114, 101, 115, 102, 114, 111, 109, 105, 102,
45, 109, 97, 116, 99, 104, 105, 102, 45, 109, 111, 100, 105, 102, 105,
101, 100, 45, 115, 105, 110, 99, 101, 105, 102, 45, 110, 111, 110, 101,
45, 109, 97, 116, 99, 104, 105, 102, 45, 114, 97, 110, 103, 101, 105,
102, 45, 117, 110, 109, 111, 100, 105, 102, 105, 101, 100, 45, 115, 105,
110, 99, 101, 108, 97, 115, 116, 45, 109, 111, 100, 105, 102, 105, 101,
100, 108, 98, 45, 99, 111, 115, 116, 45, 98, 105, 110, 108, 105, 110,
107, 108, 111, 99, 97, 116, 105, 111, 110, 109, 97, 120, 45, 102, 111,
114, 119, 97, 114, 100, 115, 112, 114, 111, 120, 121, 45, 97, 117, 116,
104, 101, 110, 116, 105, 99, 97, 116, 101, 112, 114, 111, 120, 121, 45,
97, 117, 116, 104, 111, 114, 105, 122, 97, 116, 105, 111, 110, 114, 97,
110, 103, 101, 114, 101, 102, 101, 114, 101, 114, 114, 101, 102, 114, 101,
115, 104, 114, 101, 116, 114, 121, 45, 97, 102, 116, 101, 114, 115, 101,
114, 118, 101, 114, 115, 101, 116, 45, 99, 111, 111, 107, 105, 101, 115,
116, 114, 105, 99, 116, 45, 116, 114, 97, 110, 115, 112, 111, 114, 116,
45, 115, 101, 99, 117, 114, 105, 116, 121, 116, 114, 97, 110, 115, 102,
101, 114, 45, 101, 110, 99, 111, 100, 105, 110, 103, 118, 97, 114, 121,
118, 105, 97, 119, 119, 119, 45, 97, 117, 116, 104, 101, 110, 116, 105,
99, 97, 116, 101, 105, 100, 101, 110, 116, 105, 116, 121, 44, 100, 101,
102, 108, 97, 116, 101, 105, 100, 101, 110, 116, 105, 116, 121, 44, 103,
122, 105, 112, 100, 101, 102, 108, 97, 116, 101, 44, 103, 122, 105, 112,
105, 100, 101, 110, 116, 105, 116, 121, 44, 100, 101, 102, 108, 97, 116,
101, 44, 103, 122, 105, 112};
97, 108, 97, 110, 99, 101, 76, 111, 97, 100, 109, 101, 115, 115, 97,
103, 101, 47, 100, 101, 102, 108, 97, 116, 101, 109, 101, 115, 115, 97,
103, 101, 47, 103, 122, 105, 112, 115, 116, 114, 101, 97, 109, 47, 103,
122, 105, 112, 48, 49, 50, 105, 100, 101, 110, 116, 105, 116, 121, 103,
122, 105, 112, 100, 101, 102, 108, 97, 116, 101, 116, 114, 97, 105, 108,
101, 114, 115, 97, 112, 112, 108, 105, 99, 97, 116, 105, 111, 110, 47,
103, 114, 112, 99, 80, 79, 83, 84, 50, 48, 48, 52, 48, 52, 104,
116, 116, 112, 104, 116, 116, 112, 115, 103, 114, 112, 99, 71, 69, 84,
80, 85, 84, 47, 47, 105, 110, 100, 101, 120, 46, 104, 116, 109, 108,
50, 48, 52, 50, 48, 54, 51, 48, 52, 52, 48, 48, 53, 48, 48,
97, 99, 99, 101, 112, 116, 45, 99, 104, 97, 114, 115, 101, 116, 103,
122, 105, 112, 44, 32, 100, 101, 102, 108, 97, 116, 101, 97, 99, 99,
101, 112, 116, 45, 108, 97, 110, 103, 117, 97, 103, 101, 97, 99, 99,
101, 112, 116, 45, 114, 97, 110, 103, 101, 115, 97, 99, 99, 101, 112,
116, 97, 99, 99, 101, 115, 115, 45, 99, 111, 110, 116, 114, 111, 108,
45, 97, 108, 108, 111, 119, 45, 111, 114, 105, 103, 105, 110, 97, 103,
101, 97, 108, 108, 111, 119, 97, 117, 116, 104, 111, 114, 105, 122, 97,
116, 105, 111, 110, 99, 97, 99, 104, 101, 45, 99, 111, 110, 116, 114,
111, 108, 99, 111, 110, 116, 101, 110, 116, 45, 100, 105, 115, 112, 111,
115, 105, 116, 105, 111, 110, 99, 111, 110, 116, 101, 110, 116, 45, 108,
97, 110, 103, 117, 97, 103, 101, 99, 111, 110, 116, 101, 110, 116, 45,
108, 101, 110, 103, 116, 104, 99, 111, 110, 116, 101, 110, 116, 45, 108,
111, 99, 97, 116, 105, 111, 110, 99, 111, 110, 116, 101, 110, 116, 45,
114, 97, 110, 103, 101, 99, 111, 111, 107, 105, 101, 100, 97, 116, 101,
101, 116, 97, 103, 101, 120, 112, 101, 99, 116, 101, 120, 112, 105, 114,
101, 115, 102, 114, 111, 109, 105, 102, 45, 109, 97, 116, 99, 104, 105,
102, 45, 109, 111, 100, 105, 102, 105, 101, 100, 45, 115, 105, 110, 99,
101, 105, 102, 45, 110, 111, 110, 101, 45, 109, 97, 116, 99, 104, 105,
102, 45, 114, 97, 110, 103, 101, 105, 102, 45, 117, 110, 109, 111, 100,
105, 102, 105, 101, 100, 45, 115, 105, 110, 99, 101, 108, 97, 115, 116,
45, 109, 111, 100, 105, 102, 105, 101, 100, 108, 98, 45, 99, 111, 115,
116, 45, 98, 105, 110, 108, 105, 110, 107, 108, 111, 99, 97, 116, 105,
111, 110, 109, 97, 120, 45, 102, 111, 114, 119, 97, 114, 100, 115, 112,
114, 111, 120, 121, 45, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97,
116, 101, 112, 114, 111, 120, 121, 45, 97, 117, 116, 104, 111, 114, 105,
122, 97, 116, 105, 111, 110, 114, 97, 110, 103, 101, 114, 101, 102, 101,
114, 101, 114, 114, 101, 102, 114, 101, 115, 104, 114, 101, 116, 114, 121,
45, 97, 102, 116, 101, 114, 115, 101, 114, 118, 101, 114, 115, 101, 116,
45, 99, 111, 111, 107, 105, 101, 115, 116, 114, 105, 99, 116, 45, 116,
114, 97, 110, 115, 112, 111, 114, 116, 45, 115, 101, 99, 117, 114, 105,
116, 121, 116, 114, 97, 110, 115, 102, 101, 114, 45, 101, 110, 99, 111,
100, 105, 110, 103, 118, 97, 114, 121, 118, 105, 97, 119, 119, 119, 45,
97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 105, 100, 101,
110, 116, 105, 116, 121, 44, 100, 101, 102, 108, 97, 116, 101, 105, 100,
101, 110, 116, 105, 116, 121, 44, 103, 122, 105, 112, 100, 101, 102, 108,
97, 116, 101, 44, 103, 122, 105, 112, 105, 100, 101, 110, 116, 105, 116,
121, 44, 100, 101, 102, 108, 97, 116, 101, 44, 103, 122, 105, 112};
static void static_ref(void* unused) {}
static void static_unref(void* unused) {}
@ -213,6 +215,9 @@ grpc_slice_refcount grpc_static_metadata_refcounts[GRPC_STATIC_MDSTR_COUNT] = {
{&grpc_static_metadata_vtable, &static_sub_refcnt},
{&grpc_static_metadata_vtable, &static_sub_refcnt},
{&grpc_static_metadata_vtable, &static_sub_refcnt},
{&grpc_static_metadata_vtable, &static_sub_refcnt},
{&grpc_static_metadata_vtable, &static_sub_refcnt},
{&grpc_static_metadata_vtable, &static_sub_refcnt},
};
const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT] = {
@ -245,77 +250,80 @@ const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT] = {
{&grpc_static_metadata_refcounts[26], {{g_bytes + 333, 30}}},
{&grpc_static_metadata_refcounts[27], {{g_bytes + 363, 31}}},
{&grpc_static_metadata_refcounts[28], {{g_bytes + 394, 36}}},
{&grpc_static_metadata_refcounts[29], {{g_bytes + 430, 1}}},
{&grpc_static_metadata_refcounts[30], {{g_bytes + 431, 1}}},
{&grpc_static_metadata_refcounts[31], {{g_bytes + 432, 1}}},
{&grpc_static_metadata_refcounts[32], {{g_bytes + 433, 8}}},
{&grpc_static_metadata_refcounts[33], {{g_bytes + 441, 4}}},
{&grpc_static_metadata_refcounts[34], {{g_bytes + 445, 7}}},
{&grpc_static_metadata_refcounts[35], {{g_bytes + 452, 8}}},
{&grpc_static_metadata_refcounts[36], {{g_bytes + 460, 16}}},
{&grpc_static_metadata_refcounts[37], {{g_bytes + 476, 4}}},
{&grpc_static_metadata_refcounts[38], {{g_bytes + 480, 3}}},
{&grpc_static_metadata_refcounts[39], {{g_bytes + 483, 3}}},
{&grpc_static_metadata_refcounts[40], {{g_bytes + 486, 4}}},
{&grpc_static_metadata_refcounts[41], {{g_bytes + 490, 5}}},
{&grpc_static_metadata_refcounts[42], {{g_bytes + 495, 4}}},
{&grpc_static_metadata_refcounts[43], {{g_bytes + 499, 3}}},
{&grpc_static_metadata_refcounts[44], {{g_bytes + 502, 3}}},
{&grpc_static_metadata_refcounts[45], {{g_bytes + 505, 1}}},
{&grpc_static_metadata_refcounts[46], {{g_bytes + 506, 11}}},
{&grpc_static_metadata_refcounts[47], {{g_bytes + 517, 3}}},
{&grpc_static_metadata_refcounts[48], {{g_bytes + 520, 3}}},
{&grpc_static_metadata_refcounts[49], {{g_bytes + 523, 3}}},
{&grpc_static_metadata_refcounts[50], {{g_bytes + 526, 3}}},
{&grpc_static_metadata_refcounts[51], {{g_bytes + 529, 3}}},
{&grpc_static_metadata_refcounts[52], {{g_bytes + 532, 14}}},
{&grpc_static_metadata_refcounts[53], {{g_bytes + 546, 13}}},
{&grpc_static_metadata_refcounts[54], {{g_bytes + 559, 15}}},
{&grpc_static_metadata_refcounts[55], {{g_bytes + 574, 13}}},
{&grpc_static_metadata_refcounts[56], {{g_bytes + 587, 6}}},
{&grpc_static_metadata_refcounts[57], {{g_bytes + 593, 27}}},
{&grpc_static_metadata_refcounts[58], {{g_bytes + 620, 3}}},
{&grpc_static_metadata_refcounts[59], {{g_bytes + 623, 5}}},
{&grpc_static_metadata_refcounts[60], {{g_bytes + 628, 13}}},
{&grpc_static_metadata_refcounts[61], {{g_bytes + 641, 13}}},
{&grpc_static_metadata_refcounts[62], {{g_bytes + 654, 19}}},
{&grpc_static_metadata_refcounts[63], {{g_bytes + 673, 16}}},
{&grpc_static_metadata_refcounts[64], {{g_bytes + 689, 14}}},
{&grpc_static_metadata_refcounts[65], {{g_bytes + 703, 16}}},
{&grpc_static_metadata_refcounts[66], {{g_bytes + 719, 13}}},
{&grpc_static_metadata_refcounts[67], {{g_bytes + 732, 6}}},
{&grpc_static_metadata_refcounts[68], {{g_bytes + 738, 4}}},
{&grpc_static_metadata_refcounts[69], {{g_bytes + 742, 4}}},
{&grpc_static_metadata_refcounts[70], {{g_bytes + 746, 6}}},
{&grpc_static_metadata_refcounts[71], {{g_bytes + 752, 7}}},
{&grpc_static_metadata_refcounts[72], {{g_bytes + 759, 4}}},
{&grpc_static_metadata_refcounts[73], {{g_bytes + 763, 8}}},
{&grpc_static_metadata_refcounts[74], {{g_bytes + 771, 17}}},
{&grpc_static_metadata_refcounts[75], {{g_bytes + 788, 13}}},
{&grpc_static_metadata_refcounts[29], {{g_bytes + 430, 15}}},
{&grpc_static_metadata_refcounts[30], {{g_bytes + 445, 12}}},
{&grpc_static_metadata_refcounts[31], {{g_bytes + 457, 11}}},
{&grpc_static_metadata_refcounts[32], {{g_bytes + 468, 1}}},
{&grpc_static_metadata_refcounts[33], {{g_bytes + 469, 1}}},
{&grpc_static_metadata_refcounts[34], {{g_bytes + 470, 1}}},
{&grpc_static_metadata_refcounts[35], {{g_bytes + 471, 8}}},
{&grpc_static_metadata_refcounts[36], {{g_bytes + 479, 4}}},
{&grpc_static_metadata_refcounts[37], {{g_bytes + 483, 7}}},
{&grpc_static_metadata_refcounts[38], {{g_bytes + 490, 8}}},
{&grpc_static_metadata_refcounts[39], {{g_bytes + 498, 16}}},
{&grpc_static_metadata_refcounts[40], {{g_bytes + 514, 4}}},
{&grpc_static_metadata_refcounts[41], {{g_bytes + 518, 3}}},
{&grpc_static_metadata_refcounts[42], {{g_bytes + 521, 3}}},
{&grpc_static_metadata_refcounts[43], {{g_bytes + 524, 4}}},
{&grpc_static_metadata_refcounts[44], {{g_bytes + 528, 5}}},
{&grpc_static_metadata_refcounts[45], {{g_bytes + 533, 4}}},
{&grpc_static_metadata_refcounts[46], {{g_bytes + 537, 3}}},
{&grpc_static_metadata_refcounts[47], {{g_bytes + 540, 3}}},
{&grpc_static_metadata_refcounts[48], {{g_bytes + 543, 1}}},
{&grpc_static_metadata_refcounts[49], {{g_bytes + 544, 11}}},
{&grpc_static_metadata_refcounts[50], {{g_bytes + 555, 3}}},
{&grpc_static_metadata_refcounts[51], {{g_bytes + 558, 3}}},
{&grpc_static_metadata_refcounts[52], {{g_bytes + 561, 3}}},
{&grpc_static_metadata_refcounts[53], {{g_bytes + 564, 3}}},
{&grpc_static_metadata_refcounts[54], {{g_bytes + 567, 3}}},
{&grpc_static_metadata_refcounts[55], {{g_bytes + 570, 14}}},
{&grpc_static_metadata_refcounts[56], {{g_bytes + 584, 13}}},
{&grpc_static_metadata_refcounts[57], {{g_bytes + 597, 15}}},
{&grpc_static_metadata_refcounts[58], {{g_bytes + 612, 13}}},
{&grpc_static_metadata_refcounts[59], {{g_bytes + 625, 6}}},
{&grpc_static_metadata_refcounts[60], {{g_bytes + 631, 27}}},
{&grpc_static_metadata_refcounts[61], {{g_bytes + 658, 3}}},
{&grpc_static_metadata_refcounts[62], {{g_bytes + 661, 5}}},
{&grpc_static_metadata_refcounts[63], {{g_bytes + 666, 13}}},
{&grpc_static_metadata_refcounts[64], {{g_bytes + 679, 13}}},
{&grpc_static_metadata_refcounts[65], {{g_bytes + 692, 19}}},
{&grpc_static_metadata_refcounts[66], {{g_bytes + 711, 16}}},
{&grpc_static_metadata_refcounts[67], {{g_bytes + 727, 14}}},
{&grpc_static_metadata_refcounts[68], {{g_bytes + 741, 16}}},
{&grpc_static_metadata_refcounts[69], {{g_bytes + 757, 13}}},
{&grpc_static_metadata_refcounts[70], {{g_bytes + 770, 6}}},
{&grpc_static_metadata_refcounts[71], {{g_bytes + 776, 4}}},
{&grpc_static_metadata_refcounts[72], {{g_bytes + 780, 4}}},
{&grpc_static_metadata_refcounts[73], {{g_bytes + 784, 6}}},
{&grpc_static_metadata_refcounts[74], {{g_bytes + 790, 7}}},
{&grpc_static_metadata_refcounts[75], {{g_bytes + 797, 4}}},
{&grpc_static_metadata_refcounts[76], {{g_bytes + 801, 8}}},
{&grpc_static_metadata_refcounts[77], {{g_bytes + 809, 19}}},
{&grpc_static_metadata_refcounts[78], {{g_bytes + 828, 13}}},
{&grpc_static_metadata_refcounts[79], {{g_bytes + 841, 11}}},
{&grpc_static_metadata_refcounts[80], {{g_bytes + 852, 4}}},
{&grpc_static_metadata_refcounts[81], {{g_bytes + 856, 8}}},
{&grpc_static_metadata_refcounts[82], {{g_bytes + 864, 12}}},
{&grpc_static_metadata_refcounts[83], {{g_bytes + 876, 18}}},
{&grpc_static_metadata_refcounts[84], {{g_bytes + 894, 19}}},
{&grpc_static_metadata_refcounts[85], {{g_bytes + 913, 5}}},
{&grpc_static_metadata_refcounts[86], {{g_bytes + 918, 7}}},
{&grpc_static_metadata_refcounts[87], {{g_bytes + 925, 7}}},
{&grpc_static_metadata_refcounts[88], {{g_bytes + 932, 11}}},
{&grpc_static_metadata_refcounts[89], {{g_bytes + 943, 6}}},
{&grpc_static_metadata_refcounts[90], {{g_bytes + 949, 10}}},
{&grpc_static_metadata_refcounts[91], {{g_bytes + 959, 25}}},
{&grpc_static_metadata_refcounts[92], {{g_bytes + 984, 17}}},
{&grpc_static_metadata_refcounts[93], {{g_bytes + 1001, 4}}},
{&grpc_static_metadata_refcounts[94], {{g_bytes + 1005, 3}}},
{&grpc_static_metadata_refcounts[95], {{g_bytes + 1008, 16}}},
{&grpc_static_metadata_refcounts[96], {{g_bytes + 1024, 16}}},
{&grpc_static_metadata_refcounts[97], {{g_bytes + 1040, 13}}},
{&grpc_static_metadata_refcounts[98], {{g_bytes + 1053, 12}}},
{&grpc_static_metadata_refcounts[99], {{g_bytes + 1065, 21}}},
{&grpc_static_metadata_refcounts[77], {{g_bytes + 809, 17}}},
{&grpc_static_metadata_refcounts[78], {{g_bytes + 826, 13}}},
{&grpc_static_metadata_refcounts[79], {{g_bytes + 839, 8}}},
{&grpc_static_metadata_refcounts[80], {{g_bytes + 847, 19}}},
{&grpc_static_metadata_refcounts[81], {{g_bytes + 866, 13}}},
{&grpc_static_metadata_refcounts[82], {{g_bytes + 879, 11}}},
{&grpc_static_metadata_refcounts[83], {{g_bytes + 890, 4}}},
{&grpc_static_metadata_refcounts[84], {{g_bytes + 894, 8}}},
{&grpc_static_metadata_refcounts[85], {{g_bytes + 902, 12}}},
{&grpc_static_metadata_refcounts[86], {{g_bytes + 914, 18}}},
{&grpc_static_metadata_refcounts[87], {{g_bytes + 932, 19}}},
{&grpc_static_metadata_refcounts[88], {{g_bytes + 951, 5}}},
{&grpc_static_metadata_refcounts[89], {{g_bytes + 956, 7}}},
{&grpc_static_metadata_refcounts[90], {{g_bytes + 963, 7}}},
{&grpc_static_metadata_refcounts[91], {{g_bytes + 970, 11}}},
{&grpc_static_metadata_refcounts[92], {{g_bytes + 981, 6}}},
{&grpc_static_metadata_refcounts[93], {{g_bytes + 987, 10}}},
{&grpc_static_metadata_refcounts[94], {{g_bytes + 997, 25}}},
{&grpc_static_metadata_refcounts[95], {{g_bytes + 1022, 17}}},
{&grpc_static_metadata_refcounts[96], {{g_bytes + 1039, 4}}},
{&grpc_static_metadata_refcounts[97], {{g_bytes + 1043, 3}}},
{&grpc_static_metadata_refcounts[98], {{g_bytes + 1046, 16}}},
{&grpc_static_metadata_refcounts[99], {{g_bytes + 1062, 16}}},
{&grpc_static_metadata_refcounts[100], {{g_bytes + 1078, 13}}},
{&grpc_static_metadata_refcounts[101], {{g_bytes + 1091, 12}}},
{&grpc_static_metadata_refcounts[102], {{g_bytes + 1103, 21}}},
};
uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = {
@ -325,16 +333,16 @@ uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 4, 6, 6, 8, 8, 2, 4, 4};
static const int8_t elems_r[] = {
11, 9, -3, 0, 10, 27, -74, 28, 0, 14, -7, 0, 0, 0, 18, 8, -2,
0, 0, 13, 12, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, -50, 0, -33, -55, -56, -57, -58, -57, 0, 40, 39, 38, 37, 36, 35, 34,
33, 32, 31, 30, 29, 28, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 22,
21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 12, 11, 0};
11, 9, -3, 0, 10, 25, -77, 26, 0, 11, -7, 0, 0, 0, 21, 14, 1,
0, 0, 33, 12, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, -56, 0, -36, -61, -60, -39, -63, -64, 0, 36, 35, 34, 33,
34, 33, 32, 31, 31, 30, 29, 28, 27, 26, 26, 25, 25, 24, 23, 22, 21,
20, 19, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 12, 11, 0};
static uint32_t elems_phash(uint32_t i) {
i -= 45;
uint32_t x = i % 98;
uint32_t y = i / 98;
i -= 48;
uint32_t x = i % 101;
uint32_t y = i / 101;
uint32_t h = x;
if (y < GPR_ARRAY_SIZE(elems_r)) {
uint32_t delta = (uint32_t)elems_r[y];
@ -344,31 +352,31 @@ static uint32_t elems_phash(uint32_t i) {
}
static const uint16_t elem_keys[] = {
1032, 1033, 1034, 247, 248, 249, 250, 251, 1623, 143, 144, 45,
46, 440, 441, 442, 1523, 1632, 1633, 932, 933, 934, 729, 730,
1423, 1532, 1533, 535, 731, 1923, 2023, 2123, 5223, 5523, 5623, 5723,
5823, 1436, 1653, 5923, 6023, 6123, 6223, 6323, 6423, 6523, 6623, 6723,
6823, 6923, 7023, 7123, 7223, 5423, 7323, 7423, 7523, 7623, 7723, 7823,
7923, 8023, 8123, 8223, 1096, 1097, 1098, 1099, 8323, 8423, 8523, 8623,
8723, 8823, 8923, 9023, 9123, 9223, 9323, 323, 9423, 9523, 1697, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 137, 238, 239, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0};
1065, 1066, 1067, 256, 257, 258, 259, 260, 1671, 149, 150, 48,
49, 455, 456, 457, 962, 963, 964, 1568, 1683, 1684, 753, 754,
1465, 553, 755, 2083, 2186, 5688, 5997, 1580, 1581, 6100, 6306, 6409,
6512, 6615, 6718, 6821, 1481, 1704, 6924, 7027, 7130, 7233, 1980, 7336,
7439, 7542, 7645, 7748, 7851, 5894, 7954, 8057, 6203, 8160, 8263, 8366,
8469, 8572, 8675, 8778, 1129, 1130, 1131, 1132, 8881, 8984, 9087, 9190,
9293, 9396, 9499, 9602, 9705, 9808, 9911, 332, 10014, 10117, 0, 0,
0, 1748, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 247,
248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0};
static const uint8_t elem_idxs[] = {
76, 79, 77, 19, 20, 21, 22, 23, 25, 15, 16, 17, 18, 11,
12, 13, 38, 83, 84, 3, 4, 5, 0, 1, 43, 36, 37, 6,
2, 72, 50, 57, 24, 28, 29, 30, 31, 7, 26, 32, 33, 34,
35, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 27, 51, 52,
53, 54, 55, 56, 58, 59, 60, 61, 78, 80, 81, 82, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 73, 14, 74, 75, 85, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 8, 9, 10};
12, 13, 3, 4, 5, 38, 83, 84, 0, 1, 43, 6, 2, 50,
57, 24, 28, 36, 37, 29, 31, 32, 33, 34, 35, 39, 7, 26,
40, 41, 42, 44, 72, 45, 46, 47, 48, 49, 51, 27, 52, 53,
30, 54, 55, 56, 58, 59, 60, 61, 78, 80, 81, 82, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 73, 14, 74, 75, 255, 255,
255, 85, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 8, 9, 10};
grpc_mdelem grpc_static_mdelem_for_static_strings(int a, int b) {
if (a == -1 || b == -1) return GRPC_MDNULL;
uint32_t k = (uint32_t)(a * 100 + b);
uint32_t k = (uint32_t)(a * 103 + b);
uint32_t h = elems_phash(k);
return h < GPR_ARRAY_SIZE(elem_keys) && elem_keys[h] == k &&
elem_idxs[h] != 255
@ -379,177 +387,177 @@ grpc_mdelem grpc_static_mdelem_for_static_strings(int a, int b) {
grpc_mdelem_data grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT] = {
{{&grpc_static_metadata_refcounts[7], {{g_bytes + 50, 11}}},
{&grpc_static_metadata_refcounts[29], {{g_bytes + 430, 1}}}},
{&grpc_static_metadata_refcounts[32], {{g_bytes + 468, 1}}}},
{{&grpc_static_metadata_refcounts[7], {{g_bytes + 50, 11}}},
{&grpc_static_metadata_refcounts[30], {{g_bytes + 431, 1}}}},
{&grpc_static_metadata_refcounts[33], {{g_bytes + 469, 1}}}},
{{&grpc_static_metadata_refcounts[7], {{g_bytes + 50, 11}}},
{&grpc_static_metadata_refcounts[31], {{g_bytes + 432, 1}}}},
{&grpc_static_metadata_refcounts[34], {{g_bytes + 470, 1}}}},
{{&grpc_static_metadata_refcounts[9], {{g_bytes + 77, 13}}},
{&grpc_static_metadata_refcounts[32], {{g_bytes + 433, 8}}}},
{&grpc_static_metadata_refcounts[35], {{g_bytes + 471, 8}}}},
{{&grpc_static_metadata_refcounts[9], {{g_bytes + 77, 13}}},
{&grpc_static_metadata_refcounts[33], {{g_bytes + 441, 4}}}},
{&grpc_static_metadata_refcounts[36], {{g_bytes + 479, 4}}}},
{{&grpc_static_metadata_refcounts[9], {{g_bytes + 77, 13}}},
{&grpc_static_metadata_refcounts[34], {{g_bytes + 445, 7}}}},
{&grpc_static_metadata_refcounts[37], {{g_bytes + 483, 7}}}},
{{&grpc_static_metadata_refcounts[5], {{g_bytes + 36, 2}}},
{&grpc_static_metadata_refcounts[35], {{g_bytes + 452, 8}}}},
{&grpc_static_metadata_refcounts[38], {{g_bytes + 490, 8}}}},
{{&grpc_static_metadata_refcounts[14], {{g_bytes + 158, 12}}},
{&grpc_static_metadata_refcounts[36], {{g_bytes + 460, 16}}}},
{&grpc_static_metadata_refcounts[39], {{g_bytes + 498, 16}}}},
{{&grpc_static_metadata_refcounts[1], {{g_bytes + 5, 7}}},
{&grpc_static_metadata_refcounts[37], {{g_bytes + 476, 4}}}},
{&grpc_static_metadata_refcounts[40], {{g_bytes + 514, 4}}}},
{{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}},
{&grpc_static_metadata_refcounts[38], {{g_bytes + 480, 3}}}},
{&grpc_static_metadata_refcounts[41], {{g_bytes + 518, 3}}}},
{{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}},
{&grpc_static_metadata_refcounts[39], {{g_bytes + 483, 3}}}},
{&grpc_static_metadata_refcounts[42], {{g_bytes + 521, 3}}}},
{{&grpc_static_metadata_refcounts[4], {{g_bytes + 29, 7}}},
{&grpc_static_metadata_refcounts[40], {{g_bytes + 486, 4}}}},
{&grpc_static_metadata_refcounts[43], {{g_bytes + 524, 4}}}},
{{&grpc_static_metadata_refcounts[4], {{g_bytes + 29, 7}}},
{&grpc_static_metadata_refcounts[41], {{g_bytes + 490, 5}}}},
{&grpc_static_metadata_refcounts[44], {{g_bytes + 528, 5}}}},
{{&grpc_static_metadata_refcounts[4], {{g_bytes + 29, 7}}},
{&grpc_static_metadata_refcounts[42], {{g_bytes + 495, 4}}}},
{&grpc_static_metadata_refcounts[45], {{g_bytes + 533, 4}}}},
{{&grpc_static_metadata_refcounts[3], {{g_bytes + 19, 10}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[1], {{g_bytes + 5, 7}}},
{&grpc_static_metadata_refcounts[43], {{g_bytes + 499, 3}}}},
{&grpc_static_metadata_refcounts[46], {{g_bytes + 537, 3}}}},
{{&grpc_static_metadata_refcounts[1], {{g_bytes + 5, 7}}},
{&grpc_static_metadata_refcounts[44], {{g_bytes + 502, 3}}}},
{&grpc_static_metadata_refcounts[47], {{g_bytes + 540, 3}}}},
{{&grpc_static_metadata_refcounts[0], {{g_bytes + 0, 5}}},
{&grpc_static_metadata_refcounts[45], {{g_bytes + 505, 1}}}},
{&grpc_static_metadata_refcounts[48], {{g_bytes + 543, 1}}}},
{{&grpc_static_metadata_refcounts[0], {{g_bytes + 0, 5}}},
{&grpc_static_metadata_refcounts[46], {{g_bytes + 506, 11}}}},
{&grpc_static_metadata_refcounts[49], {{g_bytes + 544, 11}}}},
{{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}},
{&grpc_static_metadata_refcounts[47], {{g_bytes + 517, 3}}}},
{&grpc_static_metadata_refcounts[50], {{g_bytes + 555, 3}}}},
{{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}},
{&grpc_static_metadata_refcounts[48], {{g_bytes + 520, 3}}}},
{&grpc_static_metadata_refcounts[51], {{g_bytes + 558, 3}}}},
{{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}},
{&grpc_static_metadata_refcounts[49], {{g_bytes + 523, 3}}}},
{&grpc_static_metadata_refcounts[52], {{g_bytes + 561, 3}}}},
{{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}},
{&grpc_static_metadata_refcounts[50], {{g_bytes + 526, 3}}}},
{&grpc_static_metadata_refcounts[53], {{g_bytes + 564, 3}}}},
{{&grpc_static_metadata_refcounts[2], {{g_bytes + 12, 7}}},
{&grpc_static_metadata_refcounts[51], {{g_bytes + 529, 3}}}},
{{&grpc_static_metadata_refcounts[52], {{g_bytes + 532, 14}}},
{&grpc_static_metadata_refcounts[54], {{g_bytes + 567, 3}}}},
{{&grpc_static_metadata_refcounts[55], {{g_bytes + 570, 14}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[16], {{g_bytes + 186, 15}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[16], {{g_bytes + 186, 15}}},
{&grpc_static_metadata_refcounts[53], {{g_bytes + 546, 13}}}},
{{&grpc_static_metadata_refcounts[54], {{g_bytes + 559, 15}}},
{&grpc_static_metadata_refcounts[56], {{g_bytes + 584, 13}}}},
{{&grpc_static_metadata_refcounts[57], {{g_bytes + 597, 15}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[55], {{g_bytes + 574, 13}}},
{{&grpc_static_metadata_refcounts[58], {{g_bytes + 612, 13}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[56], {{g_bytes + 587, 6}}},
{{&grpc_static_metadata_refcounts[59], {{g_bytes + 625, 6}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[57], {{g_bytes + 593, 27}}},
{{&grpc_static_metadata_refcounts[60], {{g_bytes + 631, 27}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[58], {{g_bytes + 620, 3}}},
{{&grpc_static_metadata_refcounts[61], {{g_bytes + 658, 3}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[59], {{g_bytes + 623, 5}}},
{{&grpc_static_metadata_refcounts[62], {{g_bytes + 661, 5}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[60], {{g_bytes + 628, 13}}},
{{&grpc_static_metadata_refcounts[63], {{g_bytes + 666, 13}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[61], {{g_bytes + 641, 13}}},
{{&grpc_static_metadata_refcounts[64], {{g_bytes + 679, 13}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[62], {{g_bytes + 654, 19}}},
{{&grpc_static_metadata_refcounts[65], {{g_bytes + 692, 19}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[15], {{g_bytes + 170, 16}}},
{&grpc_static_metadata_refcounts[32], {{g_bytes + 433, 8}}}},
{&grpc_static_metadata_refcounts[35], {{g_bytes + 471, 8}}}},
{{&grpc_static_metadata_refcounts[15], {{g_bytes + 170, 16}}},
{&grpc_static_metadata_refcounts[33], {{g_bytes + 441, 4}}}},
{&grpc_static_metadata_refcounts[36], {{g_bytes + 479, 4}}}},
{{&grpc_static_metadata_refcounts[15], {{g_bytes + 170, 16}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[63], {{g_bytes + 673, 16}}},
{{&grpc_static_metadata_refcounts[66], {{g_bytes + 711, 16}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[64], {{g_bytes + 689, 14}}},
{{&grpc_static_metadata_refcounts[67], {{g_bytes + 727, 14}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[65], {{g_bytes + 703, 16}}},
{{&grpc_static_metadata_refcounts[68], {{g_bytes + 741, 16}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[66], {{g_bytes + 719, 13}}},
{{&grpc_static_metadata_refcounts[69], {{g_bytes + 757, 13}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[14], {{g_bytes + 158, 12}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[67], {{g_bytes + 732, 6}}},
{{&grpc_static_metadata_refcounts[70], {{g_bytes + 770, 6}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[68], {{g_bytes + 738, 4}}},
{{&grpc_static_metadata_refcounts[71], {{g_bytes + 776, 4}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[69], {{g_bytes + 742, 4}}},
{{&grpc_static_metadata_refcounts[72], {{g_bytes + 780, 4}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[70], {{g_bytes + 746, 6}}},
{{&grpc_static_metadata_refcounts[73], {{g_bytes + 784, 6}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[71], {{g_bytes + 752, 7}}},
{{&grpc_static_metadata_refcounts[74], {{g_bytes + 790, 7}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[72], {{g_bytes + 759, 4}}},
{{&grpc_static_metadata_refcounts[75], {{g_bytes + 797, 4}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[20], {{g_bytes + 278, 4}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[73], {{g_bytes + 763, 8}}},
{{&grpc_static_metadata_refcounts[76], {{g_bytes + 801, 8}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[74], {{g_bytes + 771, 17}}},
{{&grpc_static_metadata_refcounts[77], {{g_bytes + 809, 17}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[75], {{g_bytes + 788, 13}}},
{{&grpc_static_metadata_refcounts[78], {{g_bytes + 826, 13}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[76], {{g_bytes + 801, 8}}},
{{&grpc_static_metadata_refcounts[79], {{g_bytes + 839, 8}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[77], {{g_bytes + 809, 19}}},
{{&grpc_static_metadata_refcounts[80], {{g_bytes + 847, 19}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[78], {{g_bytes + 828, 13}}},
{{&grpc_static_metadata_refcounts[81], {{g_bytes + 866, 13}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[21], {{g_bytes + 282, 8}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[79], {{g_bytes + 841, 11}}},
{{&grpc_static_metadata_refcounts[82], {{g_bytes + 879, 11}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[80], {{g_bytes + 852, 4}}},
{{&grpc_static_metadata_refcounts[83], {{g_bytes + 890, 4}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[81], {{g_bytes + 856, 8}}},
{{&grpc_static_metadata_refcounts[84], {{g_bytes + 894, 8}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[82], {{g_bytes + 864, 12}}},
{{&grpc_static_metadata_refcounts[85], {{g_bytes + 902, 12}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[83], {{g_bytes + 876, 18}}},
{{&grpc_static_metadata_refcounts[86], {{g_bytes + 914, 18}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[84], {{g_bytes + 894, 19}}},
{{&grpc_static_metadata_refcounts[87], {{g_bytes + 932, 19}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[85], {{g_bytes + 913, 5}}},
{{&grpc_static_metadata_refcounts[88], {{g_bytes + 951, 5}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[86], {{g_bytes + 918, 7}}},
{{&grpc_static_metadata_refcounts[89], {{g_bytes + 956, 7}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[87], {{g_bytes + 925, 7}}},
{{&grpc_static_metadata_refcounts[90], {{g_bytes + 963, 7}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[88], {{g_bytes + 932, 11}}},
{{&grpc_static_metadata_refcounts[91], {{g_bytes + 970, 11}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[89], {{g_bytes + 943, 6}}},
{{&grpc_static_metadata_refcounts[92], {{g_bytes + 981, 6}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[90], {{g_bytes + 949, 10}}},
{{&grpc_static_metadata_refcounts[93], {{g_bytes + 987, 10}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[91], {{g_bytes + 959, 25}}},
{{&grpc_static_metadata_refcounts[94], {{g_bytes + 997, 25}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[92], {{g_bytes + 984, 17}}},
{{&grpc_static_metadata_refcounts[95], {{g_bytes + 1022, 17}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[19], {{g_bytes + 268, 10}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[93], {{g_bytes + 1001, 4}}},
{{&grpc_static_metadata_refcounts[96], {{g_bytes + 1039, 4}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[94], {{g_bytes + 1005, 3}}},
{{&grpc_static_metadata_refcounts[97], {{g_bytes + 1043, 3}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[95], {{g_bytes + 1008, 16}}},
{{&grpc_static_metadata_refcounts[98], {{g_bytes + 1046, 16}}},
{&grpc_static_metadata_refcounts[23], {{g_bytes + 302, 0}}}},
{{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}},
{&grpc_static_metadata_refcounts[32], {{g_bytes + 433, 8}}}},
{&grpc_static_metadata_refcounts[35], {{g_bytes + 471, 8}}}},
{{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}},
{&grpc_static_metadata_refcounts[34], {{g_bytes + 445, 7}}}},
{&grpc_static_metadata_refcounts[37], {{g_bytes + 483, 7}}}},
{{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}},
{&grpc_static_metadata_refcounts[96], {{g_bytes + 1024, 16}}}},
{&grpc_static_metadata_refcounts[99], {{g_bytes + 1062, 16}}}},
{{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}},
{&grpc_static_metadata_refcounts[33], {{g_bytes + 441, 4}}}},
{&grpc_static_metadata_refcounts[36], {{g_bytes + 479, 4}}}},
{{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}},
{&grpc_static_metadata_refcounts[97], {{g_bytes + 1040, 13}}}},
{&grpc_static_metadata_refcounts[100], {{g_bytes + 1078, 13}}}},
{{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}},
{&grpc_static_metadata_refcounts[98], {{g_bytes + 1053, 12}}}},
{&grpc_static_metadata_refcounts[101], {{g_bytes + 1091, 12}}}},
{{&grpc_static_metadata_refcounts[10], {{g_bytes + 90, 20}}},
{&grpc_static_metadata_refcounts[99], {{g_bytes + 1065, 21}}}},
{&grpc_static_metadata_refcounts[102], {{g_bytes + 1103, 21}}}},
{{&grpc_static_metadata_refcounts[16], {{g_bytes + 186, 15}}},
{&grpc_static_metadata_refcounts[32], {{g_bytes + 433, 8}}}},
{&grpc_static_metadata_refcounts[35], {{g_bytes + 471, 8}}}},
{{&grpc_static_metadata_refcounts[16], {{g_bytes + 186, 15}}},
{&grpc_static_metadata_refcounts[33], {{g_bytes + 441, 4}}}},
{&grpc_static_metadata_refcounts[36], {{g_bytes + 479, 4}}}},
{{&grpc_static_metadata_refcounts[16], {{g_bytes + 186, 15}}},
{&grpc_static_metadata_refcounts[97], {{g_bytes + 1040, 13}}}},
{&grpc_static_metadata_refcounts[100], {{g_bytes + 1078, 13}}}},
};
bool grpc_static_callout_is_default[GRPC_BATCH_CALLOUTS_COUNT] = {
true, // :path

@ -29,7 +29,7 @@
#include "src/core/lib/transport/metadata.h"
#define GRPC_STATIC_MDSTR_COUNT 100
#define GRPC_STATIC_MDSTR_COUNT 103
extern const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT];
/* ":path" */
#define GRPC_MDSTR_PATH (grpc_static_slice_table[0])
@ -93,149 +93,155 @@ extern const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT];
/* "/grpc.lb.v1.LoadBalancer/BalanceLoad" */
#define GRPC_MDSTR_SLASH_GRPC_DOT_LB_DOT_V1_DOT_LOADBALANCER_SLASH_BALANCELOAD \
(grpc_static_slice_table[28])
/* "message/deflate" */
#define GRPC_MDSTR_MESSAGE_SLASH_DEFLATE (grpc_static_slice_table[29])
/* "message/gzip" */
#define GRPC_MDSTR_MESSAGE_SLASH_GZIP (grpc_static_slice_table[30])
/* "stream/gzip" */
#define GRPC_MDSTR_STREAM_SLASH_GZIP (grpc_static_slice_table[31])
/* "0" */
#define GRPC_MDSTR_0 (grpc_static_slice_table[29])
#define GRPC_MDSTR_0 (grpc_static_slice_table[32])
/* "1" */
#define GRPC_MDSTR_1 (grpc_static_slice_table[30])
#define GRPC_MDSTR_1 (grpc_static_slice_table[33])
/* "2" */
#define GRPC_MDSTR_2 (grpc_static_slice_table[31])
#define GRPC_MDSTR_2 (grpc_static_slice_table[34])
/* "identity" */
#define GRPC_MDSTR_IDENTITY (grpc_static_slice_table[32])
#define GRPC_MDSTR_IDENTITY (grpc_static_slice_table[35])
/* "gzip" */
#define GRPC_MDSTR_GZIP (grpc_static_slice_table[33])
#define GRPC_MDSTR_GZIP (grpc_static_slice_table[36])
/* "deflate" */
#define GRPC_MDSTR_DEFLATE (grpc_static_slice_table[34])
#define GRPC_MDSTR_DEFLATE (grpc_static_slice_table[37])
/* "trailers" */
#define GRPC_MDSTR_TRAILERS (grpc_static_slice_table[35])
#define GRPC_MDSTR_TRAILERS (grpc_static_slice_table[38])
/* "application/grpc" */
#define GRPC_MDSTR_APPLICATION_SLASH_GRPC (grpc_static_slice_table[36])
#define GRPC_MDSTR_APPLICATION_SLASH_GRPC (grpc_static_slice_table[39])
/* "POST" */
#define GRPC_MDSTR_POST (grpc_static_slice_table[37])
#define GRPC_MDSTR_POST (grpc_static_slice_table[40])
/* "200" */
#define GRPC_MDSTR_200 (grpc_static_slice_table[38])
#define GRPC_MDSTR_200 (grpc_static_slice_table[41])
/* "404" */
#define GRPC_MDSTR_404 (grpc_static_slice_table[39])
#define GRPC_MDSTR_404 (grpc_static_slice_table[42])
/* "http" */
#define GRPC_MDSTR_HTTP (grpc_static_slice_table[40])
#define GRPC_MDSTR_HTTP (grpc_static_slice_table[43])
/* "https" */
#define GRPC_MDSTR_HTTPS (grpc_static_slice_table[41])
#define GRPC_MDSTR_HTTPS (grpc_static_slice_table[44])
/* "grpc" */
#define GRPC_MDSTR_GRPC (grpc_static_slice_table[42])
#define GRPC_MDSTR_GRPC (grpc_static_slice_table[45])
/* "GET" */
#define GRPC_MDSTR_GET (grpc_static_slice_table[43])
#define GRPC_MDSTR_GET (grpc_static_slice_table[46])
/* "PUT" */
#define GRPC_MDSTR_PUT (grpc_static_slice_table[44])
#define GRPC_MDSTR_PUT (grpc_static_slice_table[47])
/* "/" */
#define GRPC_MDSTR_SLASH (grpc_static_slice_table[45])
#define GRPC_MDSTR_SLASH (grpc_static_slice_table[48])
/* "/index.html" */
#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (grpc_static_slice_table[46])
#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (grpc_static_slice_table[49])
/* "204" */
#define GRPC_MDSTR_204 (grpc_static_slice_table[47])
#define GRPC_MDSTR_204 (grpc_static_slice_table[50])
/* "206" */
#define GRPC_MDSTR_206 (grpc_static_slice_table[48])
#define GRPC_MDSTR_206 (grpc_static_slice_table[51])
/* "304" */
#define GRPC_MDSTR_304 (grpc_static_slice_table[49])
#define GRPC_MDSTR_304 (grpc_static_slice_table[52])
/* "400" */
#define GRPC_MDSTR_400 (grpc_static_slice_table[50])
#define GRPC_MDSTR_400 (grpc_static_slice_table[53])
/* "500" */
#define GRPC_MDSTR_500 (grpc_static_slice_table[51])
#define GRPC_MDSTR_500 (grpc_static_slice_table[54])
/* "accept-charset" */
#define GRPC_MDSTR_ACCEPT_CHARSET (grpc_static_slice_table[52])
#define GRPC_MDSTR_ACCEPT_CHARSET (grpc_static_slice_table[55])
/* "gzip, deflate" */
#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (grpc_static_slice_table[53])
#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (grpc_static_slice_table[56])
/* "accept-language" */
#define GRPC_MDSTR_ACCEPT_LANGUAGE (grpc_static_slice_table[54])
#define GRPC_MDSTR_ACCEPT_LANGUAGE (grpc_static_slice_table[57])
/* "accept-ranges" */
#define GRPC_MDSTR_ACCEPT_RANGES (grpc_static_slice_table[55])
#define GRPC_MDSTR_ACCEPT_RANGES (grpc_static_slice_table[58])
/* "accept" */
#define GRPC_MDSTR_ACCEPT (grpc_static_slice_table[56])
#define GRPC_MDSTR_ACCEPT (grpc_static_slice_table[59])
/* "access-control-allow-origin" */
#define GRPC_MDSTR_ACCESS_CONTROL_ALLOW_ORIGIN (grpc_static_slice_table[57])
#define GRPC_MDSTR_ACCESS_CONTROL_ALLOW_ORIGIN (grpc_static_slice_table[60])
/* "age" */
#define GRPC_MDSTR_AGE (grpc_static_slice_table[58])
#define GRPC_MDSTR_AGE (grpc_static_slice_table[61])
/* "allow" */
#define GRPC_MDSTR_ALLOW (grpc_static_slice_table[59])
#define GRPC_MDSTR_ALLOW (grpc_static_slice_table[62])
/* "authorization" */
#define GRPC_MDSTR_AUTHORIZATION (grpc_static_slice_table[60])
#define GRPC_MDSTR_AUTHORIZATION (grpc_static_slice_table[63])
/* "cache-control" */
#define GRPC_MDSTR_CACHE_CONTROL (grpc_static_slice_table[61])
#define GRPC_MDSTR_CACHE_CONTROL (grpc_static_slice_table[64])
/* "content-disposition" */
#define GRPC_MDSTR_CONTENT_DISPOSITION (grpc_static_slice_table[62])
#define GRPC_MDSTR_CONTENT_DISPOSITION (grpc_static_slice_table[65])
/* "content-language" */
#define GRPC_MDSTR_CONTENT_LANGUAGE (grpc_static_slice_table[63])
#define GRPC_MDSTR_CONTENT_LANGUAGE (grpc_static_slice_table[66])
/* "content-length" */
#define GRPC_MDSTR_CONTENT_LENGTH (grpc_static_slice_table[64])
#define GRPC_MDSTR_CONTENT_LENGTH (grpc_static_slice_table[67])
/* "content-location" */
#define GRPC_MDSTR_CONTENT_LOCATION (grpc_static_slice_table[65])
#define GRPC_MDSTR_CONTENT_LOCATION (grpc_static_slice_table[68])
/* "content-range" */
#define GRPC_MDSTR_CONTENT_RANGE (grpc_static_slice_table[66])
#define GRPC_MDSTR_CONTENT_RANGE (grpc_static_slice_table[69])
/* "cookie" */
#define GRPC_MDSTR_COOKIE (grpc_static_slice_table[67])
#define GRPC_MDSTR_COOKIE (grpc_static_slice_table[70])
/* "date" */
#define GRPC_MDSTR_DATE (grpc_static_slice_table[68])
#define GRPC_MDSTR_DATE (grpc_static_slice_table[71])
/* "etag" */
#define GRPC_MDSTR_ETAG (grpc_static_slice_table[69])
#define GRPC_MDSTR_ETAG (grpc_static_slice_table[72])
/* "expect" */
#define GRPC_MDSTR_EXPECT (grpc_static_slice_table[70])
#define GRPC_MDSTR_EXPECT (grpc_static_slice_table[73])
/* "expires" */
#define GRPC_MDSTR_EXPIRES (grpc_static_slice_table[71])
#define GRPC_MDSTR_EXPIRES (grpc_static_slice_table[74])
/* "from" */
#define GRPC_MDSTR_FROM (grpc_static_slice_table[72])
#define GRPC_MDSTR_FROM (grpc_static_slice_table[75])
/* "if-match" */
#define GRPC_MDSTR_IF_MATCH (grpc_static_slice_table[73])
#define GRPC_MDSTR_IF_MATCH (grpc_static_slice_table[76])
/* "if-modified-since" */
#define GRPC_MDSTR_IF_MODIFIED_SINCE (grpc_static_slice_table[74])
#define GRPC_MDSTR_IF_MODIFIED_SINCE (grpc_static_slice_table[77])
/* "if-none-match" */
#define GRPC_MDSTR_IF_NONE_MATCH (grpc_static_slice_table[75])
#define GRPC_MDSTR_IF_NONE_MATCH (grpc_static_slice_table[78])
/* "if-range" */
#define GRPC_MDSTR_IF_RANGE (grpc_static_slice_table[76])
#define GRPC_MDSTR_IF_RANGE (grpc_static_slice_table[79])
/* "if-unmodified-since" */
#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (grpc_static_slice_table[77])
#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (grpc_static_slice_table[80])
/* "last-modified" */
#define GRPC_MDSTR_LAST_MODIFIED (grpc_static_slice_table[78])
#define GRPC_MDSTR_LAST_MODIFIED (grpc_static_slice_table[81])
/* "lb-cost-bin" */
#define GRPC_MDSTR_LB_COST_BIN (grpc_static_slice_table[79])
#define GRPC_MDSTR_LB_COST_BIN (grpc_static_slice_table[82])
/* "link" */
#define GRPC_MDSTR_LINK (grpc_static_slice_table[80])
#define GRPC_MDSTR_LINK (grpc_static_slice_table[83])
/* "location" */
#define GRPC_MDSTR_LOCATION (grpc_static_slice_table[81])
#define GRPC_MDSTR_LOCATION (grpc_static_slice_table[84])
/* "max-forwards" */
#define GRPC_MDSTR_MAX_FORWARDS (grpc_static_slice_table[82])
#define GRPC_MDSTR_MAX_FORWARDS (grpc_static_slice_table[85])
/* "proxy-authenticate" */
#define GRPC_MDSTR_PROXY_AUTHENTICATE (grpc_static_slice_table[83])
#define GRPC_MDSTR_PROXY_AUTHENTICATE (grpc_static_slice_table[86])
/* "proxy-authorization" */
#define GRPC_MDSTR_PROXY_AUTHORIZATION (grpc_static_slice_table[84])
#define GRPC_MDSTR_PROXY_AUTHORIZATION (grpc_static_slice_table[87])
/* "range" */
#define GRPC_MDSTR_RANGE (grpc_static_slice_table[85])
#define GRPC_MDSTR_RANGE (grpc_static_slice_table[88])
/* "referer" */
#define GRPC_MDSTR_REFERER (grpc_static_slice_table[86])
#define GRPC_MDSTR_REFERER (grpc_static_slice_table[89])
/* "refresh" */
#define GRPC_MDSTR_REFRESH (grpc_static_slice_table[87])
#define GRPC_MDSTR_REFRESH (grpc_static_slice_table[90])
/* "retry-after" */
#define GRPC_MDSTR_RETRY_AFTER (grpc_static_slice_table[88])
#define GRPC_MDSTR_RETRY_AFTER (grpc_static_slice_table[91])
/* "server" */
#define GRPC_MDSTR_SERVER (grpc_static_slice_table[89])
#define GRPC_MDSTR_SERVER (grpc_static_slice_table[92])
/* "set-cookie" */
#define GRPC_MDSTR_SET_COOKIE (grpc_static_slice_table[90])
#define GRPC_MDSTR_SET_COOKIE (grpc_static_slice_table[93])
/* "strict-transport-security" */
#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (grpc_static_slice_table[91])
#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (grpc_static_slice_table[94])
/* "transfer-encoding" */
#define GRPC_MDSTR_TRANSFER_ENCODING (grpc_static_slice_table[92])
#define GRPC_MDSTR_TRANSFER_ENCODING (grpc_static_slice_table[95])
/* "vary" */
#define GRPC_MDSTR_VARY (grpc_static_slice_table[93])
#define GRPC_MDSTR_VARY (grpc_static_slice_table[96])
/* "via" */
#define GRPC_MDSTR_VIA (grpc_static_slice_table[94])
#define GRPC_MDSTR_VIA (grpc_static_slice_table[97])
/* "www-authenticate" */
#define GRPC_MDSTR_WWW_AUTHENTICATE (grpc_static_slice_table[95])
#define GRPC_MDSTR_WWW_AUTHENTICATE (grpc_static_slice_table[98])
/* "identity,deflate" */
#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (grpc_static_slice_table[96])
#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (grpc_static_slice_table[99])
/* "identity,gzip" */
#define GRPC_MDSTR_IDENTITY_COMMA_GZIP (grpc_static_slice_table[97])
#define GRPC_MDSTR_IDENTITY_COMMA_GZIP (grpc_static_slice_table[100])
/* "deflate,gzip" */
#define GRPC_MDSTR_DEFLATE_COMMA_GZIP (grpc_static_slice_table[98])
#define GRPC_MDSTR_DEFLATE_COMMA_GZIP (grpc_static_slice_table[101])
/* "identity,deflate,gzip" */
#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \
(grpc_static_slice_table[99])
(grpc_static_slice_table[102])
extern const grpc_slice_refcount_vtable grpc_static_metadata_vtable;
extern grpc_slice_refcount

@ -26,8 +26,8 @@ void grpc_deadline_filter_init(void);
void grpc_deadline_filter_shutdown(void);
void grpc_client_channel_init(void);
void grpc_client_channel_shutdown(void);
void grpc_tsi_gts_init(void);
void grpc_tsi_gts_shutdown(void);
void grpc_tsi_alts_init(void);
void grpc_tsi_alts_shutdown(void);
void grpc_server_load_reporting_plugin_init(void);
void grpc_server_load_reporting_plugin_shutdown(void);
@ -40,8 +40,8 @@ void grpc_register_built_in_plugins(void) {
grpc_deadline_filter_shutdown);
grpc_register_plugin(grpc_client_channel_init,
grpc_client_channel_shutdown);
grpc_register_plugin(grpc_tsi_gts_init,
grpc_tsi_gts_shutdown);
grpc_register_plugin(grpc_tsi_alts_init,
grpc_tsi_alts_shutdown);
grpc_register_plugin(grpc_server_load_reporting_plugin_init,
grpc_server_load_reporting_plugin_shutdown);
}

@ -22,8 +22,8 @@ void grpc_http_filters_init(void);
void grpc_http_filters_shutdown(void);
void grpc_chttp2_plugin_init(void);
void grpc_chttp2_plugin_shutdown(void);
void grpc_tsi_gts_init(void);
void grpc_tsi_gts_shutdown(void);
void grpc_tsi_alts_init(void);
void grpc_tsi_alts_shutdown(void);
void grpc_deadline_filter_init(void);
void grpc_deadline_filter_shutdown(void);
void grpc_client_channel_init(void);
@ -58,8 +58,8 @@ void grpc_register_built_in_plugins(void) {
grpc_http_filters_shutdown);
grpc_register_plugin(grpc_chttp2_plugin_init,
grpc_chttp2_plugin_shutdown);
grpc_register_plugin(grpc_tsi_gts_init,
grpc_tsi_gts_shutdown);
grpc_register_plugin(grpc_tsi_alts_init,
grpc_tsi_alts_shutdown);
grpc_register_plugin(grpc_deadline_filter_init,
grpc_deadline_filter_shutdown);
grpc_register_plugin(grpc_client_channel_init,

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

Loading…
Cancel
Save