aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--BUILD724
-rw-r--r--CMakeLists.txt2675
-rw-r--r--Makefile2769
-rwxr-xr-xRakefile4
-rw-r--r--binding.gyp603
-rw-r--r--build.yaml653
-rw-r--r--config.m4603
-rw-r--r--config.w32603
-rw-r--r--doc/environment_variables.md1
-rw-r--r--doc/g_stands_for.md1
-rw-r--r--examples/node/dynamic_codegen/greeter_server.js2
-rw-r--r--gRPC-Core.podspec628
-rw-r--r--gRPC-ProtoRPC.podspec2
-rw-r--r--gRPC-RxLibrary.podspec2
-rw-r--r--gRPC.podspec2
-rw-r--r--grpc.gemspec606
-rw-r--r--grpc.gyp1778
-rw-r--r--include/grpc++/support/channel_arguments.h6
-rw-r--r--include/grpc/grpc.h2
-rw-r--r--include/grpc/grpc_security.h35
-rw-r--r--include/grpc/impl/codegen/atm_gcc_atomic.h1
-rw-r--r--include/grpc/impl/codegen/atm_gcc_sync.h1
-rw-r--r--include/grpc/impl/codegen/atm_windows.h1
-rw-r--r--include/grpc/impl/codegen/grpc_types.h6
-rw-r--r--include/grpc/impl/codegen/port_platform.h9
-rw-r--r--include/grpc/module.modulemap63
-rw-r--r--include/grpc/support/avl.h8
-rw-r--r--package.json2
-rw-r--r--package.xml610
-rw-r--r--setup.py4
-rw-r--r--src/compiler/objective_c_generator.cc21
-rw-r--r--src/compiler/objective_c_generator.h4
-rw-r--r--src/compiler/objective_c_plugin.cc40
-rw-r--r--src/core/ext/census/base_resources.cc (renamed from src/core/ext/census/base_resources.c)14
-rw-r--r--src/core/ext/census/base_resources.h10
-rw-r--r--src/core/ext/census/census_init.cc (renamed from src/core/ext/census/census_init.c)0
-rw-r--r--src/core/ext/census/census_interface.h10
-rw-r--r--src/core/ext/census/census_log.cc (renamed from src/core/ext/census/census_log.c)0
-rw-r--r--src/core/ext/census/census_log.h10
-rw-r--r--src/core/ext/census/census_rpc_stats.cc (renamed from src/core/ext/census/census_rpc_stats.c)0
-rw-r--r--src/core/ext/census/census_tracing.cc (renamed from src/core/ext/census/census_tracing.c)0
-rw-r--r--src/core/ext/census/context.cc (renamed from src/core/ext/census/context.c)0
-rw-r--r--src/core/ext/census/grpc_context.cc (renamed from src/core/ext/census/grpc_context.c)0
-rw-r--r--src/core/ext/census/grpc_filter.cc (renamed from src/core/ext/census/grpc_filter.c)0
-rw-r--r--src/core/ext/census/grpc_filter.h8
-rw-r--r--src/core/ext/census/grpc_plugin.cc (renamed from src/core/ext/census/grpc_plugin.c)4
-rw-r--r--src/core/ext/census/hash_table.cc (renamed from src/core/ext/census/hash_table.c)0
-rw-r--r--src/core/ext/census/hash_table.h10
-rw-r--r--src/core/ext/census/initialize.cc (renamed from src/core/ext/census/initialize.c)0
-rw-r--r--src/core/ext/census/intrusive_hash_map.cc (renamed from src/core/ext/census/intrusive_hash_map.c)0
-rw-r--r--src/core/ext/census/intrusive_hash_map.h8
-rw-r--r--src/core/ext/census/mlog.cc (renamed from src/core/ext/census/mlog.c)0
-rw-r--r--src/core/ext/census/mlog.h10
-rw-r--r--src/core/ext/census/operation.cc (renamed from src/core/ext/census/operation.c)0
-rw-r--r--src/core/ext/census/placeholders.cc (renamed from src/core/ext/census/placeholders.c)0
-rw-r--r--src/core/ext/census/resource.cc (renamed from src/core/ext/census/resource.c)0
-rw-r--r--src/core/ext/census/resource.h10
-rw-r--r--src/core/ext/census/trace_context.cc (renamed from src/core/ext/census/trace_context.c)0
-rw-r--r--src/core/ext/census/trace_context.h10
-rw-r--r--src/core/ext/census/trace_propagation.h10
-rw-r--r--src/core/ext/census/tracing.cc (renamed from src/core/ext/census/tracing.c)0
-rw-r--r--src/core/ext/census/tracing.h10
-rw-r--r--src/core/ext/census/window_stats.cc (renamed from src/core/ext/census/window_stats.c)0
-rw-r--r--src/core/ext/census/window_stats.h10
-rw-r--r--src/core/ext/filters/client_channel/channel_connectivity.cc (renamed from src/core/ext/filters/client_channel/channel_connectivity.c)6
-rw-r--r--src/core/ext/filters/client_channel/client_channel.cc (renamed from src/core/ext/filters/client_channel/client_channel.c)52
-rw-r--r--src/core/ext/filters/client_channel/client_channel.h10
-rw-r--r--src/core/ext/filters/client_channel/client_channel_factory.cc (renamed from src/core/ext/filters/client_channel/client_channel_factory.c)0
-rw-r--r--src/core/ext/filters/client_channel/client_channel_factory.h10
-rw-r--r--src/core/ext/filters/client_channel/client_channel_plugin.cc (renamed from src/core/ext/filters/client_channel/client_channel_plugin.c)4
-rw-r--r--src/core/ext/filters/client_channel/connector.cc (renamed from src/core/ext/filters/client_channel/connector.c)0
-rw-r--r--src/core/ext/filters/client_channel/connector.h12
-rw-r--r--src/core/ext/filters/client_channel/http_connect_handshaker.cc (renamed from src/core/ext/filters/client_channel/http_connect_handshaker.c)0
-rw-r--r--src/core/ext/filters/client_channel/http_connect_handshaker.h10
-rw-r--r--src/core/ext/filters/client_channel/http_proxy.cc (renamed from src/core/ext/filters/client_channel/http_proxy.c)28
-rw-r--r--src/core/ext/filters/client_channel/http_proxy.h10
-rw-r--r--src/core/ext/filters/client_channel/lb_policy.cc (renamed from src/core/ext/filters/client_channel/lb_policy.c)0
-rw-r--r--src/core/ext/filters/client_channel/lb_policy.h8
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc (renamed from src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c)0
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h8
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc (renamed from src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c)481
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h10
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc (renamed from src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.c)0
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h8
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc (renamed from src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c)0
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc (renamed from src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c)0
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h8
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc (renamed from src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c)11
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h3
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc (renamed from src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c)4
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc (renamed from src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c)4
-rw-r--r--src/core/ext/filters/client_channel/lb_policy_factory.cc (renamed from src/core/ext/filters/client_channel/lb_policy_factory.c)2
-rw-r--r--src/core/ext/filters/client_channel/lb_policy_factory.h12
-rw-r--r--src/core/ext/filters/client_channel/lb_policy_registry.cc (renamed from src/core/ext/filters/client_channel/lb_policy_registry.c)0
-rw-r--r--src/core/ext/filters/client_channel/lb_policy_registry.h10
-rw-r--r--src/core/ext/filters/client_channel/parse_address.cc (renamed from src/core/ext/filters/client_channel/parse_address.c)0
-rw-r--r--src/core/ext/filters/client_channel/parse_address.h10
-rw-r--r--src/core/ext/filters/client_channel/proxy_mapper.cc (renamed from src/core/ext/filters/client_channel/proxy_mapper.c)0
-rw-r--r--src/core/ext/filters/client_channel/proxy_mapper.h10
-rw-r--r--src/core/ext/filters/client_channel/proxy_mapper_registry.cc (renamed from src/core/ext/filters/client_channel/proxy_mapper_registry.c)0
-rw-r--r--src/core/ext/filters/client_channel/proxy_mapper_registry.h10
-rw-r--r--src/core/ext/filters/client_channel/resolver.cc (renamed from src/core/ext/filters/client_channel/resolver.c)0
-rw-r--r--src/core/ext/filters/client_channel/resolver.h8
-rw-r--r--src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc (renamed from src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c)38
-rw-r--r--src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h8
-rw-r--r--src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc (renamed from src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c)0
-rw-r--r--src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc (renamed from src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c)0
-rw-r--r--src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h8
-rw-r--r--src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc (renamed from src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c)0
-rw-r--r--src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc (renamed from src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c)41
-rw-r--r--src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc (renamed from src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c)4
-rw-r--r--src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h8
-rw-r--r--src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc (renamed from src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c)4
-rw-r--r--src/core/ext/filters/client_channel/resolver_factory.cc (renamed from src/core/ext/filters/client_channel/resolver_factory.c)0
-rw-r--r--src/core/ext/filters/client_channel/resolver_factory.h10
-rw-r--r--src/core/ext/filters/client_channel/resolver_registry.cc (renamed from src/core/ext/filters/client_channel/resolver_registry.c)0
-rw-r--r--src/core/ext/filters/client_channel/resolver_registry.h10
-rw-r--r--src/core/ext/filters/client_channel/retry_throttle.cc (renamed from src/core/ext/filters/client_channel/retry_throttle.c)0
-rw-r--r--src/core/ext/filters/client_channel/retry_throttle.h10
-rw-r--r--src/core/ext/filters/client_channel/subchannel.cc (renamed from src/core/ext/filters/client_channel/subchannel.c)57
-rw-r--r--src/core/ext/filters/client_channel/subchannel.h10
-rw-r--r--src/core/ext/filters/client_channel/subchannel_index.cc (renamed from src/core/ext/filters/client_channel/subchannel_index.c)11
-rw-r--r--src/core/ext/filters/client_channel/subchannel_index.h10
-rw-r--r--src/core/ext/filters/client_channel/uri_parser.cc (renamed from src/core/ext/filters/client_channel/uri_parser.c)0
-rw-r--r--src/core/ext/filters/client_channel/uri_parser.h10
-rw-r--r--src/core/ext/filters/deadline/deadline_filter.cc (renamed from src/core/ext/filters/deadline/deadline_filter.c)21
-rw-r--r--src/core/ext/filters/deadline/deadline_filter.h15
-rw-r--r--src/core/ext/filters/http/client/http_client_filter.cc (renamed from src/core/ext/filters/http/client/http_client_filter.c)0
-rw-r--r--src/core/ext/filters/http/client/http_client_filter.h8
-rw-r--r--src/core/ext/filters/http/http_filters_plugin.cc (renamed from src/core/ext/filters/http/http_filters_plugin.c)4
-rw-r--r--src/core/ext/filters/http/message_compress/message_compress_filter.cc (renamed from src/core/ext/filters/http/message_compress/message_compress_filter.c)0
-rw-r--r--src/core/ext/filters/http/message_compress/message_compress_filter.h8
-rw-r--r--src/core/ext/filters/http/server/http_server_filter.cc (renamed from src/core/ext/filters/http/server/http_server_filter.c)0
-rw-r--r--src/core/ext/filters/http/server/http_server_filter.h8
-rw-r--r--src/core/ext/filters/load_reporting/server_load_reporting_filter.cc (renamed from src/core/ext/filters/load_reporting/server_load_reporting_filter.c)0
-rw-r--r--src/core/ext/filters/load_reporting/server_load_reporting_filter.h8
-rw-r--r--src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc (renamed from src/core/ext/filters/load_reporting/server_load_reporting_plugin.c)4
-rw-r--r--src/core/ext/filters/load_reporting/server_load_reporting_plugin.h8
-rw-r--r--src/core/ext/filters/max_age/max_age_filter.cc (renamed from src/core/ext/filters/max_age/max_age_filter.c)86
-rw-r--r--src/core/ext/filters/max_age/max_age_filter.h8
-rw-r--r--src/core/ext/filters/message_size/message_size_filter.cc (renamed from src/core/ext/filters/message_size/message_size_filter.c)4
-rw-r--r--src/core/ext/filters/message_size/message_size_filter.h8
-rw-r--r--src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc (renamed from src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c)4
-rw-r--r--src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h8
-rw-r--r--src/core/ext/filters/workarounds/workaround_utils.cc (renamed from src/core/ext/filters/workarounds/workaround_utils.c)0
-rw-r--r--src/core/ext/filters/workarounds/workaround_utils.h10
-rw-r--r--src/core/ext/transport/chttp2/alpn/alpn.cc (renamed from src/core/ext/transport/chttp2/alpn/alpn.c)0
-rw-r--r--src/core/ext/transport/chttp2/alpn/alpn.h10
-rw-r--r--src/core/ext/transport/chttp2/client/chttp2_connector.cc (renamed from src/core/ext/transport/chttp2/client/chttp2_connector.c)0
-rw-r--r--src/core/ext/transport/chttp2/client/chttp2_connector.h8
-rw-r--r--src/core/ext/transport/chttp2/client/insecure/channel_create.cc (renamed from src/core/ext/transport/chttp2/client/insecure/channel_create.c)0
-rw-r--r--src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc (renamed from src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c)0
-rw-r--r--src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc (renamed from src/core/ext/transport/chttp2/client/secure/secure_channel_create.c)8
-rw-r--r--src/core/ext/transport/chttp2/server/chttp2_server.cc (renamed from src/core/ext/transport/chttp2/server/chttp2_server.c)5
-rw-r--r--src/core/ext/transport/chttp2/server/chttp2_server.h10
-rw-r--r--src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc (renamed from src/core/ext/transport/chttp2/server/insecure/server_chttp2.c)0
-rw-r--r--src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc (renamed from src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c)0
-rw-r--r--src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc (renamed from src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c)6
-rw-r--r--src/core/ext/transport/chttp2/transport/bin_decoder.cc (renamed from src/core/ext/transport/chttp2/transport/bin_decoder.c)0
-rw-r--r--src/core/ext/transport/chttp2/transport/bin_decoder.h10
-rw-r--r--src/core/ext/transport/chttp2/transport/bin_encoder.cc (renamed from src/core/ext/transport/chttp2/transport/bin_encoder.c)0
-rw-r--r--src/core/ext/transport/chttp2/transport/bin_encoder.h10
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_plugin.cc (renamed from src/core/ext/transport/chttp2/transport/chttp2_plugin.c)4
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.cc (renamed from src/core/ext/transport/chttp2/transport/chttp2_transport.c)310
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.h8
-rw-r--r--src/core/ext/transport/chttp2/transport/flow_control.cc (renamed from src/core/ext/transport/chttp2/transport/flow_control.c)93
-rw-r--r--src/core/ext/transport/chttp2/transport/frame.h8
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_data.cc (renamed from src/core/ext/transport/chttp2/transport/frame_data.c)0
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_data.h10
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_goaway.cc (renamed from src/core/ext/transport/chttp2/transport/frame_goaway.c)0
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_goaway.h10
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_ping.cc (renamed from src/core/ext/transport/chttp2/transport/frame_ping.c)13
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_ping.h10
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_rst_stream.cc (renamed from src/core/ext/transport/chttp2/transport/frame_rst_stream.c)0
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_rst_stream.h10
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_settings.cc (renamed from src/core/ext/transport/chttp2/transport/frame_settings.c)0
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_settings.h10
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_window_update.cc (renamed from src/core/ext/transport/chttp2/transport/frame_window_update.c)0
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_window_update.h10
-rw-r--r--src/core/ext/transport/chttp2/transport/hpack_encoder.cc (renamed from src/core/ext/transport/chttp2/transport/hpack_encoder.c)12
-rw-r--r--src/core/ext/transport/chttp2/transport/hpack_encoder.h10
-rw-r--r--src/core/ext/transport/chttp2/transport/hpack_parser.cc (renamed from src/core/ext/transport/chttp2/transport/hpack_parser.c)0
-rw-r--r--src/core/ext/transport/chttp2/transport/hpack_parser.h10
-rw-r--r--src/core/ext/transport/chttp2/transport/hpack_table.cc (renamed from src/core/ext/transport/chttp2/transport/hpack_table.c)2
-rw-r--r--src/core/ext/transport/chttp2/transport/hpack_table.h8
-rw-r--r--src/core/ext/transport/chttp2/transport/http2_settings.cc (renamed from src/core/ext/transport/chttp2/transport/http2_settings.c)0
-rw-r--r--src/core/ext/transport/chttp2/transport/http2_settings.h10
-rw-r--r--src/core/ext/transport/chttp2/transport/huffsyms.cc (renamed from src/core/ext/transport/chttp2/transport/huffsyms.c)0
-rw-r--r--src/core/ext/transport/chttp2/transport/huffsyms.h8
-rw-r--r--src/core/ext/transport/chttp2/transport/incoming_metadata.cc (renamed from src/core/ext/transport/chttp2/transport/incoming_metadata.c)4
-rw-r--r--src/core/ext/transport/chttp2/transport/incoming_metadata.h12
-rw-r--r--src/core/ext/transport/chttp2/transport/internal.h44
-rw-r--r--src/core/ext/transport/chttp2/transport/parsing.cc (renamed from src/core/ext/transport/chttp2/transport/parsing.c)26
-rw-r--r--src/core/ext/transport/chttp2/transport/stream_lists.cc (renamed from src/core/ext/transport/chttp2/transport/stream_lists.c)3
-rw-r--r--src/core/ext/transport/chttp2/transport/stream_map.cc (renamed from src/core/ext/transport/chttp2/transport/stream_map.c)0
-rw-r--r--src/core/ext/transport/chttp2/transport/stream_map.h10
-rw-r--r--src/core/ext/transport/chttp2/transport/varint.cc (renamed from src/core/ext/transport/chttp2/transport/varint.c)0
-rw-r--r--src/core/ext/transport/chttp2/transport/varint.h8
-rw-r--r--src/core/ext/transport/chttp2/transport/writing.cc (renamed from src/core/ext/transport/chttp2/transport/writing.c)153
-rw-r--r--src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc (renamed from src/core/ext/transport/cronet/client/secure/cronet_channel_create.c)2
-rw-r--r--src/core/ext/transport/cronet/transport/cronet_api_dummy.cc (renamed from src/core/ext/transport/cronet/transport/cronet_api_dummy.c)0
-rw-r--r--src/core/ext/transport/cronet/transport/cronet_transport.cc (renamed from src/core/ext/transport/cronet/transport/cronet_transport.c)17
-rw-r--r--src/core/ext/transport/cronet/transport/cronet_transport.h8
-rw-r--r--src/core/ext/transport/inproc/inproc_plugin.cc (renamed from src/core/ext/transport/inproc/inproc_plugin.c)6
-rw-r--r--src/core/ext/transport/inproc/inproc_transport.cc (renamed from src/core/ext/transport/inproc/inproc_transport.c)16
-rw-r--r--src/core/lib/backoff/backoff.cc (renamed from src/core/lib/support/backoff.c)33
-rw-r--r--src/core/lib/backoff/backoff.h (renamed from src/core/lib/support/backoff.h)42
-rw-r--r--src/core/lib/channel/channel_args.cc (renamed from src/core/lib/channel/channel_args.c)0
-rw-r--r--src/core/lib/channel/channel_args.h10
-rw-r--r--src/core/lib/channel/channel_stack.cc (renamed from src/core/lib/channel/channel_stack.c)0
-rw-r--r--src/core/lib/channel/channel_stack.h2
-rw-r--r--src/core/lib/channel/channel_stack_builder.cc (renamed from src/core/lib/channel/channel_stack_builder.c)0
-rw-r--r--src/core/lib/channel/connected_channel.cc (renamed from src/core/lib/channel/connected_channel.c)0
-rw-r--r--src/core/lib/channel/connected_channel.h10
-rw-r--r--src/core/lib/channel/handshaker.cc (renamed from src/core/lib/channel/handshaker.c)6
-rw-r--r--src/core/lib/channel/handshaker.h12
-rw-r--r--src/core/lib/channel/handshaker_factory.cc (renamed from src/core/lib/channel/handshaker_factory.c)0
-rw-r--r--src/core/lib/channel/handshaker_factory.h10
-rw-r--r--src/core/lib/channel/handshaker_registry.cc (renamed from src/core/lib/channel/handshaker_registry.c)0
-rw-r--r--src/core/lib/channel/handshaker_registry.h10
-rw-r--r--src/core/lib/compression/algorithm_metadata.h10
-rw-r--r--src/core/lib/compression/compression.cc (renamed from src/core/lib/compression/compression.c)4
-rw-r--r--src/core/lib/compression/compression_internal.cc (renamed from src/core/lib/compression/compression_internal.c)0
-rw-r--r--src/core/lib/compression/compression_internal.h8
-rw-r--r--src/core/lib/compression/message_compress.cc (renamed from src/core/lib/compression/message_compress.c)0
-rw-r--r--src/core/lib/compression/message_compress.h8
-rw-r--r--src/core/lib/compression/stream_compression.cc (renamed from src/core/lib/compression/stream_compression.c)2
-rw-r--r--src/core/lib/compression/stream_compression.h8
-rw-r--r--src/core/lib/compression/stream_compression_gzip.cc (renamed from src/core/lib/compression/stream_compression_gzip.c)7
-rw-r--r--src/core/lib/compression/stream_compression_gzip.h8
-rw-r--r--src/core/lib/compression/stream_compression_identity.cc (renamed from src/core/lib/compression/stream_compression_identity.c)9
-rw-r--r--src/core/lib/compression/stream_compression_identity.h8
-rw-r--r--src/core/lib/debug/stats.cc (renamed from src/core/lib/debug/stats.c)0
-rw-r--r--src/core/lib/debug/stats.h8
-rw-r--r--src/core/lib/debug/stats_data.cc (renamed from src/core/lib/debug/stats_data.c)64
-rw-r--r--src/core/lib/debug/stats_data.h38
-rw-r--r--src/core/lib/debug/stats_data.yaml11
-rw-r--r--src/core/lib/debug/stats_data_bq_schema.sql3
-rw-r--r--src/core/lib/debug/trace.cc (renamed from src/core/lib/debug/trace.c)1
-rw-r--r--src/core/lib/debug/trace.h8
-rw-r--r--src/core/lib/http/format_request.cc (renamed from src/core/lib/http/format_request.c)0
-rw-r--r--src/core/lib/http/format_request.h10
-rw-r--r--src/core/lib/http/httpcli.cc (renamed from src/core/lib/http/httpcli.c)13
-rw-r--r--src/core/lib/http/httpcli.h22
-rw-r--r--src/core/lib/http/httpcli_security_connector.cc (renamed from src/core/lib/http/httpcli_security_connector.c)11
-rw-r--r--src/core/lib/http/parser.cc (renamed from src/core/lib/http/parser.c)0
-rw-r--r--src/core/lib/http/parser.h10
-rw-r--r--src/core/lib/iomgr/block_annotate.h (renamed from src/core/lib/support/block_annotate.h)25
-rw-r--r--src/core/lib/iomgr/call_combiner.cc (renamed from src/core/lib/iomgr/call_combiner.c)2
-rw-r--r--src/core/lib/iomgr/call_combiner.h8
-rw-r--r--src/core/lib/iomgr/closure.cc (renamed from src/core/lib/iomgr/closure.c)0
-rw-r--r--src/core/lib/iomgr/combiner.cc (renamed from src/core/lib/iomgr/combiner.c)1
-rw-r--r--src/core/lib/iomgr/combiner.h8
-rw-r--r--src/core/lib/iomgr/endpoint.cc (renamed from src/core/lib/iomgr/endpoint.c)0
-rw-r--r--src/core/lib/iomgr/endpoint.h10
-rw-r--r--src/core/lib/iomgr/endpoint_pair.h10
-rw-r--r--src/core/lib/iomgr/endpoint_pair_posix.cc (renamed from src/core/lib/iomgr/endpoint_pair_posix.c)0
-rw-r--r--src/core/lib/iomgr/endpoint_pair_uv.cc (renamed from src/core/lib/iomgr/endpoint_pair_uv.c)0
-rw-r--r--src/core/lib/iomgr/endpoint_pair_windows.cc (renamed from src/core/lib/iomgr/endpoint_pair_windows.c)0
-rw-r--r--src/core/lib/iomgr/error.cc (renamed from src/core/lib/iomgr/error.c)2
-rw-r--r--src/core/lib/iomgr/error.h2
-rw-r--r--src/core/lib/iomgr/error_internal.h10
-rw-r--r--src/core/lib/iomgr/ev_epoll1_linux.cc (renamed from src/core/lib/iomgr/ev_epoll1_linux.c)57
-rw-r--r--src/core/lib/iomgr/ev_epoll1_linux.h10
-rw-r--r--src/core/lib/iomgr/ev_epollex_linux.cc (renamed from src/core/lib/iomgr/ev_epollex_linux.c)82
-rw-r--r--src/core/lib/iomgr/ev_epollex_linux.h10
-rw-r--r--src/core/lib/iomgr/ev_epollsig_linux.cc (renamed from src/core/lib/iomgr/ev_epollsig_linux.c)43
-rw-r--r--src/core/lib/iomgr/ev_epollsig_linux.h8
-rw-r--r--src/core/lib/iomgr/ev_poll_posix.cc (renamed from src/core/lib/iomgr/ev_poll_posix.c)43
-rw-r--r--src/core/lib/iomgr/ev_poll_posix.h10
-rw-r--r--src/core/lib/iomgr/ev_posix.cc (renamed from src/core/lib/iomgr/ev_posix.c)6
-rw-r--r--src/core/lib/iomgr/ev_posix.h14
-rw-r--r--src/core/lib/iomgr/ev_windows.cc (renamed from src/core/lib/iomgr/ev_windows.c)0
-rw-r--r--src/core/lib/iomgr/exec_ctx.cc (renamed from src/core/lib/iomgr/exec_ctx.c)62
-rw-r--r--src/core/lib/iomgr/exec_ctx.h26
-rw-r--r--src/core/lib/iomgr/executor.cc (renamed from src/core/lib/iomgr/executor.c)74
-rw-r--r--src/core/lib/iomgr/executor.h10
-rw-r--r--src/core/lib/iomgr/gethostname.h8
-rw-r--r--src/core/lib/iomgr/gethostname_fallback.cc (renamed from src/core/lib/iomgr/gethostname_fallback.c)1
-rw-r--r--src/core/lib/iomgr/gethostname_host_name_max.cc (renamed from src/core/lib/iomgr/gethostname_host_name_max.c)1
-rw-r--r--src/core/lib/iomgr/gethostname_sysconf.cc (renamed from src/core/lib/iomgr/gethostname_sysconf.c)1
-rw-r--r--src/core/lib/iomgr/iocp_windows.cc (renamed from src/core/lib/iomgr/iocp_windows.c)29
-rw-r--r--src/core/lib/iomgr/iocp_windows.h12
-rw-r--r--src/core/lib/iomgr/iomgr.cc (renamed from src/core/lib/iomgr/iomgr.c)10
-rw-r--r--src/core/lib/iomgr/iomgr.h10
-rw-r--r--src/core/lib/iomgr/iomgr_internal.h10
-rw-r--r--src/core/lib/iomgr/iomgr_posix.cc (renamed from src/core/lib/iomgr/iomgr_posix.c)0
-rw-r--r--src/core/lib/iomgr/iomgr_uv.cc (renamed from src/core/lib/iomgr/iomgr_uv.c)0
-rw-r--r--src/core/lib/iomgr/iomgr_uv.h8
-rw-r--r--src/core/lib/iomgr/iomgr_windows.cc (renamed from src/core/lib/iomgr/iomgr_windows.c)0
-rw-r--r--src/core/lib/iomgr/is_epollexclusive_available.cc (renamed from src/core/lib/iomgr/is_epollexclusive_available.c)0
-rw-r--r--src/core/lib/iomgr/is_epollexclusive_available.h10
-rw-r--r--src/core/lib/iomgr/load_file.cc (renamed from src/core/lib/iomgr/load_file.c)4
-rw-r--r--src/core/lib/iomgr/lockfree_event.cc (renamed from src/core/lib/iomgr/lockfree_event.c)0
-rw-r--r--src/core/lib/iomgr/lockfree_event.h10
-rw-r--r--src/core/lib/iomgr/network_status_tracker.cc (renamed from src/core/lib/iomgr/network_status_tracker.c)1
-rw-r--r--src/core/lib/iomgr/network_status_tracker.h10
-rw-r--r--src/core/lib/iomgr/polling_entity.cc (renamed from src/core/lib/iomgr/polling_entity.c)0
-rw-r--r--src/core/lib/iomgr/polling_entity.h10
-rw-r--r--src/core/lib/iomgr/pollset.h12
-rw-r--r--src/core/lib/iomgr/pollset_set.h10
-rw-r--r--src/core/lib/iomgr/pollset_set_uv.cc (renamed from src/core/lib/iomgr/pollset_set_uv.c)0
-rw-r--r--src/core/lib/iomgr/pollset_set_windows.cc (renamed from src/core/lib/iomgr/pollset_set_windows.c)0
-rw-r--r--src/core/lib/iomgr/pollset_uv.cc (renamed from src/core/lib/iomgr/pollset_uv.c)9
-rw-r--r--src/core/lib/iomgr/pollset_uv.h10
-rw-r--r--src/core/lib/iomgr/pollset_windows.cc (renamed from src/core/lib/iomgr/pollset_windows.c)5
-rw-r--r--src/core/lib/iomgr/pollset_windows.h10
-rw-r--r--src/core/lib/iomgr/resolve_address.h10
-rw-r--r--src/core/lib/iomgr/resolve_address_posix.cc (renamed from src/core/lib/iomgr/resolve_address_posix.c)6
-rw-r--r--src/core/lib/iomgr/resolve_address_uv.cc (renamed from src/core/lib/iomgr/resolve_address_uv.c)25
-rw-r--r--src/core/lib/iomgr/resolve_address_windows.cc (renamed from src/core/lib/iomgr/resolve_address_windows.c)16
-rw-r--r--src/core/lib/iomgr/resource_quota.cc (renamed from src/core/lib/iomgr/resource_quota.c)35
-rw-r--r--src/core/lib/iomgr/resource_quota.h10
-rw-r--r--src/core/lib/iomgr/sockaddr_utils.cc (renamed from src/core/lib/iomgr/sockaddr_utils.c)1
-rw-r--r--src/core/lib/iomgr/sockaddr_utils.h10
-rw-r--r--src/core/lib/iomgr/socket_factory_posix.cc (renamed from src/core/lib/iomgr/socket_factory_posix.c)0
-rw-r--r--src/core/lib/iomgr/socket_mutator.cc (renamed from src/core/lib/iomgr/socket_mutator.c)0
-rw-r--r--src/core/lib/iomgr/socket_utils.h10
-rw-r--r--src/core/lib/iomgr/socket_utils_common_posix.cc (renamed from src/core/lib/iomgr/socket_utils_common_posix.c)0
-rw-r--r--src/core/lib/iomgr/socket_utils_linux.cc (renamed from src/core/lib/iomgr/socket_utils_linux.c)0
-rw-r--r--src/core/lib/iomgr/socket_utils_posix.cc (renamed from src/core/lib/iomgr/socket_utils_posix.c)0
-rw-r--r--src/core/lib/iomgr/socket_utils_posix.h10
-rw-r--r--src/core/lib/iomgr/socket_utils_uv.cc (renamed from src/core/lib/iomgr/socket_utils_uv.c)0
-rw-r--r--src/core/lib/iomgr/socket_utils_windows.cc (renamed from src/core/lib/iomgr/socket_utils_windows.c)4
-rw-r--r--src/core/lib/iomgr/socket_windows.cc (renamed from src/core/lib/iomgr/socket_windows.c)2
-rw-r--r--src/core/lib/iomgr/socket_windows.h10
-rw-r--r--src/core/lib/iomgr/tcp_client.h12
-rw-r--r--src/core/lib/iomgr/tcp_client_posix.cc (renamed from src/core/lib/iomgr/tcp_client_posix.c)13
-rw-r--r--src/core/lib/iomgr/tcp_client_posix.h10
-rw-r--r--src/core/lib/iomgr/tcp_client_uv.cc (renamed from src/core/lib/iomgr/tcp_client_uv.c)24
-rw-r--r--src/core/lib/iomgr/tcp_client_windows.cc (renamed from src/core/lib/iomgr/tcp_client_windows.c)20
-rw-r--r--src/core/lib/iomgr/tcp_posix.cc (renamed from src/core/lib/iomgr/tcp_posix.c)10
-rw-r--r--src/core/lib/iomgr/tcp_posix.h10
-rw-r--r--src/core/lib/iomgr/tcp_server.h10
-rw-r--r--src/core/lib/iomgr/tcp_server_posix.cc (renamed from src/core/lib/iomgr/tcp_server_posix.c)0
-rw-r--r--src/core/lib/iomgr/tcp_server_utils_posix.h10
-rw-r--r--src/core/lib/iomgr/tcp_server_utils_posix_common.cc (renamed from src/core/lib/iomgr/tcp_server_utils_posix_common.c)0
-rw-r--r--src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc (renamed from src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c)0
-rw-r--r--src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc (renamed from src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c)0
-rw-r--r--src/core/lib/iomgr/tcp_server_uv.cc (renamed from src/core/lib/iomgr/tcp_server_uv.c)20
-rw-r--r--src/core/lib/iomgr/tcp_server_windows.cc (renamed from src/core/lib/iomgr/tcp_server_windows.c)18
-rw-r--r--src/core/lib/iomgr/tcp_uv.cc (renamed from src/core/lib/iomgr/tcp_uv.c)10
-rw-r--r--src/core/lib/iomgr/tcp_uv.h10
-rw-r--r--src/core/lib/iomgr/tcp_windows.cc (renamed from src/core/lib/iomgr/tcp_windows.c)7
-rw-r--r--src/core/lib/iomgr/tcp_windows.h10
-rw-r--r--src/core/lib/iomgr/time_averaged_stats.cc (renamed from src/core/lib/iomgr/time_averaged_stats.c)0
-rw-r--r--src/core/lib/iomgr/time_averaged_stats.h10
-rw-r--r--src/core/lib/iomgr/timer.h15
-rw-r--r--src/core/lib/iomgr/timer_generic.cc (renamed from src/core/lib/iomgr/timer_generic.c)262
-rw-r--r--src/core/lib/iomgr/timer_generic.h3
-rw-r--r--src/core/lib/iomgr/timer_heap.cc (renamed from src/core/lib/iomgr/timer_heap.c)0
-rw-r--r--src/core/lib/iomgr/timer_heap.h10
-rw-r--r--src/core/lib/iomgr/timer_manager.cc (renamed from src/core/lib/iomgr/timer_manager.c)54
-rw-r--r--src/core/lib/iomgr/timer_manager.h10
-rw-r--r--src/core/lib/iomgr/timer_uv.cc (renamed from src/core/lib/iomgr/timer_uv.c)13
-rw-r--r--src/core/lib/iomgr/udp_server.cc (renamed from src/core/lib/iomgr/udp_server.c)0
-rw-r--r--src/core/lib/iomgr/udp_server.h10
-rw-r--r--src/core/lib/iomgr/unix_sockets_posix.cc (renamed from src/core/lib/iomgr/unix_sockets_posix.c)0
-rw-r--r--src/core/lib/iomgr/unix_sockets_posix.h10
-rw-r--r--src/core/lib/iomgr/unix_sockets_posix_noop.cc (renamed from src/core/lib/iomgr/unix_sockets_posix_noop.c)0
-rw-r--r--src/core/lib/iomgr/wakeup_fd_cv.cc (renamed from src/core/lib/iomgr/wakeup_fd_cv.c)0
-rw-r--r--src/core/lib/iomgr/wakeup_fd_cv.h10
-rw-r--r--src/core/lib/iomgr/wakeup_fd_eventfd.cc (renamed from src/core/lib/iomgr/wakeup_fd_eventfd.c)0
-rw-r--r--src/core/lib/iomgr/wakeup_fd_nospecial.cc (renamed from src/core/lib/iomgr/wakeup_fd_nospecial.c)0
-rw-r--r--src/core/lib/iomgr/wakeup_fd_pipe.cc (renamed from src/core/lib/iomgr/wakeup_fd_pipe.c)1
-rw-r--r--src/core/lib/iomgr/wakeup_fd_pipe.h10
-rw-r--r--src/core/lib/iomgr/wakeup_fd_posix.cc (renamed from src/core/lib/iomgr/wakeup_fd_posix.c)1
-rw-r--r--src/core/lib/iomgr/wakeup_fd_posix.h8
-rw-r--r--src/core/lib/json/json.cc (renamed from src/core/lib/json/json.c)0
-rw-r--r--src/core/lib/json/json.h10
-rw-r--r--src/core/lib/json/json_reader.cc (renamed from src/core/lib/json/json_reader.c)0
-rw-r--r--src/core/lib/json/json_reader.h10
-rw-r--r--src/core/lib/json/json_string.cc (renamed from src/core/lib/json/json_string.c)0
-rw-r--r--src/core/lib/json/json_writer.cc (renamed from src/core/lib/json/json_writer.c)0
-rw-r--r--src/core/lib/json/json_writer.h10
-rw-r--r--src/core/lib/profiling/basic_timers.cc (renamed from src/core/lib/profiling/basic_timers.c)4
-rw-r--r--src/core/lib/profiling/stap_timers.cc (renamed from src/core/lib/profiling/stap_timers.c)0
-rw-r--r--src/core/lib/security/context/security_context.cc (renamed from src/core/lib/security/context/security_context.c)26
-rw-r--r--src/core/lib/security/credentials/composite/composite_credentials.cc (renamed from src/core/lib/security/credentials/composite/composite_credentials.c)26
-rw-r--r--src/core/lib/security/credentials/composite/composite_credentials.h8
-rw-r--r--src/core/lib/security/credentials/credentials.cc (renamed from src/core/lib/security/credentials/credentials.c)22
-rw-r--r--src/core/lib/security/credentials/credentials.h8
-rw-r--r--src/core/lib/security/credentials/credentials_metadata.cc (renamed from src/core/lib/security/credentials/credentials_metadata.c)3
-rw-r--r--src/core/lib/security/credentials/fake/fake_credentials.cc (renamed from src/core/lib/security/credentials/fake/fake_credentials.c)13
-rw-r--r--src/core/lib/security/credentials/fake/fake_credentials.h10
-rw-r--r--src/core/lib/security/credentials/google_default/credentials_generic.cc (renamed from src/core/lib/security/credentials/google_default/credentials_generic.c)0
-rw-r--r--src/core/lib/security/credentials/google_default/google_default_credentials.cc (renamed from src/core/lib/security/credentials/google_default/google_default_credentials.c)16
-rw-r--r--src/core/lib/security/credentials/google_default/google_default_credentials.h8
-rw-r--r--src/core/lib/security/credentials/iam/iam_credentials.cc (renamed from src/core/lib/security/credentials/iam/iam_credentials.c)3
-rw-r--r--src/core/lib/security/credentials/jwt/json_token.cc (renamed from src/core/lib/security/credentials/jwt/json_token.c)9
-rw-r--r--src/core/lib/security/credentials/jwt/json_token.h8
-rw-r--r--src/core/lib/security/credentials/jwt/jwt_credentials.cc (renamed from src/core/lib/security/credentials/jwt/jwt_credentials.c)6
-rw-r--r--src/core/lib/security/credentials/jwt/jwt_credentials.h10
-rw-r--r--src/core/lib/security/credentials/jwt/jwt_verifier.cc (renamed from src/core/lib/security/credentials/jwt/jwt_verifier.c)43
-rw-r--r--src/core/lib/security/credentials/jwt/jwt_verifier.h10
-rw-r--r--src/core/lib/security/credentials/oauth2/oauth2_credentials.cc (renamed from src/core/lib/security/credentials/oauth2/oauth2_credentials.c)62
-rw-r--r--src/core/lib/security/credentials/oauth2/oauth2_credentials.h16
-rw-r--r--src/core/lib/security/credentials/plugin/plugin_credentials.cc (renamed from src/core/lib/security/credentials/plugin/plugin_credentials.c)185
-rw-r--r--src/core/lib/security/credentials/plugin/plugin_credentials.h2
-rw-r--r--src/core/lib/security/credentials/ssl/ssl_credentials.cc (renamed from src/core/lib/security/credentials/ssl/ssl_credentials.c)15
-rw-r--r--src/core/lib/security/transport/auth_filters.h8
-rw-r--r--src/core/lib/security/transport/client_auth_filter.cc (renamed from src/core/lib/security/transport/client_auth_filter.c)32
-rw-r--r--src/core/lib/security/transport/lb_targets_info.cc (renamed from src/core/lib/security/transport/lb_targets_info.c)13
-rw-r--r--src/core/lib/security/transport/lb_targets_info.h10
-rw-r--r--src/core/lib/security/transport/secure_endpoint.cc (renamed from src/core/lib/security/transport/secure_endpoint.c)0
-rw-r--r--src/core/lib/security/transport/secure_endpoint.h10
-rw-r--r--src/core/lib/security/transport/security_connector.cc (renamed from src/core/lib/security/transport/security_connector.c)37
-rw-r--r--src/core/lib/security/transport/security_connector.h8
-rw-r--r--src/core/lib/security/transport/security_handshaker.cc (renamed from src/core/lib/security/transport/security_handshaker.c)0
-rw-r--r--src/core/lib/security/transport/security_handshaker.h10
-rw-r--r--src/core/lib/security/transport/server_auth_filter.cc (renamed from src/core/lib/security/transport/server_auth_filter.c)30
-rw-r--r--src/core/lib/security/transport/tsi_error.cc (renamed from src/core/lib/security/transport/tsi_error.c)0
-rw-r--r--src/core/lib/security/transport/tsi_error.h10
-rw-r--r--src/core/lib/security/util/json_util.cc (renamed from src/core/lib/security/util/json_util.c)0
-rw-r--r--src/core/lib/security/util/json_util.h10
-rw-r--r--src/core/lib/slice/b64.cc (renamed from src/core/lib/slice/b64.c)0
-rw-r--r--src/core/lib/slice/b64.h10
-rw-r--r--src/core/lib/slice/percent_encoding.cc (renamed from src/core/lib/slice/percent_encoding.c)0
-rw-r--r--src/core/lib/slice/percent_encoding.h10
-rw-r--r--src/core/lib/slice/slice.cc (renamed from src/core/lib/slice/slice.c)0
-rw-r--r--src/core/lib/slice/slice_buffer.cc (renamed from src/core/lib/slice/slice_buffer.c)0
-rw-r--r--src/core/lib/slice/slice_hash_table.cc (renamed from src/core/lib/slice/slice_hash_table.c)0
-rw-r--r--src/core/lib/slice/slice_hash_table.h10
-rw-r--r--src/core/lib/slice/slice_intern.cc (renamed from src/core/lib/slice/slice_intern.c)1
-rw-r--r--src/core/lib/slice/slice_internal.h10
-rw-r--r--src/core/lib/slice/slice_string_helpers.cc (renamed from src/core/lib/slice/slice_string_helpers.c)0
-rw-r--r--src/core/lib/slice/slice_traits.h10
-rw-r--r--src/core/lib/support/alloc.cc (renamed from src/core/lib/support/alloc.c)0
-rw-r--r--src/core/lib/support/arena.cc (renamed from src/core/lib/support/arena.c)0
-rw-r--r--src/core/lib/support/arena.h8
-rw-r--r--src/core/lib/support/atm.cc (renamed from src/core/lib/support/atm.c)0
-rw-r--r--src/core/lib/support/avl.cc (renamed from src/core/lib/support/avl.c)0
-rw-r--r--src/core/lib/support/cmdline.cc (renamed from src/core/lib/support/cmdline.c)0
-rw-r--r--src/core/lib/support/cpu_iphone.cc (renamed from src/core/lib/support/cpu_iphone.c)2
-rw-r--r--src/core/lib/support/cpu_linux.cc (renamed from src/core/lib/support/cpu_linux.c)0
-rw-r--r--src/core/lib/support/cpu_posix.cc (renamed from src/core/lib/support/cpu_posix.c)1
-rw-r--r--src/core/lib/support/cpu_windows.cc (renamed from src/core/lib/support/cpu_windows.c)1
-rw-r--r--src/core/lib/support/env_linux.cc (renamed from src/core/lib/support/env_linux.c)0
-rw-r--r--src/core/lib/support/env_posix.cc (renamed from src/core/lib/support/env_posix.c)0
-rw-r--r--src/core/lib/support/env_windows.cc (renamed from src/core/lib/support/env_windows.c)2
-rw-r--r--src/core/lib/support/histogram.cc (renamed from src/core/lib/support/histogram.c)0
-rw-r--r--src/core/lib/support/host_port.cc (renamed from src/core/lib/support/host_port.c)0
-rw-r--r--src/core/lib/support/log.cc (renamed from src/core/lib/support/log.c)2
-rw-r--r--src/core/lib/support/log_android.cc (renamed from src/core/lib/support/log_android.c)8
-rw-r--r--src/core/lib/support/log_linux.cc (renamed from src/core/lib/support/log_linux.c)2
-rw-r--r--src/core/lib/support/log_posix.cc (renamed from src/core/lib/support/log_posix.c)6
-rw-r--r--src/core/lib/support/log_windows.cc (renamed from src/core/lib/support/log_windows.c)6
-rw-r--r--src/core/lib/support/mpscq.cc (renamed from src/core/lib/support/mpscq.c)0
-rw-r--r--src/core/lib/support/mpscq.h8
-rw-r--r--src/core/lib/support/murmur_hash.cc (renamed from src/core/lib/support/murmur_hash.c)0
-rw-r--r--src/core/lib/support/murmur_hash.h8
-rw-r--r--src/core/lib/support/spinlock.h5
-rw-r--r--src/core/lib/support/stack_lockfree.cc (renamed from src/core/lib/support/stack_lockfree.c)0
-rw-r--r--src/core/lib/support/stack_lockfree.h8
-rw-r--r--src/core/lib/support/string.cc (renamed from src/core/lib/support/string.c)1
-rw-r--r--src/core/lib/support/string_posix.cc (renamed from src/core/lib/support/string_posix.c)1
-rw-r--r--src/core/lib/support/string_util_windows.cc (renamed from src/core/lib/support/string_util_windows.c)11
-rw-r--r--src/core/lib/support/string_windows.cc (renamed from src/core/lib/support/string_windows.c)3
-rw-r--r--src/core/lib/support/string_windows.h8
-rw-r--r--src/core/lib/support/subprocess_posix.cc (renamed from src/core/lib/support/subprocess_posix.c)0
-rw-r--r--src/core/lib/support/subprocess_windows.cc (renamed from src/core/lib/support/subprocess_windows.c)2
-rw-r--r--src/core/lib/support/sync.cc (renamed from src/core/lib/support/sync.c)0
-rw-r--r--src/core/lib/support/sync_posix.cc (renamed from src/core/lib/support/sync_posix.c)0
-rw-r--r--src/core/lib/support/sync_windows.cc (renamed from src/core/lib/support/sync_windows.c)2
-rw-r--r--src/core/lib/support/thd.cc (renamed from src/core/lib/support/thd.c)0
-rw-r--r--src/core/lib/support/thd_posix.cc (renamed from src/core/lib/support/thd_posix.c)0
-rw-r--r--src/core/lib/support/thd_windows.cc (renamed from src/core/lib/support/thd_windows.c)2
-rw-r--r--src/core/lib/support/time.cc (renamed from src/core/lib/support/time.c)0
-rw-r--r--src/core/lib/support/time_posix.cc (renamed from src/core/lib/support/time_posix.c)5
-rw-r--r--src/core/lib/support/time_precise.cc (renamed from src/core/lib/support/time_precise.c)2
-rw-r--r--src/core/lib/support/time_precise.h8
-rw-r--r--src/core/lib/support/time_windows.cc (renamed from src/core/lib/support/time_windows.c)5
-rw-r--r--src/core/lib/support/tls_pthread.cc (renamed from src/core/lib/support/tls_pthread.c)0
-rw-r--r--src/core/lib/support/tmpfile_msys.cc (renamed from src/core/lib/support/tmpfile_msys.c)0
-rw-r--r--src/core/lib/support/tmpfile_posix.cc (renamed from src/core/lib/support/tmpfile_posix.c)0
-rw-r--r--src/core/lib/support/tmpfile_windows.cc (renamed from src/core/lib/support/tmpfile_windows.c)0
-rw-r--r--src/core/lib/support/wrap_memcpy.cc (renamed from src/core/lib/support/wrap_memcpy.c)2
-rw-r--r--src/core/lib/surface/alarm.cc (renamed from src/core/lib/surface/alarm.c)7
-rw-r--r--src/core/lib/surface/alarm_internal.h8
-rw-r--r--src/core/lib/surface/api_trace.cc (renamed from src/core/lib/surface/api_trace.c)0
-rw-r--r--src/core/lib/surface/api_trace.h8
-rw-r--r--src/core/lib/surface/byte_buffer.cc (renamed from src/core/lib/surface/byte_buffer.c)0
-rw-r--r--src/core/lib/surface/byte_buffer_reader.cc (renamed from src/core/lib/surface/byte_buffer_reader.c)0
-rw-r--r--src/core/lib/surface/call.cc (renamed from src/core/lib/surface/call.c)95
-rw-r--r--src/core/lib/surface/call.h2
-rw-r--r--src/core/lib/surface/call_details.cc (renamed from src/core/lib/surface/call_details.c)0
-rw-r--r--src/core/lib/surface/call_log_batch.cc (renamed from src/core/lib/surface/call_log_batch.c)2
-rw-r--r--src/core/lib/surface/channel.cc (renamed from src/core/lib/surface/channel.c)20
-rw-r--r--src/core/lib/surface/channel.h10
-rw-r--r--src/core/lib/surface/channel_init.cc (renamed from src/core/lib/surface/channel_init.c)0
-rw-r--r--src/core/lib/surface/channel_ping.cc (renamed from src/core/lib/surface/channel_ping.c)0
-rw-r--r--src/core/lib/surface/channel_stack_type.cc (renamed from src/core/lib/surface/channel_stack_type.c)0
-rw-r--r--src/core/lib/surface/channel_stack_type.h10
-rw-r--r--src/core/lib/surface/completion_queue.cc (renamed from src/core/lib/surface/completion_queue.c)105
-rw-r--r--src/core/lib/surface/completion_queue_factory.cc (renamed from src/core/lib/surface/completion_queue_factory.c)0
-rw-r--r--src/core/lib/surface/completion_queue_factory.h10
-rw-r--r--src/core/lib/surface/event_string.cc (renamed from src/core/lib/surface/event_string.c)0
-rw-r--r--src/core/lib/surface/event_string.h10
-rw-r--r--src/core/lib/surface/init.cc (renamed from src/core/lib/surface/init.c)0
-rw-r--r--src/core/lib/surface/init.h10
-rw-r--r--src/core/lib/surface/init_secure.cc (renamed from src/core/lib/surface/init_secure.c)6
-rw-r--r--src/core/lib/surface/init_unsecure.cc (renamed from src/core/lib/surface/init_unsecure.c)0
-rw-r--r--src/core/lib/surface/lame_client.cc2
-rw-r--r--src/core/lib/surface/lame_client.h8
-rw-r--r--src/core/lib/surface/metadata_array.cc (renamed from src/core/lib/surface/metadata_array.c)0
-rw-r--r--src/core/lib/surface/server.cc (renamed from src/core/lib/surface/server.c)16
-rw-r--r--src/core/lib/surface/server.h10
-rw-r--r--src/core/lib/surface/validate_metadata.cc (renamed from src/core/lib/surface/validate_metadata.c)1
-rw-r--r--src/core/lib/surface/validate_metadata.h10
-rw-r--r--src/core/lib/surface/version.cc (renamed from src/core/lib/surface/version.c)2
-rw-r--r--src/core/lib/transport/bdp_estimator.cc (renamed from src/core/lib/transport/bdp_estimator.c)37
-rw-r--r--src/core/lib/transport/bdp_estimator.h22
-rw-r--r--src/core/lib/transport/byte_stream.cc (renamed from src/core/lib/transport/byte_stream.c)0
-rw-r--r--src/core/lib/transport/byte_stream.h10
-rw-r--r--src/core/lib/transport/connectivity_state.cc (renamed from src/core/lib/transport/connectivity_state.c)0
-rw-r--r--src/core/lib/transport/connectivity_state.h10
-rw-r--r--src/core/lib/transport/error_utils.cc (renamed from src/core/lib/transport/error_utils.c)9
-rw-r--r--src/core/lib/transport/error_utils.h16
-rw-r--r--src/core/lib/transport/metadata.cc (renamed from src/core/lib/transport/metadata.c)1
-rw-r--r--src/core/lib/transport/metadata.h5
-rw-r--r--src/core/lib/transport/metadata_batch.cc (renamed from src/core/lib/transport/metadata_batch.c)6
-rw-r--r--src/core/lib/transport/metadata_batch.h11
-rw-r--r--src/core/lib/transport/pid_controller.cc (renamed from src/core/lib/transport/pid_controller.c)0
-rw-r--r--src/core/lib/transport/pid_controller.h10
-rw-r--r--src/core/lib/transport/service_config.cc (renamed from src/core/lib/transport/service_config.c)0
-rw-r--r--src/core/lib/transport/service_config.h10
-rw-r--r--src/core/lib/transport/static_metadata.cc (renamed from src/core/lib/transport/static_metadata.c)0
-rw-r--r--src/core/lib/transport/static_metadata.h7
-rw-r--r--src/core/lib/transport/status_conversion.cc (renamed from src/core/lib/transport/status_conversion.c)7
-rw-r--r--src/core/lib/transport/status_conversion.h16
-rw-r--r--src/core/lib/transport/timeout_encoding.cc (renamed from src/core/lib/transport/timeout_encoding.c)75
-rw-r--r--src/core/lib/transport/timeout_encoding.h15
-rw-r--r--src/core/lib/transport/transport.cc (renamed from src/core/lib/transport/transport.c)9
-rw-r--r--src/core/lib/transport/transport_impl.h10
-rw-r--r--src/core/lib/transport/transport_op_string.cc (renamed from src/core/lib/transport/transport_op_string.c)8
-rw-r--r--src/core/plugin_registry/grpc_cronet_plugin_registry.cc (renamed from src/core/plugin_registry/grpc_cronet_plugin_registry.c)24
-rw-r--r--src/core/plugin_registry/grpc_plugin_registry.cc (renamed from src/core/plugin_registry/grpc_plugin_registry.c)72
-rw-r--r--src/core/plugin_registry/grpc_unsecure_plugin_registry.cc (renamed from src/core/plugin_registry/grpc_unsecure_plugin_registry.c)68
-rw-r--r--src/core/tsi/fake_transport_security.cc (renamed from src/core/tsi/fake_transport_security.c)37
-rw-r--r--src/core/tsi/gts_transport_security.cc (renamed from src/core/tsi/gts_transport_security.c)4
-rw-r--r--src/core/tsi/gts_transport_security.h10
-rw-r--r--src/core/tsi/ssl_transport_security.cc (renamed from src/core/tsi/ssl_transport_security.c)40
-rw-r--r--src/core/tsi/ssl_types.h8
-rw-r--r--src/core/tsi/transport_security.cc (renamed from src/core/tsi/transport_security.c)5
-rw-r--r--src/core/tsi/transport_security_adapter.cc (renamed from src/core/tsi/transport_security_adapter.c)14
-rw-r--r--src/core/tsi/transport_security_grpc.cc (renamed from src/core/tsi/transport_security_grpc.c)0
-rw-r--r--src/cpp/client/secure_credentials.cc80
-rw-r--r--src/cpp/client/secure_credentials.h17
-rw-r--r--src/cpp/common/channel_arguments.cc4
-rw-r--r--src/cpp/common/version_cc.cc2
-rw-r--r--src/csharp/Grpc.Core/Internal/AsyncCall.cs6
-rw-r--r--src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs9
-rwxr-xr-xsrc/csharp/Grpc.Core/Version.csproj.include2
-rw-r--r--src/csharp/Grpc.Core/VersionInfo.cs4
-rw-r--r--src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs59
-rwxr-xr-xsrc/csharp/build_packages_dotnetcli.bat2
-rwxr-xr-xsrc/csharp/build_packages_dotnetcli.sh4
-rw-r--r--src/csharp/ext/grpc_csharp_ext.c8
-rw-r--r--src/node/ext/call_credentials.cc10
-rw-r--r--src/node/ext/call_credentials.h8
-rw-r--r--src/node/health_check/package.json4
-rw-r--r--src/node/tools/package.json2
-rw-r--r--src/objective-c/!ProtoCompiler-gRPCPlugin.podspec2
-rw-r--r--src/objective-c/GRPCClient/private/version.h2
-rw-r--r--src/objective-c/tests/RemoteTestClient/RemoteTest.podspec2
-rw-r--r--src/php/composer.json2
-rw-r--r--src/php/ext/grpc/call_credentials.c46
-rwxr-xr-xsrc/php/ext/grpc/call_credentials.h9
-rw-r--r--src/php/ext/grpc/version.h2
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi10
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi45
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi11
-rw-r--r--src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi14
-rw-r--r--src/python/grpcio/grpc/_grpcio_metadata.py2
-rw-r--r--src/python/grpcio/grpc_core_dependencies.py602
-rw-r--r--src/python/grpcio/grpc_version.py2
-rw-r--r--src/python/grpcio/support.py10
-rw-r--r--src/python/grpcio_health_checking/grpc_version.py2
-rw-r--r--src/python/grpcio_reflection/grpc_version.py2
-rw-r--r--src/python/grpcio_testing/grpc_version.py2
-rw-r--r--src/python/grpcio_tests/grpc_version.py2
-rw-r--r--src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py2
-rwxr-xr-xsrc/ruby/end2end/load_grpc_with_gc_stress_driver.rb32
-rw-r--r--src/ruby/ext/grpc/rb_call.c1
-rw-r--r--src/ruby/ext/grpc/rb_call_credentials.c8
-rw-r--r--src/ruby/ext/grpc/rb_grpc.c2
-rw-r--r--src/ruby/lib/grpc/google_rpc_status_utils.rb9
-rw-r--r--src/ruby/lib/grpc/version.rb2
-rwxr-xr-xsrc/ruby/qps/proxy-worker.rb16
-rw-r--r--src/ruby/spec/google_rpc_status_utils_spec.rb77
-rw-r--r--src/ruby/tools/version.rb2
-rw-r--r--templates/gRPC-Core.podspec.template15
-rw-r--r--templates/include/grpc/module.modulemap.template32
-rw-r--r--templates/src/core/lib/surface/version.cc.template (renamed from templates/src/core/lib/surface/version.c.template)0
-rw-r--r--templates/src/core/plugin_registry.template6
-rw-r--r--templates/test/cpp/naming/create_private_dns_zone.sh.template4
-rw-r--r--templates/test/cpp/naming/create_private_dns_zone_defs.include32
-rw-r--r--templates/test/cpp/naming/private_dns_zone_init.sh.template4
-rw-r--r--templates/test/cpp/naming/private_dns_zone_init_defs.include40
-rw-r--r--templates/test/cpp/naming/resolver_gce_integration_tests_defs.include64
-rw-r--r--templates/test/cpp/naming/resolver_gce_integration_tests_runner.sh.template4
-rw-r--r--templates/tools/dockerfile/python_deps.include2
-rw-r--r--templates/tools/dockerfile/test/multilang_jessie_x64/Dockerfile.template1
-rw-r--r--templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template3
-rw-r--r--test/core/backoff/BUILD36
-rw-r--r--test/core/backoff/backoff_test.c149
-rw-r--r--test/core/bad_client/bad_client.c26
-rw-r--r--test/core/bad_client/bad_client.h1
-rw-r--r--test/core/bad_client/tests/window_overflow.c5
-rw-r--r--test/core/channel/channel_stack_test.c2
-rw-r--r--test/core/client_channel/resolvers/dns_resolver_connectivity_test.c2
-rw-r--r--test/core/end2end/fixtures/h2_ssl_cert.c2
-rw-r--r--test/core/end2end/fixtures/http_proxy_fixture.c10
-rw-r--r--test/core/end2end/fuzzers/api_fuzzer.c22
-rw-r--r--test/core/end2end/invalid_call_argument_test.c2
-rw-r--r--test/core/end2end/tests/bad_ping.c17
-rw-r--r--test/core/end2end/tests/compressed_payload.c2
-rw-r--r--test/core/end2end/tests/keepalive_timeout.c26
-rw-r--r--test/core/end2end/tests/stream_compression_compressed_payload.c2
-rw-r--r--test/core/http/httpcli_test.c11
-rw-r--r--test/core/http/httpscli_test.c11
-rw-r--r--test/core/iomgr/endpoint_tests.c16
-rw-r--r--test/core/iomgr/ev_epollsig_linux_test.c6
-rw-r--r--test/core/iomgr/fd_posix_test.c24
-rw-r--r--test/core/iomgr/pollset_set_test.c30
-rw-r--r--test/core/iomgr/resolve_address_posix_test.c28
-rw-r--r--test/core/iomgr/resolve_address_test.c28
-rw-r--r--test/core/iomgr/tcp_client_posix_test.c21
-rw-r--r--test/core/iomgr/tcp_posix_test.c31
-rw-r--r--test/core/iomgr/tcp_server_posix_test.c8
-rw-r--r--test/core/iomgr/timer_list_test.c83
-rw-r--r--test/core/iomgr/udp_server_test.c12
-rw-r--r--test/core/security/credentials_test.c76
-rw-r--r--test/core/security/jwt_verifier_test.c14
-rw-r--r--test/core/security/oauth2_utils.c3
-rw-r--r--test/core/security/print_google_default_creds_token.c3
-rw-r--r--test/core/security/ssl_server_fuzzer.c3
-rw-r--r--test/core/security/verify_jwt.c8
-rw-r--r--test/core/slice/BUILD14
-rw-r--r--test/core/support/BUILD10
-rw-r--r--test/core/support/backoff_test.c143
-rw-r--r--test/core/surface/concurrent_connectivity_test.c10
-rw-r--r--test/core/surface/invalid_channel_args_test.c2
-rw-r--r--test/core/transport/bdp_estimator_test.c24
-rw-r--r--test/core/transport/status_conversion_test.c13
-rw-r--r--test/core/transport/timeout_encoding_test.c117
-rw-r--r--test/core/tsi/transport_security_test_lib.c29
-rw-r--r--test/core/tsi/transport_security_test_lib.h19
-rw-r--r--test/core/util/BUILD8
-rw-r--r--test/core/util/fuzzer_corpus_test.cc136
-rw-r--r--test/core/util/grpc_fuzzer.bzl20
-rw-r--r--test/core/util/port_server_client.c14
-rw-r--r--test/core/util/test_tcp_server.c12
-rw-r--r--test/cpp/common/alarm_cpp_test.cc4
-rw-r--r--test/cpp/end2end/async_end2end_test.cc159
-rw-r--r--test/cpp/end2end/end2end_test.cc33
-rw-r--r--test/cpp/end2end/generic_end2end_test.cc2
-rw-r--r--test/cpp/end2end/grpclb_end2end_test.cc180
-rw-r--r--test/cpp/interop/stress_test.cc7
-rw-r--r--test/cpp/microbenchmarks/bm_call_create.cc2
-rw-r--r--test/cpp/microbenchmarks/bm_chttp2_transport.cc6
-rw-r--r--test/cpp/microbenchmarks/bm_cq_multiple_threads.cc6
-rw-r--r--test/cpp/microbenchmarks/bm_error.cc42
-rw-r--r--test/cpp/microbenchmarks/bm_fullstack_trickle.cc35
-rw-r--r--test/cpp/microbenchmarks/bm_pollset.cc9
-rw-r--r--test/cpp/microbenchmarks/fullstack_fixtures.h4
-rw-r--r--test/cpp/naming/README.md43
-rwxr-xr-xtest/cpp/naming/create_private_dns_zone.sh27
-rwxr-xr-xtest/cpp/naming/gen_build_yaml.py110
-rwxr-xr-xtest/cpp/naming/private_dns_zone_init.sh215
-rw-r--r--test/cpp/naming/resolver_component_test.cc8
-rwxr-xr-xtest/cpp/naming/resolver_component_tests_runner.sh26
-rwxr-xr-xtest/cpp/naming/resolver_gce_integration_tests_runner.sh359
-rw-r--r--test/cpp/naming/resolver_test_record_groups.yaml2
-rwxr-xr-xtest/cpp/naming/test_dns_server.py2
-rwxr-xr-xtest/cpp/qps/gen_build_yaml.py4
-rw-r--r--test/cpp/util/grpc_tool.cc125
-rw-r--r--test/cpp/util/grpc_tool_test.cc55
m---------third_party/bloaty0
-rwxr-xr-xtools/buildgen/plugins/expand_filegroups.py2
-rwxr-xr-xtools/codegen/core/gen_static_metadata.py10
-rwxr-xr-xtools/codegen/core/gen_stats_data.py14
-rwxr-xr-xtools/debug/core/chttp2_ref_leak.py42
-rw-r--r--tools/distrib/build_ruby_environment_macos.sh17
-rwxr-xr-xtools/distrib/pull_requests_interval.sh80
-rwxr-xr-xtools/distrib/pylint_code.sh2
-rwxr-xr-xtools/distrib/python/docgen.py2
-rw-r--r--tools/distrib/python/grpcio_tools/grpc_version.py2
-rwxr-xr-xtools/distrib/yapf_code.sh2
-rw-r--r--tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile2
-rw-r--r--tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/Dockerfile2
-rw-r--r--tools/dockerfile/interoptest/grpc_interop_cxx/Dockerfile2
-rw-r--r--tools/dockerfile/interoptest/grpc_interop_go/Dockerfile2
-rw-r--r--tools/dockerfile/interoptest/grpc_interop_go1.7/Dockerfile2
-rw-r--r--tools/dockerfile/interoptest/grpc_interop_go1.8/Dockerfile2
-rw-r--r--tools/dockerfile/interoptest/grpc_interop_http2/Dockerfile2
-rw-r--r--tools/dockerfile/interoptest/grpc_interop_java/Dockerfile2
-rw-r--r--tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile2
-rw-r--r--tools/dockerfile/interoptest/grpc_interop_node/Dockerfile2
-rw-r--r--tools/dockerfile/interoptest/grpc_interop_python/Dockerfile2
-rw-r--r--tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile2
-rw-r--r--tools/dockerfile/test/csharp_jessie_x64/Dockerfile2
-rw-r--r--tools/dockerfile/test/cxx_alpine_x64/Dockerfile2
-rw-r--r--tools/dockerfile/test/cxx_jessie_x64/Dockerfile2
-rw-r--r--tools/dockerfile/test/cxx_jessie_x86/Dockerfile2
-rw-r--r--tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile2
-rw-r--r--tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile2
-rw-r--r--tools/dockerfile/test/fuzzer/Dockerfile2
-rw-r--r--tools/dockerfile/test/multilang_jessie_x64/Dockerfile20
-rw-r--r--tools/dockerfile/test/node_jessie_x64/Dockerfile5
-rw-r--r--tools/dockerfile/test/php7_jessie_x64/Dockerfile2
-rw-r--r--tools/dockerfile/test/php_jessie_x64/Dockerfile2
-rw-r--r--tools/dockerfile/test/python_alpine_x64/Dockerfile2
-rw-r--r--tools/dockerfile/test/python_jessie_x64/Dockerfile2
-rw-r--r--tools/dockerfile/test/python_pyenv_x64/Dockerfile2
-rw-r--r--tools/dockerfile/test/ruby_jessie_x64/Dockerfile2
-rw-r--r--tools/dockerfile/test/sanity/Dockerfile2
-rw-r--r--tools/doxygen/Doxyfile.c++2
-rw-r--r--tools/doxygen/Doxyfile.c++.internal6
-rw-r--r--tools/doxygen/Doxyfile.core.internal606
-rwxr-xr-xtools/gce/linux_performance_worker_init.sh1
-rw-r--r--tools/github/pr_latency.py163
-rw-r--r--tools/internal_ci/helper_scripts/prepare_build_macos_rc14
-rw-r--r--tools/internal_ci/linux/grpc_coverage.cfg24
-rwxr-xr-xtools/internal_ci/linux/grpc_coverage.sh30
-rwxr-xr-xtools/internal_ci/linux/grpc_interop_toprod.sh2
-rwxr-xr-xtools/internal_ci/linux/grpc_microbenchmark_diff.sh2
-rwxr-xr-xtools/internal_ci/linux/grpc_performance_profile_daily.sh2
-rwxr-xr-xtools/internal_ci/macos/grpc_build_artifacts.sh3
-rwxr-xr-xtools/internal_ci/macos/grpc_run_tests_matrix.sh3
-rw-r--r--tools/interop_matrix/README.md16
-rwxr-xr-xtools/jenkins/run_full_performance.sh2
-rwxr-xr-xtools/jenkins/run_performance_profile_daily.sh2
-rwxr-xr-xtools/profiling/bloat/bloat_diff.py99
-rwxr-xr-xtools/profiling/microbenchmarks/bm_diff/bm_main.py16
-rwxr-xr-xtools/profiling/microbenchmarks/bm_diff/bm_run.py9
-rw-r--r--tools/run_tests/generated/sources_and_headers.json665
-rw-r--r--tools/run_tests/generated/tests.json324
-rwxr-xr-xtools/run_tests/helper_scripts/build_python.sh2
-rwxr-xr-xtools/run_tests/helper_scripts/run_grpc-node.sh28
-rwxr-xr-xtools/run_tests/helper_scripts/run_ruby_end2end_tests.sh1
-rw-r--r--tools/run_tests/performance/massage_qps_stats.py9
-rwxr-xr-xtools/run_tests/performance/run_worker_php.sh11
-rw-r--r--tools/run_tests/performance/scenario_config.py20
-rw-r--r--tools/run_tests/performance/scenario_result_schema.json80
-rw-r--r--tools/run_tests/python_utils/filter_pull_request_tests.py2
-rwxr-xr-xtools/run_tests/python_utils/jobset.py19
-rw-r--r--tools/run_tests/python_utils/upload_test_results.py15
-rwxr-xr-xtools/run_tests/run_tests.py85
-rwxr-xr-xtools/run_tests/run_tests_matrix.py2
-rwxr-xr-xtools/run_tests/sanity/check_submodules.sh1
-rwxr-xr-xtools/run_tests/sanity/check_test_filtering.py2
-rw-r--r--tools/ubsan_suppressions.txt6
754 files changed, 14763 insertions, 10322 deletions
diff --git a/.gitmodules b/.gitmodules
index 144fd080ac..8af0052128 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -24,3 +24,6 @@
path = third_party/cares/cares
url = https://github.com/c-ares/c-ares.git
branch = cares-1_12_0
+[submodule "third_party/bloaty"]
+ path = third_party/bloaty
+ url = https://github.com/google/bloaty.git
diff --git a/BUILD b/BUILD
index eb75e81078..728bab127d 100644
--- a/BUILD
+++ b/BUILD
@@ -34,11 +34,11 @@ load(
)
# This should be updated along with build.yaml
-g_stands_for = "gambit"
+g_stands_for = "generous"
-core_version = "4.0.0-dev"
+core_version = "5.0.0-dev"
-version = "1.7.0-dev"
+version = "1.8.0-dev"
GPR_PUBLIC_HDRS = [
"include/grpc/support/alloc.h",
@@ -187,7 +187,7 @@ GRPCXX_PUBLIC_HDRS = [
grpc_cc_library(
name = "gpr",
- language = "c",
+ language = "c++",
public_hdrs = GPR_PUBLIC_HDRS,
standalone = True,
deps = [
@@ -198,11 +198,11 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_unsecure",
srcs = [
- "src/core/lib/surface/init.c",
- "src/core/lib/surface/init_unsecure.c",
- "src/core/plugin_registry/grpc_unsecure_plugin_registry.c",
+ "src/core/lib/surface/init.cc",
+ "src/core/lib/surface/init_unsecure.cc",
+ "src/core/plugin_registry/grpc_unsecure_plugin_registry.cc",
],
- language = "c",
+ language = "c++",
public_hdrs = GRPC_PUBLIC_HDRS,
standalone = True,
deps = [
@@ -214,10 +214,10 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc",
srcs = [
- "src/core/lib/surface/init.c",
- "src/core/plugin_registry/grpc_plugin_registry.c",
+ "src/core/lib/surface/init.cc",
+ "src/core/plugin_registry/grpc_plugin_registry.cc",
],
- language = "c",
+ language = "c++",
public_hdrs = GRPC_PUBLIC_HDRS + GRPC_SECURE_PUBLIC_HDRS,
standalone = True,
deps = [
@@ -232,10 +232,10 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_cronet",
srcs = [
- "src/core/lib/surface/init.c",
- "src/core/plugin_registry/grpc_cronet_plugin_registry.c",
+ "src/core/lib/surface/init.cc",
+ "src/core/plugin_registry/grpc_cronet_plugin_registry.cc",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
"grpc_http_filters",
@@ -409,21 +409,21 @@ grpc_cc_library(
grpc_cc_library(
name = "census",
srcs = [
- "src/core/ext/census/base_resources.c",
- "src/core/ext/census/context.c",
+ "src/core/ext/census/base_resources.cc",
+ "src/core/ext/census/context.cc",
"src/core/ext/census/gen/census.pb.c",
"src/core/ext/census/gen/trace_context.pb.c",
- "src/core/ext/census/grpc_context.c",
- "src/core/ext/census/grpc_filter.c",
- "src/core/ext/census/grpc_plugin.c",
- "src/core/ext/census/initialize.c",
- "src/core/ext/census/intrusive_hash_map.c",
- "src/core/ext/census/mlog.c",
- "src/core/ext/census/operation.c",
- "src/core/ext/census/placeholders.c",
- "src/core/ext/census/resource.c",
- "src/core/ext/census/trace_context.c",
- "src/core/ext/census/tracing.c",
+ "src/core/ext/census/grpc_context.cc",
+ "src/core/ext/census/grpc_filter.cc",
+ "src/core/ext/census/grpc_plugin.cc",
+ "src/core/ext/census/initialize.cc",
+ "src/core/ext/census/intrusive_hash_map.cc",
+ "src/core/ext/census/mlog.cc",
+ "src/core/ext/census/operation.cc",
+ "src/core/ext/census/placeholders.cc",
+ "src/core/ext/census/resource.cc",
+ "src/core/ext/census/trace_context.cc",
+ "src/core/ext/census/tracing.cc",
],
hdrs = [
"src/core/ext/census/aggregation.h",
@@ -449,7 +449,7 @@ grpc_cc_library(
"nanopb",
"libssl",
],
- language = "c",
+ language = "c++",
public_hdrs = [
"include/grpc/census.h",
],
@@ -461,52 +461,51 @@ grpc_cc_library(
grpc_cc_library(
name = "gpr_base",
srcs = [
- "src/core/lib/profiling/basic_timers.c",
- "src/core/lib/profiling/stap_timers.c",
- "src/core/lib/support/alloc.c",
- "src/core/lib/support/arena.c",
- "src/core/lib/support/atm.c",
- "src/core/lib/support/avl.c",
- "src/core/lib/support/backoff.c",
- "src/core/lib/support/cmdline.c",
- "src/core/lib/support/cpu_iphone.c",
- "src/core/lib/support/cpu_linux.c",
- "src/core/lib/support/cpu_posix.c",
- "src/core/lib/support/cpu_windows.c",
- "src/core/lib/support/env_linux.c",
- "src/core/lib/support/env_posix.c",
- "src/core/lib/support/env_windows.c",
- "src/core/lib/support/histogram.c",
- "src/core/lib/support/host_port.c",
- "src/core/lib/support/log.c",
- "src/core/lib/support/log_android.c",
- "src/core/lib/support/log_linux.c",
- "src/core/lib/support/log_posix.c",
- "src/core/lib/support/log_windows.c",
- "src/core/lib/support/mpscq.c",
- "src/core/lib/support/murmur_hash.c",
- "src/core/lib/support/stack_lockfree.c",
- "src/core/lib/support/string.c",
- "src/core/lib/support/string_posix.c",
- "src/core/lib/support/string_util_windows.c",
- "src/core/lib/support/string_windows.c",
- "src/core/lib/support/subprocess_posix.c",
- "src/core/lib/support/subprocess_windows.c",
- "src/core/lib/support/sync.c",
- "src/core/lib/support/sync_posix.c",
- "src/core/lib/support/sync_windows.c",
- "src/core/lib/support/thd.c",
- "src/core/lib/support/thd_posix.c",
- "src/core/lib/support/thd_windows.c",
- "src/core/lib/support/time.c",
- "src/core/lib/support/time_posix.c",
- "src/core/lib/support/time_precise.c",
- "src/core/lib/support/time_windows.c",
- "src/core/lib/support/tls_pthread.c",
- "src/core/lib/support/tmpfile_msys.c",
- "src/core/lib/support/tmpfile_posix.c",
- "src/core/lib/support/tmpfile_windows.c",
- "src/core/lib/support/wrap_memcpy.c",
+ "src/core/lib/profiling/basic_timers.cc",
+ "src/core/lib/profiling/stap_timers.cc",
+ "src/core/lib/support/alloc.cc",
+ "src/core/lib/support/arena.cc",
+ "src/core/lib/support/atm.cc",
+ "src/core/lib/support/avl.cc",
+ "src/core/lib/support/cmdline.cc",
+ "src/core/lib/support/cpu_iphone.cc",
+ "src/core/lib/support/cpu_linux.cc",
+ "src/core/lib/support/cpu_posix.cc",
+ "src/core/lib/support/cpu_windows.cc",
+ "src/core/lib/support/env_linux.cc",
+ "src/core/lib/support/env_posix.cc",
+ "src/core/lib/support/env_windows.cc",
+ "src/core/lib/support/histogram.cc",
+ "src/core/lib/support/host_port.cc",
+ "src/core/lib/support/log.cc",
+ "src/core/lib/support/log_android.cc",
+ "src/core/lib/support/log_linux.cc",
+ "src/core/lib/support/log_posix.cc",
+ "src/core/lib/support/log_windows.cc",
+ "src/core/lib/support/mpscq.cc",
+ "src/core/lib/support/murmur_hash.cc",
+ "src/core/lib/support/stack_lockfree.cc",
+ "src/core/lib/support/string.cc",
+ "src/core/lib/support/string_posix.cc",
+ "src/core/lib/support/string_util_windows.cc",
+ "src/core/lib/support/string_windows.cc",
+ "src/core/lib/support/subprocess_posix.cc",
+ "src/core/lib/support/subprocess_windows.cc",
+ "src/core/lib/support/sync.cc",
+ "src/core/lib/support/sync_posix.cc",
+ "src/core/lib/support/sync_windows.cc",
+ "src/core/lib/support/thd.cc",
+ "src/core/lib/support/thd_posix.cc",
+ "src/core/lib/support/thd_windows.cc",
+ "src/core/lib/support/time.cc",
+ "src/core/lib/support/time_posix.cc",
+ "src/core/lib/support/time_precise.cc",
+ "src/core/lib/support/time_windows.cc",
+ "src/core/lib/support/tls_pthread.cc",
+ "src/core/lib/support/tmpfile_msys.cc",
+ "src/core/lib/support/tmpfile_posix.cc",
+ "src/core/lib/support/tmpfile_windows.cc",
+ "src/core/lib/support/wrap_memcpy.cc",
],
hdrs = [
"src/core/lib/profiling/timers.h",
@@ -514,8 +513,6 @@ grpc_cc_library(
"src/core/lib/support/atomic.h",
"src/core/lib/support/atomic_with_atm.h",
"src/core/lib/support/atomic_with_std.h",
- "src/core/lib/support/backoff.h",
- "src/core/lib/support/block_annotate.h",
"src/core/lib/support/env.h",
"src/core/lib/support/memory.h",
"src/core/lib/support/mpscq.h",
@@ -527,7 +524,7 @@ grpc_cc_library(
"src/core/lib/support/time_precise.h",
"src/core/lib/support/tmpfile.h",
],
- language = "c",
+ language = "c++",
public_hdrs = GPR_PUBLIC_HDRS,
deps = [
"gpr_codegen",
@@ -536,7 +533,7 @@ grpc_cc_library(
grpc_cc_library(
name = "gpr_codegen",
- language = "c",
+ language = "c++",
public_hdrs = [
"include/grpc/impl/codegen/atm.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
@@ -555,146 +552,151 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_trace",
- srcs = ["src/core/lib/debug/trace.c"],
+ srcs = ["src/core/lib/debug/trace.cc"],
hdrs = ["src/core/lib/debug/trace.h"],
- language = "c",
- deps = [":gpr"],
+ language = "c++",
+ public_hdrs = GRPC_PUBLIC_HDRS,
+ deps = [
+ "grpc_codegen",
+ ":gpr",
+ ],
)
grpc_cc_library(
name = "grpc_base_c",
srcs = [
- "src/core/lib/channel/channel_args.c",
- "src/core/lib/channel/channel_stack.c",
- "src/core/lib/channel/channel_stack_builder.c",
- "src/core/lib/channel/connected_channel.c",
- "src/core/lib/channel/handshaker.c",
- "src/core/lib/channel/handshaker_factory.c",
- "src/core/lib/channel/handshaker_registry.c",
- "src/core/lib/compression/compression.c",
- "src/core/lib/compression/compression_internal.c",
- "src/core/lib/compression/message_compress.c",
- "src/core/lib/compression/stream_compression.c",
- "src/core/lib/compression/stream_compression_gzip.c",
- "src/core/lib/compression/stream_compression_identity.c",
- "src/core/lib/debug/stats.c",
- "src/core/lib/debug/stats_data.c",
- "src/core/lib/http/format_request.c",
- "src/core/lib/http/httpcli.c",
- "src/core/lib/http/parser.c",
- "src/core/lib/iomgr/call_combiner.c",
- "src/core/lib/iomgr/closure.c",
- "src/core/lib/iomgr/combiner.c",
- "src/core/lib/iomgr/endpoint.c",
- "src/core/lib/iomgr/endpoint_pair_posix.c",
- "src/core/lib/iomgr/endpoint_pair_uv.c",
- "src/core/lib/iomgr/endpoint_pair_windows.c",
- "src/core/lib/iomgr/error.c",
- "src/core/lib/iomgr/ev_epoll1_linux.c",
- "src/core/lib/iomgr/ev_epollex_linux.c",
- "src/core/lib/iomgr/ev_epollsig_linux.c",
- "src/core/lib/iomgr/ev_poll_posix.c",
- "src/core/lib/iomgr/ev_posix.c",
- "src/core/lib/iomgr/ev_windows.c",
- "src/core/lib/iomgr/exec_ctx.c",
- "src/core/lib/iomgr/executor.c",
- "src/core/lib/iomgr/gethostname_fallback.c",
- "src/core/lib/iomgr/gethostname_host_name_max.c",
- "src/core/lib/iomgr/gethostname_sysconf.c",
- "src/core/lib/iomgr/iocp_windows.c",
- "src/core/lib/iomgr/iomgr.c",
- "src/core/lib/iomgr/iomgr_posix.c",
- "src/core/lib/iomgr/iomgr_uv.c",
- "src/core/lib/iomgr/iomgr_windows.c",
- "src/core/lib/iomgr/is_epollexclusive_available.c",
- "src/core/lib/iomgr/load_file.c",
- "src/core/lib/iomgr/lockfree_event.c",
- "src/core/lib/iomgr/network_status_tracker.c",
- "src/core/lib/iomgr/polling_entity.c",
- "src/core/lib/iomgr/pollset_set_uv.c",
- "src/core/lib/iomgr/pollset_set_windows.c",
- "src/core/lib/iomgr/pollset_uv.c",
- "src/core/lib/iomgr/pollset_windows.c",
- "src/core/lib/iomgr/resolve_address_posix.c",
- "src/core/lib/iomgr/resolve_address_uv.c",
- "src/core/lib/iomgr/resolve_address_windows.c",
- "src/core/lib/iomgr/resource_quota.c",
- "src/core/lib/iomgr/sockaddr_utils.c",
- "src/core/lib/iomgr/socket_factory_posix.c",
- "src/core/lib/iomgr/socket_mutator.c",
- "src/core/lib/iomgr/socket_utils_common_posix.c",
- "src/core/lib/iomgr/socket_utils_linux.c",
- "src/core/lib/iomgr/socket_utils_posix.c",
- "src/core/lib/iomgr/socket_utils_uv.c",
- "src/core/lib/iomgr/socket_utils_windows.c",
- "src/core/lib/iomgr/socket_windows.c",
- "src/core/lib/iomgr/tcp_client_posix.c",
- "src/core/lib/iomgr/tcp_client_uv.c",
- "src/core/lib/iomgr/tcp_client_windows.c",
- "src/core/lib/iomgr/tcp_posix.c",
- "src/core/lib/iomgr/tcp_server_posix.c",
- "src/core/lib/iomgr/tcp_server_utils_posix_common.c",
- "src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c",
- "src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c",
- "src/core/lib/iomgr/tcp_server_uv.c",
- "src/core/lib/iomgr/tcp_server_windows.c",
- "src/core/lib/iomgr/tcp_uv.c",
- "src/core/lib/iomgr/tcp_windows.c",
- "src/core/lib/iomgr/time_averaged_stats.c",
- "src/core/lib/iomgr/timer_generic.c",
- "src/core/lib/iomgr/timer_heap.c",
- "src/core/lib/iomgr/timer_manager.c",
- "src/core/lib/iomgr/timer_uv.c",
- "src/core/lib/iomgr/udp_server.c",
- "src/core/lib/iomgr/unix_sockets_posix.c",
- "src/core/lib/iomgr/unix_sockets_posix_noop.c",
- "src/core/lib/iomgr/wakeup_fd_cv.c",
- "src/core/lib/iomgr/wakeup_fd_eventfd.c",
- "src/core/lib/iomgr/wakeup_fd_nospecial.c",
- "src/core/lib/iomgr/wakeup_fd_pipe.c",
- "src/core/lib/iomgr/wakeup_fd_posix.c",
- "src/core/lib/json/json.c",
- "src/core/lib/json/json_reader.c",
- "src/core/lib/json/json_string.c",
- "src/core/lib/json/json_writer.c",
- "src/core/lib/slice/b64.c",
- "src/core/lib/slice/percent_encoding.c",
- "src/core/lib/slice/slice.c",
- "src/core/lib/slice/slice_buffer.c",
- "src/core/lib/slice/slice_hash_table.c",
- "src/core/lib/slice/slice_intern.c",
- "src/core/lib/slice/slice_string_helpers.c",
- "src/core/lib/surface/alarm.c",
- "src/core/lib/surface/api_trace.c",
- "src/core/lib/surface/byte_buffer.c",
- "src/core/lib/surface/byte_buffer_reader.c",
- "src/core/lib/surface/call.c",
- "src/core/lib/surface/call_details.c",
- "src/core/lib/surface/call_log_batch.c",
- "src/core/lib/surface/channel.c",
- "src/core/lib/surface/channel_init.c",
- "src/core/lib/surface/channel_ping.c",
- "src/core/lib/surface/channel_stack_type.c",
- "src/core/lib/surface/completion_queue.c",
- "src/core/lib/surface/completion_queue_factory.c",
- "src/core/lib/surface/event_string.c",
- "src/core/lib/surface/metadata_array.c",
- "src/core/lib/surface/server.c",
- "src/core/lib/surface/validate_metadata.c",
- "src/core/lib/surface/version.c",
- "src/core/lib/transport/bdp_estimator.c",
- "src/core/lib/transport/byte_stream.c",
- "src/core/lib/transport/connectivity_state.c",
- "src/core/lib/transport/error_utils.c",
- "src/core/lib/transport/metadata.c",
- "src/core/lib/transport/metadata_batch.c",
- "src/core/lib/transport/pid_controller.c",
- "src/core/lib/transport/service_config.c",
- "src/core/lib/transport/static_metadata.c",
- "src/core/lib/transport/status_conversion.c",
- "src/core/lib/transport/timeout_encoding.c",
- "src/core/lib/transport/transport.c",
- "src/core/lib/transport/transport_op_string.c",
+ "src/core/lib/backoff/backoff.cc",
+ "src/core/lib/channel/channel_args.cc",
+ "src/core/lib/channel/channel_stack.cc",
+ "src/core/lib/channel/channel_stack_builder.cc",
+ "src/core/lib/channel/connected_channel.cc",
+ "src/core/lib/channel/handshaker.cc",
+ "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/message_compress.cc",
+ "src/core/lib/compression/stream_compression.cc",
+ "src/core/lib/compression/stream_compression_gzip.cc",
+ "src/core/lib/compression/stream_compression_identity.cc",
+ "src/core/lib/debug/stats.cc",
+ "src/core/lib/debug/stats_data.cc",
+ "src/core/lib/http/format_request.cc",
+ "src/core/lib/http/httpcli.cc",
+ "src/core/lib/http/parser.cc",
+ "src/core/lib/iomgr/call_combiner.cc",
+ "src/core/lib/iomgr/closure.cc",
+ "src/core/lib/iomgr/combiner.cc",
+ "src/core/lib/iomgr/endpoint.cc",
+ "src/core/lib/iomgr/endpoint_pair_posix.cc",
+ "src/core/lib/iomgr/endpoint_pair_uv.cc",
+ "src/core/lib/iomgr/endpoint_pair_windows.cc",
+ "src/core/lib/iomgr/error.cc",
+ "src/core/lib/iomgr/ev_epoll1_linux.cc",
+ "src/core/lib/iomgr/ev_epollex_linux.cc",
+ "src/core/lib/iomgr/ev_epollsig_linux.cc",
+ "src/core/lib/iomgr/ev_poll_posix.cc",
+ "src/core/lib/iomgr/ev_posix.cc",
+ "src/core/lib/iomgr/ev_windows.cc",
+ "src/core/lib/iomgr/exec_ctx.cc",
+ "src/core/lib/iomgr/executor.cc",
+ "src/core/lib/iomgr/gethostname_fallback.cc",
+ "src/core/lib/iomgr/gethostname_host_name_max.cc",
+ "src/core/lib/iomgr/gethostname_sysconf.cc",
+ "src/core/lib/iomgr/iocp_windows.cc",
+ "src/core/lib/iomgr/iomgr.cc",
+ "src/core/lib/iomgr/iomgr_posix.cc",
+ "src/core/lib/iomgr/iomgr_uv.cc",
+ "src/core/lib/iomgr/iomgr_windows.cc",
+ "src/core/lib/iomgr/is_epollexclusive_available.cc",
+ "src/core/lib/iomgr/load_file.cc",
+ "src/core/lib/iomgr/lockfree_event.cc",
+ "src/core/lib/iomgr/network_status_tracker.cc",
+ "src/core/lib/iomgr/polling_entity.cc",
+ "src/core/lib/iomgr/pollset_set_uv.cc",
+ "src/core/lib/iomgr/pollset_set_windows.cc",
+ "src/core/lib/iomgr/pollset_uv.cc",
+ "src/core/lib/iomgr/pollset_windows.cc",
+ "src/core/lib/iomgr/resolve_address_posix.cc",
+ "src/core/lib/iomgr/resolve_address_uv.cc",
+ "src/core/lib/iomgr/resolve_address_windows.cc",
+ "src/core/lib/iomgr/resource_quota.cc",
+ "src/core/lib/iomgr/sockaddr_utils.cc",
+ "src/core/lib/iomgr/socket_factory_posix.cc",
+ "src/core/lib/iomgr/socket_mutator.cc",
+ "src/core/lib/iomgr/socket_utils_common_posix.cc",
+ "src/core/lib/iomgr/socket_utils_linux.cc",
+ "src/core/lib/iomgr/socket_utils_posix.cc",
+ "src/core/lib/iomgr/socket_utils_uv.cc",
+ "src/core/lib/iomgr/socket_utils_windows.cc",
+ "src/core/lib/iomgr/socket_windows.cc",
+ "src/core/lib/iomgr/tcp_client_posix.cc",
+ "src/core/lib/iomgr/tcp_client_uv.cc",
+ "src/core/lib/iomgr/tcp_client_windows.cc",
+ "src/core/lib/iomgr/tcp_posix.cc",
+ "src/core/lib/iomgr/tcp_server_posix.cc",
+ "src/core/lib/iomgr/tcp_server_utils_posix_common.cc",
+ "src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc",
+ "src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc",
+ "src/core/lib/iomgr/tcp_server_uv.cc",
+ "src/core/lib/iomgr/tcp_server_windows.cc",
+ "src/core/lib/iomgr/tcp_uv.cc",
+ "src/core/lib/iomgr/tcp_windows.cc",
+ "src/core/lib/iomgr/time_averaged_stats.cc",
+ "src/core/lib/iomgr/timer_generic.cc",
+ "src/core/lib/iomgr/timer_heap.cc",
+ "src/core/lib/iomgr/timer_manager.cc",
+ "src/core/lib/iomgr/timer_uv.cc",
+ "src/core/lib/iomgr/udp_server.cc",
+ "src/core/lib/iomgr/unix_sockets_posix.cc",
+ "src/core/lib/iomgr/unix_sockets_posix_noop.cc",
+ "src/core/lib/iomgr/wakeup_fd_cv.cc",
+ "src/core/lib/iomgr/wakeup_fd_eventfd.cc",
+ "src/core/lib/iomgr/wakeup_fd_nospecial.cc",
+ "src/core/lib/iomgr/wakeup_fd_pipe.cc",
+ "src/core/lib/iomgr/wakeup_fd_posix.cc",
+ "src/core/lib/json/json.cc",
+ "src/core/lib/json/json_reader.cc",
+ "src/core/lib/json/json_string.cc",
+ "src/core/lib/json/json_writer.cc",
+ "src/core/lib/slice/b64.cc",
+ "src/core/lib/slice/percent_encoding.cc",
+ "src/core/lib/slice/slice.cc",
+ "src/core/lib/slice/slice_buffer.cc",
+ "src/core/lib/slice/slice_hash_table.cc",
+ "src/core/lib/slice/slice_intern.cc",
+ "src/core/lib/slice/slice_string_helpers.cc",
+ "src/core/lib/surface/alarm.cc",
+ "src/core/lib/surface/api_trace.cc",
+ "src/core/lib/surface/byte_buffer.cc",
+ "src/core/lib/surface/byte_buffer_reader.cc",
+ "src/core/lib/surface/call.cc",
+ "src/core/lib/surface/call_details.cc",
+ "src/core/lib/surface/call_log_batch.cc",
+ "src/core/lib/surface/channel.cc",
+ "src/core/lib/surface/channel_init.cc",
+ "src/core/lib/surface/channel_ping.cc",
+ "src/core/lib/surface/channel_stack_type.cc",
+ "src/core/lib/surface/completion_queue.cc",
+ "src/core/lib/surface/completion_queue_factory.cc",
+ "src/core/lib/surface/event_string.cc",
+ "src/core/lib/surface/metadata_array.cc",
+ "src/core/lib/surface/server.cc",
+ "src/core/lib/surface/validate_metadata.cc",
+ "src/core/lib/surface/version.cc",
+ "src/core/lib/transport/bdp_estimator.cc",
+ "src/core/lib/transport/byte_stream.cc",
+ "src/core/lib/transport/connectivity_state.cc",
+ "src/core/lib/transport/error_utils.cc",
+ "src/core/lib/transport/metadata.cc",
+ "src/core/lib/transport/metadata_batch.cc",
+ "src/core/lib/transport/pid_controller.cc",
+ "src/core/lib/transport/service_config.cc",
+ "src/core/lib/transport/static_metadata.cc",
+ "src/core/lib/transport/status_conversion.cc",
+ "src/core/lib/transport/timeout_encoding.cc",
+ "src/core/lib/transport/transport.cc",
+ "src/core/lib/transport/transport_op_string.cc",
],
hdrs = [
"src/core/lib/channel/channel_args.h",
@@ -760,6 +762,7 @@ grpc_cc_library(
"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/block_annotate.h",
"src/core/lib/iomgr/tcp_client.h",
"src/core/lib/iomgr/tcp_client_posix.h",
"src/core/lib/iomgr/tcp_posix.h",
@@ -815,11 +818,12 @@ grpc_cc_library(
"src/core/lib/transport/timeout_encoding.h",
"src/core/lib/transport/transport.h",
"src/core/lib/transport/transport_impl.h",
+ "src/core/lib/backoff/backoff.h",
],
external_deps = [
"zlib",
],
- language = "c",
+ language = "c++",
public_hdrs = GRPC_PUBLIC_HDRS,
deps = [
"gpr_base",
@@ -841,7 +845,7 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_common",
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
# standard plugins
@@ -867,26 +871,26 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_client_channel",
srcs = [
- "src/core/ext/filters/client_channel/channel_connectivity.c",
- "src/core/ext/filters/client_channel/client_channel.c",
- "src/core/ext/filters/client_channel/client_channel_factory.c",
- "src/core/ext/filters/client_channel/client_channel_plugin.c",
- "src/core/ext/filters/client_channel/connector.c",
- "src/core/ext/filters/client_channel/http_connect_handshaker.c",
- "src/core/ext/filters/client_channel/http_proxy.c",
- "src/core/ext/filters/client_channel/lb_policy.c",
- "src/core/ext/filters/client_channel/lb_policy_factory.c",
- "src/core/ext/filters/client_channel/lb_policy_registry.c",
- "src/core/ext/filters/client_channel/parse_address.c",
- "src/core/ext/filters/client_channel/proxy_mapper.c",
- "src/core/ext/filters/client_channel/proxy_mapper_registry.c",
- "src/core/ext/filters/client_channel/resolver.c",
- "src/core/ext/filters/client_channel/resolver_factory.c",
- "src/core/ext/filters/client_channel/resolver_registry.c",
- "src/core/ext/filters/client_channel/retry_throttle.c",
- "src/core/ext/filters/client_channel/subchannel.c",
- "src/core/ext/filters/client_channel/subchannel_index.c",
- "src/core/ext/filters/client_channel/uri_parser.c",
+ "src/core/ext/filters/client_channel/channel_connectivity.cc",
+ "src/core/ext/filters/client_channel/client_channel.cc",
+ "src/core/ext/filters/client_channel/client_channel_factory.cc",
+ "src/core/ext/filters/client_channel/client_channel_plugin.cc",
+ "src/core/ext/filters/client_channel/connector.cc",
+ "src/core/ext/filters/client_channel/http_connect_handshaker.cc",
+ "src/core/ext/filters/client_channel/http_proxy.cc",
+ "src/core/ext/filters/client_channel/lb_policy.cc",
+ "src/core/ext/filters/client_channel/lb_policy_factory.cc",
+ "src/core/ext/filters/client_channel/lb_policy_registry.cc",
+ "src/core/ext/filters/client_channel/parse_address.cc",
+ "src/core/ext/filters/client_channel/proxy_mapper.cc",
+ "src/core/ext/filters/client_channel/proxy_mapper_registry.cc",
+ "src/core/ext/filters/client_channel/resolver.cc",
+ "src/core/ext/filters/client_channel/resolver_factory.cc",
+ "src/core/ext/filters/client_channel/resolver_registry.cc",
+ "src/core/ext/filters/client_channel/retry_throttle.cc",
+ "src/core/ext/filters/client_channel/subchannel.cc",
+ "src/core/ext/filters/client_channel/subchannel_index.cc",
+ "src/core/ext/filters/client_channel/uri_parser.cc",
],
hdrs = [
"src/core/ext/filters/client_channel/client_channel.h",
@@ -908,7 +912,7 @@ grpc_cc_library(
"src/core/ext/filters/client_channel/subchannel_index.h",
"src/core/ext/filters/client_channel/uri_parser.h",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
"grpc_deadline_filter",
@@ -918,12 +922,12 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_max_age_filter",
srcs = [
- "src/core/ext/filters/max_age/max_age_filter.c",
+ "src/core/ext/filters/max_age/max_age_filter.cc",
],
hdrs = [
"src/core/ext/filters/max_age/max_age_filter.h",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
],
@@ -932,12 +936,12 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_deadline_filter",
srcs = [
- "src/core/ext/filters/deadline/deadline_filter.c",
+ "src/core/ext/filters/deadline/deadline_filter.cc",
],
hdrs = [
"src/core/ext/filters/deadline/deadline_filter.h",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
],
@@ -946,12 +950,12 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_message_size_filter",
srcs = [
- "src/core/ext/filters/message_size/message_size_filter.c",
+ "src/core/ext/filters/message_size/message_size_filter.cc",
],
hdrs = [
"src/core/ext/filters/message_size/message_size_filter.h",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
],
@@ -960,17 +964,17 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_http_filters",
srcs = [
- "src/core/ext/filters/http/client/http_client_filter.c",
- "src/core/ext/filters/http/http_filters_plugin.c",
- "src/core/ext/filters/http/message_compress/message_compress_filter.c",
- "src/core/ext/filters/http/server/http_server_filter.c",
+ "src/core/ext/filters/http/client/http_client_filter.cc",
+ "src/core/ext/filters/http/http_filters_plugin.cc",
+ "src/core/ext/filters/http/message_compress/message_compress_filter.cc",
+ "src/core/ext/filters/http/server/http_server_filter.cc",
],
hdrs = [
"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",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
],
@@ -979,12 +983,12 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_workaround_cronet_compression_filter",
srcs = [
- "src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c",
+ "src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc",
],
hdrs = [
"src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
"grpc_server_backward_compatibility",
@@ -993,7 +997,7 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_codegen",
- language = "c",
+ language = "c++",
public_hdrs = [
"include/grpc/impl/codegen/byte_buffer.h",
"include/grpc/impl/codegen/byte_buffer_reader.h",
@@ -1013,11 +1017,11 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_lb_policy_grpclb",
srcs = [
- "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c",
- "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c",
- "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.c",
- "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c",
- "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c",
],
hdrs = [
@@ -1031,7 +1035,7 @@ grpc_cc_library(
external_deps = [
"nanopb",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
"grpc_client_channel",
@@ -1042,11 +1046,11 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_lb_policy_grpclb_secure",
srcs = [
- "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c",
- "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c",
- "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c",
- "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c",
- "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c",
],
hdrs = [
@@ -1060,7 +1064,7 @@ grpc_cc_library(
external_deps = [
"nanopb",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
"grpc_client_channel",
@@ -1072,9 +1076,9 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_lb_policy_pick_first",
srcs = [
- "src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c",
+ "src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
"grpc_client_channel",
@@ -1084,9 +1088,9 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_lb_policy_round_robin",
srcs = [
- "src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c",
+ "src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
"grpc_client_channel",
@@ -1096,14 +1100,14 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_server_load_reporting",
srcs = [
- "src/core/ext/filters/load_reporting/server_load_reporting_filter.c",
- "src/core/ext/filters/load_reporting/server_load_reporting_plugin.c",
+ "src/core/ext/filters/load_reporting/server_load_reporting_filter.cc",
+ "src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc",
],
hdrs = [
"src/core/ext/filters/load_reporting/server_load_reporting_filter.h",
"src/core/ext/filters/load_reporting/server_load_reporting_plugin.h",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
],
@@ -1112,9 +1116,9 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_resolver_dns_native",
srcs = [
- "src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c",
+ "src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
"grpc_client_channel",
@@ -1124,10 +1128,10 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_resolver_dns_ares",
srcs = [
- "src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c",
- "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c",
- "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c",
- "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c",
+ "src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc",
+ "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc",
+ "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc",
+ "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc",
],
hdrs = [
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h",
@@ -1136,7 +1140,7 @@ grpc_cc_library(
external_deps = [
"cares",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
"grpc_client_channel",
@@ -1146,9 +1150,9 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_resolver_sockaddr",
srcs = [
- "src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c",
+ "src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
"grpc_client_channel",
@@ -1157,9 +1161,9 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_resolver_fake",
- srcs = ["src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c"],
+ srcs = ["src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc"],
hdrs = ["src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h"],
- language = "c",
+ language = "c++",
visibility = ["//test:__subpackages__"],
deps = [
"grpc_base",
@@ -1170,30 +1174,30 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_secure",
srcs = [
- "src/core/lib/http/httpcli_security_connector.c",
- "src/core/lib/security/context/security_context.c",
- "src/core/lib/security/credentials/composite/composite_credentials.c",
- "src/core/lib/security/credentials/credentials.c",
- "src/core/lib/security/credentials/credentials_metadata.c",
- "src/core/lib/security/credentials/fake/fake_credentials.c",
- "src/core/lib/security/credentials/google_default/credentials_generic.c",
- "src/core/lib/security/credentials/google_default/google_default_credentials.c",
- "src/core/lib/security/credentials/iam/iam_credentials.c",
- "src/core/lib/security/credentials/jwt/json_token.c",
- "src/core/lib/security/credentials/jwt/jwt_credentials.c",
- "src/core/lib/security/credentials/jwt/jwt_verifier.c",
- "src/core/lib/security/credentials/oauth2/oauth2_credentials.c",
- "src/core/lib/security/credentials/plugin/plugin_credentials.c",
- "src/core/lib/security/credentials/ssl/ssl_credentials.c",
- "src/core/lib/security/transport/client_auth_filter.c",
- "src/core/lib/security/transport/lb_targets_info.c",
- "src/core/lib/security/transport/secure_endpoint.c",
- "src/core/lib/security/transport/security_connector.c",
- "src/core/lib/security/transport/security_handshaker.c",
- "src/core/lib/security/transport/server_auth_filter.c",
- "src/core/lib/security/transport/tsi_error.c",
- "src/core/lib/security/util/json_util.c",
- "src/core/lib/surface/init_secure.c",
+ "src/core/lib/http/httpcli_security_connector.cc",
+ "src/core/lib/security/context/security_context.cc",
+ "src/core/lib/security/credentials/composite/composite_credentials.cc",
+ "src/core/lib/security/credentials/credentials.cc",
+ "src/core/lib/security/credentials/credentials_metadata.cc",
+ "src/core/lib/security/credentials/fake/fake_credentials.cc",
+ "src/core/lib/security/credentials/google_default/credentials_generic.cc",
+ "src/core/lib/security/credentials/google_default/google_default_credentials.cc",
+ "src/core/lib/security/credentials/iam/iam_credentials.cc",
+ "src/core/lib/security/credentials/jwt/json_token.cc",
+ "src/core/lib/security/credentials/jwt/jwt_credentials.cc",
+ "src/core/lib/security/credentials/jwt/jwt_verifier.cc",
+ "src/core/lib/security/credentials/oauth2/oauth2_credentials.cc",
+ "src/core/lib/security/credentials/plugin/plugin_credentials.cc",
+ "src/core/lib/security/credentials/ssl/ssl_credentials.cc",
+ "src/core/lib/security/transport/client_auth_filter.cc",
+ "src/core/lib/security/transport/lb_targets_info.cc",
+ "src/core/lib/security/transport/secure_endpoint.cc",
+ "src/core/lib/security/transport/security_connector.cc",
+ "src/core/lib/security/transport/security_handshaker.cc",
+ "src/core/lib/security/transport/server_auth_filter.cc",
+ "src/core/lib/security/transport/tsi_error.cc",
+ "src/core/lib/security/util/json_util.cc",
+ "src/core/lib/surface/init_secure.cc",
],
hdrs = [
"src/core/lib/security/context/security_context.h",
@@ -1216,7 +1220,7 @@ grpc_cc_library(
"src/core/lib/security/transport/tsi_error.h",
"src/core/lib/security/util/json_util.h",
],
- language = "c",
+ language = "c++",
public_hdrs = GRPC_SECURE_PUBLIC_HDRS,
deps = [
"grpc_base",
@@ -1228,28 +1232,28 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_transport_chttp2",
srcs = [
- "src/core/ext/transport/chttp2/transport/bin_decoder.c",
- "src/core/ext/transport/chttp2/transport/bin_encoder.c",
- "src/core/ext/transport/chttp2/transport/chttp2_plugin.c",
- "src/core/ext/transport/chttp2/transport/chttp2_transport.c",
- "src/core/ext/transport/chttp2/transport/flow_control.c",
- "src/core/ext/transport/chttp2/transport/frame_data.c",
- "src/core/ext/transport/chttp2/transport/frame_goaway.c",
- "src/core/ext/transport/chttp2/transport/frame_ping.c",
- "src/core/ext/transport/chttp2/transport/frame_rst_stream.c",
- "src/core/ext/transport/chttp2/transport/frame_settings.c",
- "src/core/ext/transport/chttp2/transport/frame_window_update.c",
- "src/core/ext/transport/chttp2/transport/hpack_encoder.c",
- "src/core/ext/transport/chttp2/transport/hpack_parser.c",
- "src/core/ext/transport/chttp2/transport/hpack_table.c",
- "src/core/ext/transport/chttp2/transport/http2_settings.c",
- "src/core/ext/transport/chttp2/transport/huffsyms.c",
- "src/core/ext/transport/chttp2/transport/incoming_metadata.c",
- "src/core/ext/transport/chttp2/transport/parsing.c",
- "src/core/ext/transport/chttp2/transport/stream_lists.c",
- "src/core/ext/transport/chttp2/transport/stream_map.c",
- "src/core/ext/transport/chttp2/transport/varint.c",
- "src/core/ext/transport/chttp2/transport/writing.c",
+ "src/core/ext/transport/chttp2/transport/bin_decoder.cc",
+ "src/core/ext/transport/chttp2/transport/bin_encoder.cc",
+ "src/core/ext/transport/chttp2/transport/chttp2_plugin.cc",
+ "src/core/ext/transport/chttp2/transport/chttp2_transport.cc",
+ "src/core/ext/transport/chttp2/transport/flow_control.cc",
+ "src/core/ext/transport/chttp2/transport/frame_data.cc",
+ "src/core/ext/transport/chttp2/transport/frame_goaway.cc",
+ "src/core/ext/transport/chttp2/transport/frame_ping.cc",
+ "src/core/ext/transport/chttp2/transport/frame_rst_stream.cc",
+ "src/core/ext/transport/chttp2/transport/frame_settings.cc",
+ "src/core/ext/transport/chttp2/transport/frame_window_update.cc",
+ "src/core/ext/transport/chttp2/transport/hpack_encoder.cc",
+ "src/core/ext/transport/chttp2/transport/hpack_parser.cc",
+ "src/core/ext/transport/chttp2/transport/hpack_table.cc",
+ "src/core/ext/transport/chttp2/transport/http2_settings.cc",
+ "src/core/ext/transport/chttp2/transport/huffsyms.cc",
+ "src/core/ext/transport/chttp2/transport/incoming_metadata.cc",
+ "src/core/ext/transport/chttp2/transport/parsing.cc",
+ "src/core/ext/transport/chttp2/transport/stream_lists.cc",
+ "src/core/ext/transport/chttp2/transport/stream_map.cc",
+ "src/core/ext/transport/chttp2/transport/varint.cc",
+ "src/core/ext/transport/chttp2/transport/writing.cc",
],
hdrs = [
"src/core/ext/transport/chttp2/transport/bin_decoder.h",
@@ -1272,7 +1276,7 @@ grpc_cc_library(
"src/core/ext/transport/chttp2/transport/stream_map.h",
"src/core/ext/transport/chttp2/transport/varint.h",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
"grpc_http_filters",
@@ -1283,12 +1287,12 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_transport_chttp2_alpn",
srcs = [
- "src/core/ext/transport/chttp2/alpn/alpn.c",
+ "src/core/ext/transport/chttp2/alpn/alpn.cc",
],
hdrs = [
"src/core/ext/transport/chttp2/alpn/alpn.h",
],
- language = "c",
+ language = "c++",
deps = [
"gpr",
],
@@ -1297,12 +1301,12 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_transport_chttp2_client_connector",
srcs = [
- "src/core/ext/transport/chttp2/client/chttp2_connector.c",
+ "src/core/ext/transport/chttp2/client/chttp2_connector.cc",
],
hdrs = [
"src/core/ext/transport/chttp2/client/chttp2_connector.h",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
"grpc_client_channel",
@@ -1313,10 +1317,10 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_transport_chttp2_client_insecure",
srcs = [
- "src/core/ext/transport/chttp2/client/insecure/channel_create.c",
- "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c",
+ "src/core/ext/transport/chttp2/client/insecure/channel_create.cc",
+ "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
"grpc_client_channel",
@@ -1328,9 +1332,9 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_transport_chttp2_client_secure",
srcs = [
- "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c",
+ "src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
"grpc_client_channel",
@@ -1343,12 +1347,12 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_transport_chttp2_server",
srcs = [
- "src/core/ext/transport/chttp2/server/chttp2_server.c",
+ "src/core/ext/transport/chttp2/server/chttp2_server.cc",
],
hdrs = [
"src/core/ext/transport/chttp2/server/chttp2_server.h",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
"grpc_transport_chttp2",
@@ -1358,10 +1362,10 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_transport_chttp2_server_insecure",
srcs = [
- "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c",
- "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c",
+ "src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc",
+ "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
"grpc_transport_chttp2",
@@ -1372,9 +1376,9 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_transport_chttp2_server_secure",
srcs = [
- "src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c",
+ "src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
"grpc_secure",
@@ -1386,15 +1390,15 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_transport_cronet_client_secure",
srcs = [
- "src/core/ext/transport/cronet/client/secure/cronet_channel_create.c",
- "src/core/ext/transport/cronet/transport/cronet_api_dummy.c",
- "src/core/ext/transport/cronet/transport/cronet_transport.c",
+ "src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc",
+ "src/core/ext/transport/cronet/transport/cronet_api_dummy.cc",
+ "src/core/ext/transport/cronet/transport/cronet_transport.cc",
],
hdrs = [
"src/core/ext/transport/cronet/transport/cronet_transport.h",
"third_party/objective_c/Cronet/bidirectional_stream_c.h",
],
- language = "c",
+ language = "c++",
public_hdrs = [
"include/grpc/grpc_cronet.h",
"include/grpc/grpc_security.h",
@@ -1409,13 +1413,13 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_transport_inproc",
srcs = [
- "src/core/ext/transport/inproc/inproc_plugin.c",
- "src/core/ext/transport/inproc/inproc_transport.c",
+ "src/core/ext/transport/inproc/inproc_plugin.cc",
+ "src/core/ext/transport/inproc/inproc_transport.cc",
],
hdrs = [
"src/core/ext/transport/inproc/inproc_transport.h",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
],
@@ -1424,15 +1428,15 @@ grpc_cc_library(
grpc_cc_library(
name = "tsi_interface",
srcs = [
- "src/core/tsi/transport_security.c",
- "src/core/tsi/transport_security_adapter.c",
+ "src/core/tsi/transport_security.cc",
+ "src/core/tsi/transport_security_adapter.cc",
],
hdrs = [
"src/core/tsi/transport_security.h",
"src/core/tsi/transport_security_adapter.h",
"src/core/tsi/transport_security_interface.h",
],
- language = "c",
+ language = "c++",
deps = [
"gpr",
"grpc_trace",
@@ -1442,10 +1446,10 @@ grpc_cc_library(
grpc_cc_library(
name = "tsi",
srcs = [
- "src/core/tsi/fake_transport_security.c",
- "src/core/tsi/gts_transport_security.c",
- "src/core/tsi/ssl_transport_security.c",
- "src/core/tsi/transport_security_grpc.c",
+ "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/fake_transport_security.h",
@@ -1457,7 +1461,7 @@ grpc_cc_library(
external_deps = [
"libssl",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
"tsi_interface",
@@ -1596,12 +1600,12 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_server_backward_compatibility",
srcs = [
- "src/core/ext/filters/workarounds/workaround_utils.c",
+ "src/core/ext/filters/workarounds/workaround_utils.cc",
],
hdrs = [
"src/core/ext/filters/workarounds/workaround_utils.h",
],
- language = "c",
+ language = "c++",
deps = [
"grpc_base",
],
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 464e783434..f9649ece16 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,7 +24,7 @@
cmake_minimum_required(VERSION 2.8)
set(PACKAGE_NAME "grpc")
-set(PACKAGE_VERSION "1.7.0-dev")
+set(PACKAGE_VERSION "1.8.0-dev")
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/")
@@ -379,6 +379,7 @@ add_dependencies(buildtests_c algorithm_test)
add_dependencies(buildtests_c alloc_test)
add_dependencies(buildtests_c alpn_test)
add_dependencies(buildtests_c arena_test)
+add_dependencies(buildtests_c backoff_test)
add_dependencies(buildtests_c bad_server_response_test)
add_dependencies(buildtests_c bdp_estimator_test)
add_dependencies(buildtests_c bin_decoder_test)
@@ -428,7 +429,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_dependencies(buildtests_c goaway_server_test)
endif()
add_dependencies(buildtests_c gpr_avl_test)
-add_dependencies(buildtests_c gpr_backoff_test)
add_dependencies(buildtests_c gpr_cmdline_test)
add_dependencies(buildtests_c gpr_cpu_test)
add_dependencies(buildtests_c gpr_env_test)
@@ -780,52 +780,51 @@ endif (gRPC_BUILD_TESTS)
add_library(gpr
- src/core/lib/profiling/basic_timers.c
- src/core/lib/profiling/stap_timers.c
- src/core/lib/support/alloc.c
- src/core/lib/support/arena.c
- src/core/lib/support/atm.c
- src/core/lib/support/avl.c
- src/core/lib/support/backoff.c
- src/core/lib/support/cmdline.c
- src/core/lib/support/cpu_iphone.c
- src/core/lib/support/cpu_linux.c
- src/core/lib/support/cpu_posix.c
- src/core/lib/support/cpu_windows.c
- src/core/lib/support/env_linux.c
- src/core/lib/support/env_posix.c
- src/core/lib/support/env_windows.c
- src/core/lib/support/histogram.c
- src/core/lib/support/host_port.c
- src/core/lib/support/log.c
- src/core/lib/support/log_android.c
- src/core/lib/support/log_linux.c
- src/core/lib/support/log_posix.c
- src/core/lib/support/log_windows.c
- src/core/lib/support/mpscq.c
- src/core/lib/support/murmur_hash.c
- src/core/lib/support/stack_lockfree.c
- src/core/lib/support/string.c
- src/core/lib/support/string_posix.c
- src/core/lib/support/string_util_windows.c
- src/core/lib/support/string_windows.c
- src/core/lib/support/subprocess_posix.c
- src/core/lib/support/subprocess_windows.c
- src/core/lib/support/sync.c
- src/core/lib/support/sync_posix.c
- src/core/lib/support/sync_windows.c
- src/core/lib/support/thd.c
- src/core/lib/support/thd_posix.c
- src/core/lib/support/thd_windows.c
- src/core/lib/support/time.c
- src/core/lib/support/time_posix.c
- src/core/lib/support/time_precise.c
- src/core/lib/support/time_windows.c
- src/core/lib/support/tls_pthread.c
- src/core/lib/support/tmpfile_msys.c
- src/core/lib/support/tmpfile_posix.c
- src/core/lib/support/tmpfile_windows.c
- src/core/lib/support/wrap_memcpy.c
+ src/core/lib/profiling/basic_timers.cc
+ src/core/lib/profiling/stap_timers.cc
+ src/core/lib/support/alloc.cc
+ src/core/lib/support/arena.cc
+ src/core/lib/support/atm.cc
+ src/core/lib/support/avl.cc
+ src/core/lib/support/cmdline.cc
+ src/core/lib/support/cpu_iphone.cc
+ src/core/lib/support/cpu_linux.cc
+ src/core/lib/support/cpu_posix.cc
+ src/core/lib/support/cpu_windows.cc
+ src/core/lib/support/env_linux.cc
+ src/core/lib/support/env_posix.cc
+ src/core/lib/support/env_windows.cc
+ src/core/lib/support/histogram.cc
+ src/core/lib/support/host_port.cc
+ src/core/lib/support/log.cc
+ src/core/lib/support/log_android.cc
+ src/core/lib/support/log_linux.cc
+ src/core/lib/support/log_posix.cc
+ src/core/lib/support/log_windows.cc
+ src/core/lib/support/mpscq.cc
+ src/core/lib/support/murmur_hash.cc
+ src/core/lib/support/stack_lockfree.cc
+ src/core/lib/support/string.cc
+ src/core/lib/support/string_posix.cc
+ src/core/lib/support/string_util_windows.cc
+ src/core/lib/support/string_windows.cc
+ src/core/lib/support/subprocess_posix.cc
+ src/core/lib/support/subprocess_windows.cc
+ src/core/lib/support/sync.cc
+ src/core/lib/support/sync_posix.cc
+ src/core/lib/support/sync_windows.cc
+ src/core/lib/support/thd.cc
+ src/core/lib/support/thd_posix.cc
+ src/core/lib/support/thd_windows.cc
+ src/core/lib/support/time.cc
+ src/core/lib/support/time_posix.cc
+ src/core/lib/support/time_precise.cc
+ src/core/lib/support/time_windows.cc
+ src/core/lib/support/tls_pthread.cc
+ src/core/lib/support/tmpfile_msys.cc
+ src/core/lib/support/tmpfile_posix.cc
+ src/core/lib/support/tmpfile_windows.cc
+ src/core/lib/support/wrap_memcpy.cc
)
if(WIN32 AND MSVC)
@@ -954,268 +953,269 @@ target_link_libraries(gpr_test_util
endif (gRPC_BUILD_TESTS)
add_library(grpc
- src/core/lib/surface/init.c
- src/core/lib/channel/channel_args.c
- src/core/lib/channel/channel_stack.c
- src/core/lib/channel/channel_stack_builder.c
- src/core/lib/channel/connected_channel.c
- src/core/lib/channel/handshaker.c
- src/core/lib/channel/handshaker_factory.c
- src/core/lib/channel/handshaker_registry.c
- src/core/lib/compression/compression.c
- src/core/lib/compression/compression_internal.c
- src/core/lib/compression/message_compress.c
- src/core/lib/compression/stream_compression.c
- src/core/lib/compression/stream_compression_gzip.c
- src/core/lib/compression/stream_compression_identity.c
- src/core/lib/debug/stats.c
- src/core/lib/debug/stats_data.c
- src/core/lib/http/format_request.c
- src/core/lib/http/httpcli.c
- src/core/lib/http/parser.c
- src/core/lib/iomgr/call_combiner.c
- src/core/lib/iomgr/closure.c
- src/core/lib/iomgr/combiner.c
- src/core/lib/iomgr/endpoint.c
- src/core/lib/iomgr/endpoint_pair_posix.c
- src/core/lib/iomgr/endpoint_pair_uv.c
- src/core/lib/iomgr/endpoint_pair_windows.c
- src/core/lib/iomgr/error.c
- src/core/lib/iomgr/ev_epoll1_linux.c
- src/core/lib/iomgr/ev_epollex_linux.c
- src/core/lib/iomgr/ev_epollsig_linux.c
- src/core/lib/iomgr/ev_poll_posix.c
- src/core/lib/iomgr/ev_posix.c
- src/core/lib/iomgr/ev_windows.c
- src/core/lib/iomgr/exec_ctx.c
- src/core/lib/iomgr/executor.c
- src/core/lib/iomgr/gethostname_fallback.c
- src/core/lib/iomgr/gethostname_host_name_max.c
- src/core/lib/iomgr/gethostname_sysconf.c
- src/core/lib/iomgr/iocp_windows.c
- src/core/lib/iomgr/iomgr.c
- src/core/lib/iomgr/iomgr_posix.c
- src/core/lib/iomgr/iomgr_uv.c
- src/core/lib/iomgr/iomgr_windows.c
- src/core/lib/iomgr/is_epollexclusive_available.c
- src/core/lib/iomgr/load_file.c
- src/core/lib/iomgr/lockfree_event.c
- src/core/lib/iomgr/network_status_tracker.c
- src/core/lib/iomgr/polling_entity.c
- src/core/lib/iomgr/pollset_set_uv.c
- src/core/lib/iomgr/pollset_set_windows.c
- src/core/lib/iomgr/pollset_uv.c
- src/core/lib/iomgr/pollset_windows.c
- src/core/lib/iomgr/resolve_address_posix.c
- src/core/lib/iomgr/resolve_address_uv.c
- src/core/lib/iomgr/resolve_address_windows.c
- src/core/lib/iomgr/resource_quota.c
- src/core/lib/iomgr/sockaddr_utils.c
- src/core/lib/iomgr/socket_factory_posix.c
- src/core/lib/iomgr/socket_mutator.c
- src/core/lib/iomgr/socket_utils_common_posix.c
- src/core/lib/iomgr/socket_utils_linux.c
- src/core/lib/iomgr/socket_utils_posix.c
- src/core/lib/iomgr/socket_utils_uv.c
- src/core/lib/iomgr/socket_utils_windows.c
- src/core/lib/iomgr/socket_windows.c
- src/core/lib/iomgr/tcp_client_posix.c
- src/core/lib/iomgr/tcp_client_uv.c
- src/core/lib/iomgr/tcp_client_windows.c
- src/core/lib/iomgr/tcp_posix.c
- src/core/lib/iomgr/tcp_server_posix.c
- src/core/lib/iomgr/tcp_server_utils_posix_common.c
- src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c
- src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c
- src/core/lib/iomgr/tcp_server_uv.c
- src/core/lib/iomgr/tcp_server_windows.c
- src/core/lib/iomgr/tcp_uv.c
- src/core/lib/iomgr/tcp_windows.c
- src/core/lib/iomgr/time_averaged_stats.c
- src/core/lib/iomgr/timer_generic.c
- src/core/lib/iomgr/timer_heap.c
- src/core/lib/iomgr/timer_manager.c
- src/core/lib/iomgr/timer_uv.c
- src/core/lib/iomgr/udp_server.c
- src/core/lib/iomgr/unix_sockets_posix.c
- src/core/lib/iomgr/unix_sockets_posix_noop.c
- src/core/lib/iomgr/wakeup_fd_cv.c
- src/core/lib/iomgr/wakeup_fd_eventfd.c
- src/core/lib/iomgr/wakeup_fd_nospecial.c
- src/core/lib/iomgr/wakeup_fd_pipe.c
- src/core/lib/iomgr/wakeup_fd_posix.c
- src/core/lib/json/json.c
- src/core/lib/json/json_reader.c
- src/core/lib/json/json_string.c
- src/core/lib/json/json_writer.c
- src/core/lib/slice/b64.c
- src/core/lib/slice/percent_encoding.c
- src/core/lib/slice/slice.c
- src/core/lib/slice/slice_buffer.c
- src/core/lib/slice/slice_hash_table.c
- src/core/lib/slice/slice_intern.c
- src/core/lib/slice/slice_string_helpers.c
- src/core/lib/surface/alarm.c
- src/core/lib/surface/api_trace.c
- src/core/lib/surface/byte_buffer.c
- src/core/lib/surface/byte_buffer_reader.c
- src/core/lib/surface/call.c
- src/core/lib/surface/call_details.c
- src/core/lib/surface/call_log_batch.c
- src/core/lib/surface/channel.c
- src/core/lib/surface/channel_init.c
- src/core/lib/surface/channel_ping.c
- src/core/lib/surface/channel_stack_type.c
- src/core/lib/surface/completion_queue.c
- src/core/lib/surface/completion_queue_factory.c
- src/core/lib/surface/event_string.c
+ src/core/lib/surface/init.cc
+ src/core/lib/backoff/backoff.cc
+ src/core/lib/channel/channel_args.cc
+ src/core/lib/channel/channel_stack.cc
+ src/core/lib/channel/channel_stack_builder.cc
+ src/core/lib/channel/connected_channel.cc
+ src/core/lib/channel/handshaker.cc
+ 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/message_compress.cc
+ src/core/lib/compression/stream_compression.cc
+ src/core/lib/compression/stream_compression_gzip.cc
+ src/core/lib/compression/stream_compression_identity.cc
+ src/core/lib/debug/stats.cc
+ src/core/lib/debug/stats_data.cc
+ src/core/lib/http/format_request.cc
+ src/core/lib/http/httpcli.cc
+ src/core/lib/http/parser.cc
+ src/core/lib/iomgr/call_combiner.cc
+ src/core/lib/iomgr/closure.cc
+ src/core/lib/iomgr/combiner.cc
+ src/core/lib/iomgr/endpoint.cc
+ src/core/lib/iomgr/endpoint_pair_posix.cc
+ src/core/lib/iomgr/endpoint_pair_uv.cc
+ src/core/lib/iomgr/endpoint_pair_windows.cc
+ src/core/lib/iomgr/error.cc
+ src/core/lib/iomgr/ev_epoll1_linux.cc
+ src/core/lib/iomgr/ev_epollex_linux.cc
+ src/core/lib/iomgr/ev_epollsig_linux.cc
+ src/core/lib/iomgr/ev_poll_posix.cc
+ src/core/lib/iomgr/ev_posix.cc
+ src/core/lib/iomgr/ev_windows.cc
+ src/core/lib/iomgr/exec_ctx.cc
+ src/core/lib/iomgr/executor.cc
+ src/core/lib/iomgr/gethostname_fallback.cc
+ src/core/lib/iomgr/gethostname_host_name_max.cc
+ src/core/lib/iomgr/gethostname_sysconf.cc
+ src/core/lib/iomgr/iocp_windows.cc
+ src/core/lib/iomgr/iomgr.cc
+ src/core/lib/iomgr/iomgr_posix.cc
+ src/core/lib/iomgr/iomgr_uv.cc
+ src/core/lib/iomgr/iomgr_windows.cc
+ src/core/lib/iomgr/is_epollexclusive_available.cc
+ src/core/lib/iomgr/load_file.cc
+ src/core/lib/iomgr/lockfree_event.cc
+ src/core/lib/iomgr/network_status_tracker.cc
+ src/core/lib/iomgr/polling_entity.cc
+ src/core/lib/iomgr/pollset_set_uv.cc
+ src/core/lib/iomgr/pollset_set_windows.cc
+ src/core/lib/iomgr/pollset_uv.cc
+ src/core/lib/iomgr/pollset_windows.cc
+ src/core/lib/iomgr/resolve_address_posix.cc
+ src/core/lib/iomgr/resolve_address_uv.cc
+ src/core/lib/iomgr/resolve_address_windows.cc
+ src/core/lib/iomgr/resource_quota.cc
+ src/core/lib/iomgr/sockaddr_utils.cc
+ src/core/lib/iomgr/socket_factory_posix.cc
+ src/core/lib/iomgr/socket_mutator.cc
+ src/core/lib/iomgr/socket_utils_common_posix.cc
+ src/core/lib/iomgr/socket_utils_linux.cc
+ src/core/lib/iomgr/socket_utils_posix.cc
+ src/core/lib/iomgr/socket_utils_uv.cc
+ src/core/lib/iomgr/socket_utils_windows.cc
+ src/core/lib/iomgr/socket_windows.cc
+ src/core/lib/iomgr/tcp_client_posix.cc
+ src/core/lib/iomgr/tcp_client_uv.cc
+ src/core/lib/iomgr/tcp_client_windows.cc
+ src/core/lib/iomgr/tcp_posix.cc
+ src/core/lib/iomgr/tcp_server_posix.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_common.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
+ src/core/lib/iomgr/tcp_server_uv.cc
+ src/core/lib/iomgr/tcp_server_windows.cc
+ src/core/lib/iomgr/tcp_uv.cc
+ src/core/lib/iomgr/tcp_windows.cc
+ src/core/lib/iomgr/time_averaged_stats.cc
+ src/core/lib/iomgr/timer_generic.cc
+ src/core/lib/iomgr/timer_heap.cc
+ src/core/lib/iomgr/timer_manager.cc
+ src/core/lib/iomgr/timer_uv.cc
+ src/core/lib/iomgr/udp_server.cc
+ src/core/lib/iomgr/unix_sockets_posix.cc
+ src/core/lib/iomgr/unix_sockets_posix_noop.cc
+ src/core/lib/iomgr/wakeup_fd_cv.cc
+ src/core/lib/iomgr/wakeup_fd_eventfd.cc
+ src/core/lib/iomgr/wakeup_fd_nospecial.cc
+ src/core/lib/iomgr/wakeup_fd_pipe.cc
+ src/core/lib/iomgr/wakeup_fd_posix.cc
+ src/core/lib/json/json.cc
+ src/core/lib/json/json_reader.cc
+ src/core/lib/json/json_string.cc
+ src/core/lib/json/json_writer.cc
+ src/core/lib/slice/b64.cc
+ src/core/lib/slice/percent_encoding.cc
+ src/core/lib/slice/slice.cc
+ src/core/lib/slice/slice_buffer.cc
+ src/core/lib/slice/slice_hash_table.cc
+ src/core/lib/slice/slice_intern.cc
+ src/core/lib/slice/slice_string_helpers.cc
+ src/core/lib/surface/alarm.cc
+ src/core/lib/surface/api_trace.cc
+ src/core/lib/surface/byte_buffer.cc
+ src/core/lib/surface/byte_buffer_reader.cc
+ src/core/lib/surface/call.cc
+ src/core/lib/surface/call_details.cc
+ src/core/lib/surface/call_log_batch.cc
+ src/core/lib/surface/channel.cc
+ src/core/lib/surface/channel_init.cc
+ src/core/lib/surface/channel_ping.cc
+ src/core/lib/surface/channel_stack_type.cc
+ src/core/lib/surface/completion_queue.cc
+ src/core/lib/surface/completion_queue_factory.cc
+ src/core/lib/surface/event_string.cc
src/core/lib/surface/lame_client.cc
- src/core/lib/surface/metadata_array.c
- src/core/lib/surface/server.c
- src/core/lib/surface/validate_metadata.c
- src/core/lib/surface/version.c
- src/core/lib/transport/bdp_estimator.c
- src/core/lib/transport/byte_stream.c
- src/core/lib/transport/connectivity_state.c
- src/core/lib/transport/error_utils.c
- src/core/lib/transport/metadata.c
- src/core/lib/transport/metadata_batch.c
- src/core/lib/transport/pid_controller.c
- src/core/lib/transport/service_config.c
- src/core/lib/transport/static_metadata.c
- src/core/lib/transport/status_conversion.c
- src/core/lib/transport/timeout_encoding.c
- src/core/lib/transport/transport.c
- src/core/lib/transport/transport_op_string.c
- src/core/lib/debug/trace.c
- src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c
- src/core/ext/transport/chttp2/transport/bin_decoder.c
- src/core/ext/transport/chttp2/transport/bin_encoder.c
- src/core/ext/transport/chttp2/transport/chttp2_plugin.c
- src/core/ext/transport/chttp2/transport/chttp2_transport.c
- src/core/ext/transport/chttp2/transport/flow_control.c
- src/core/ext/transport/chttp2/transport/frame_data.c
- src/core/ext/transport/chttp2/transport/frame_goaway.c
- src/core/ext/transport/chttp2/transport/frame_ping.c
- src/core/ext/transport/chttp2/transport/frame_rst_stream.c
- src/core/ext/transport/chttp2/transport/frame_settings.c
- src/core/ext/transport/chttp2/transport/frame_window_update.c
- src/core/ext/transport/chttp2/transport/hpack_encoder.c
- src/core/ext/transport/chttp2/transport/hpack_parser.c
- src/core/ext/transport/chttp2/transport/hpack_table.c
- src/core/ext/transport/chttp2/transport/http2_settings.c
- src/core/ext/transport/chttp2/transport/huffsyms.c
- src/core/ext/transport/chttp2/transport/incoming_metadata.c
- src/core/ext/transport/chttp2/transport/parsing.c
- src/core/ext/transport/chttp2/transport/stream_lists.c
- src/core/ext/transport/chttp2/transport/stream_map.c
- src/core/ext/transport/chttp2/transport/varint.c
- src/core/ext/transport/chttp2/transport/writing.c
- src/core/ext/transport/chttp2/alpn/alpn.c
- src/core/ext/filters/http/client/http_client_filter.c
- src/core/ext/filters/http/http_filters_plugin.c
- src/core/ext/filters/http/message_compress/message_compress_filter.c
- src/core/ext/filters/http/server/http_server_filter.c
- src/core/lib/http/httpcli_security_connector.c
- src/core/lib/security/context/security_context.c
- src/core/lib/security/credentials/composite/composite_credentials.c
- src/core/lib/security/credentials/credentials.c
- src/core/lib/security/credentials/credentials_metadata.c
- src/core/lib/security/credentials/fake/fake_credentials.c
- src/core/lib/security/credentials/google_default/credentials_generic.c
- src/core/lib/security/credentials/google_default/google_default_credentials.c
- src/core/lib/security/credentials/iam/iam_credentials.c
- src/core/lib/security/credentials/jwt/json_token.c
- src/core/lib/security/credentials/jwt/jwt_credentials.c
- src/core/lib/security/credentials/jwt/jwt_verifier.c
- src/core/lib/security/credentials/oauth2/oauth2_credentials.c
- src/core/lib/security/credentials/plugin/plugin_credentials.c
- src/core/lib/security/credentials/ssl/ssl_credentials.c
- src/core/lib/security/transport/client_auth_filter.c
- src/core/lib/security/transport/lb_targets_info.c
- src/core/lib/security/transport/secure_endpoint.c
- src/core/lib/security/transport/security_connector.c
- src/core/lib/security/transport/security_handshaker.c
- src/core/lib/security/transport/server_auth_filter.c
- src/core/lib/security/transport/tsi_error.c
- src/core/lib/security/util/json_util.c
- src/core/lib/surface/init_secure.c
- src/core/tsi/fake_transport_security.c
- src/core/tsi/gts_transport_security.c
- src/core/tsi/ssl_transport_security.c
- src/core/tsi/transport_security_grpc.c
- src/core/tsi/transport_security.c
- src/core/tsi/transport_security_adapter.c
- src/core/ext/transport/chttp2/server/chttp2_server.c
- src/core/ext/transport/chttp2/client/secure/secure_channel_create.c
- src/core/ext/filters/client_channel/channel_connectivity.c
- src/core/ext/filters/client_channel/client_channel.c
- src/core/ext/filters/client_channel/client_channel_factory.c
- src/core/ext/filters/client_channel/client_channel_plugin.c
- src/core/ext/filters/client_channel/connector.c
- src/core/ext/filters/client_channel/http_connect_handshaker.c
- src/core/ext/filters/client_channel/http_proxy.c
- src/core/ext/filters/client_channel/lb_policy.c
- src/core/ext/filters/client_channel/lb_policy_factory.c
- src/core/ext/filters/client_channel/lb_policy_registry.c
- src/core/ext/filters/client_channel/parse_address.c
- src/core/ext/filters/client_channel/proxy_mapper.c
- src/core/ext/filters/client_channel/proxy_mapper_registry.c
- src/core/ext/filters/client_channel/resolver.c
- src/core/ext/filters/client_channel/resolver_factory.c
- src/core/ext/filters/client_channel/resolver_registry.c
- src/core/ext/filters/client_channel/retry_throttle.c
- src/core/ext/filters/client_channel/subchannel.c
- src/core/ext/filters/client_channel/subchannel_index.c
- src/core/ext/filters/client_channel/uri_parser.c
- src/core/ext/filters/deadline/deadline_filter.c
- src/core/ext/transport/chttp2/client/chttp2_connector.c
- src/core/ext/transport/chttp2/server/insecure/server_chttp2.c
- src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c
- src/core/ext/transport/chttp2/client/insecure/channel_create.c
- src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c
- src/core/ext/transport/inproc/inproc_plugin.c
- src/core/ext/transport/inproc/inproc_transport.c
- src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c
- src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c
+ src/core/lib/surface/metadata_array.cc
+ src/core/lib/surface/server.cc
+ src/core/lib/surface/validate_metadata.cc
+ src/core/lib/surface/version.cc
+ src/core/lib/transport/bdp_estimator.cc
+ src/core/lib/transport/byte_stream.cc
+ src/core/lib/transport/connectivity_state.cc
+ src/core/lib/transport/error_utils.cc
+ src/core/lib/transport/metadata.cc
+ src/core/lib/transport/metadata_batch.cc
+ src/core/lib/transport/pid_controller.cc
+ src/core/lib/transport/service_config.cc
+ src/core/lib/transport/static_metadata.cc
+ src/core/lib/transport/status_conversion.cc
+ src/core/lib/transport/timeout_encoding.cc
+ src/core/lib/transport/transport.cc
+ src/core/lib/transport/transport_op_string.cc
+ src/core/lib/debug/trace.cc
+ src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc
+ src/core/ext/transport/chttp2/transport/bin_decoder.cc
+ src/core/ext/transport/chttp2/transport/bin_encoder.cc
+ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc
+ src/core/ext/transport/chttp2/transport/chttp2_transport.cc
+ src/core/ext/transport/chttp2/transport/flow_control.cc
+ src/core/ext/transport/chttp2/transport/frame_data.cc
+ src/core/ext/transport/chttp2/transport/frame_goaway.cc
+ src/core/ext/transport/chttp2/transport/frame_ping.cc
+ src/core/ext/transport/chttp2/transport/frame_rst_stream.cc
+ src/core/ext/transport/chttp2/transport/frame_settings.cc
+ src/core/ext/transport/chttp2/transport/frame_window_update.cc
+ src/core/ext/transport/chttp2/transport/hpack_encoder.cc
+ src/core/ext/transport/chttp2/transport/hpack_parser.cc
+ src/core/ext/transport/chttp2/transport/hpack_table.cc
+ src/core/ext/transport/chttp2/transport/http2_settings.cc
+ src/core/ext/transport/chttp2/transport/huffsyms.cc
+ src/core/ext/transport/chttp2/transport/incoming_metadata.cc
+ src/core/ext/transport/chttp2/transport/parsing.cc
+ src/core/ext/transport/chttp2/transport/stream_lists.cc
+ src/core/ext/transport/chttp2/transport/stream_map.cc
+ src/core/ext/transport/chttp2/transport/varint.cc
+ src/core/ext/transport/chttp2/transport/writing.cc
+ src/core/ext/transport/chttp2/alpn/alpn.cc
+ src/core/ext/filters/http/client/http_client_filter.cc
+ src/core/ext/filters/http/http_filters_plugin.cc
+ src/core/ext/filters/http/message_compress/message_compress_filter.cc
+ src/core/ext/filters/http/server/http_server_filter.cc
+ src/core/lib/http/httpcli_security_connector.cc
+ src/core/lib/security/context/security_context.cc
+ src/core/lib/security/credentials/composite/composite_credentials.cc
+ src/core/lib/security/credentials/credentials.cc
+ src/core/lib/security/credentials/credentials_metadata.cc
+ src/core/lib/security/credentials/fake/fake_credentials.cc
+ src/core/lib/security/credentials/google_default/credentials_generic.cc
+ src/core/lib/security/credentials/google_default/google_default_credentials.cc
+ src/core/lib/security/credentials/iam/iam_credentials.cc
+ src/core/lib/security/credentials/jwt/json_token.cc
+ src/core/lib/security/credentials/jwt/jwt_credentials.cc
+ src/core/lib/security/credentials/jwt/jwt_verifier.cc
+ src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
+ src/core/lib/security/credentials/plugin/plugin_credentials.cc
+ src/core/lib/security/credentials/ssl/ssl_credentials.cc
+ src/core/lib/security/transport/client_auth_filter.cc
+ src/core/lib/security/transport/lb_targets_info.cc
+ src/core/lib/security/transport/secure_endpoint.cc
+ src/core/lib/security/transport/security_connector.cc
+ src/core/lib/security/transport/security_handshaker.cc
+ src/core/lib/security/transport/server_auth_filter.cc
+ 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/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
+ src/core/tsi/transport_security_adapter.cc
+ src/core/ext/transport/chttp2/server/chttp2_server.cc
+ src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc
+ src/core/ext/filters/client_channel/channel_connectivity.cc
+ src/core/ext/filters/client_channel/client_channel.cc
+ src/core/ext/filters/client_channel/client_channel_factory.cc
+ src/core/ext/filters/client_channel/client_channel_plugin.cc
+ src/core/ext/filters/client_channel/connector.cc
+ src/core/ext/filters/client_channel/http_connect_handshaker.cc
+ src/core/ext/filters/client_channel/http_proxy.cc
+ src/core/ext/filters/client_channel/lb_policy.cc
+ src/core/ext/filters/client_channel/lb_policy_factory.cc
+ src/core/ext/filters/client_channel/lb_policy_registry.cc
+ src/core/ext/filters/client_channel/parse_address.cc
+ src/core/ext/filters/client_channel/proxy_mapper.cc
+ src/core/ext/filters/client_channel/proxy_mapper_registry.cc
+ src/core/ext/filters/client_channel/resolver.cc
+ src/core/ext/filters/client_channel/resolver_factory.cc
+ src/core/ext/filters/client_channel/resolver_registry.cc
+ src/core/ext/filters/client_channel/retry_throttle.cc
+ src/core/ext/filters/client_channel/subchannel.cc
+ src/core/ext/filters/client_channel/subchannel_index.cc
+ src/core/ext/filters/client_channel/uri_parser.cc
+ src/core/ext/filters/deadline/deadline_filter.cc
+ src/core/ext/transport/chttp2/client/chttp2_connector.cc
+ src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc
+ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc
+ src/core/ext/transport/chttp2/client/insecure/channel_create.cc
+ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc
+ src/core/ext/transport/inproc/inproc_plugin.cc
+ src/core/ext/transport/inproc/inproc_transport.cc
+ src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc
+ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
+ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc
+ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc
+ src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c
third_party/nanopb/pb_common.c
third_party/nanopb/pb_decode.c
third_party/nanopb/pb_encode.c
- src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c
- src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c
- src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c
- src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c
- src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c
- src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c
- src/core/ext/filters/load_reporting/server_load_reporting_filter.c
- src/core/ext/filters/load_reporting/server_load_reporting_plugin.c
- src/core/ext/census/base_resources.c
- src/core/ext/census/context.c
+ src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
+ src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
+ src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc
+ src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
+ src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
+ src/core/ext/filters/load_reporting/server_load_reporting_filter.cc
+ src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc
+ src/core/ext/census/base_resources.cc
+ src/core/ext/census/context.cc
src/core/ext/census/gen/census.pb.c
src/core/ext/census/gen/trace_context.pb.c
- src/core/ext/census/grpc_context.c
- src/core/ext/census/grpc_filter.c
- src/core/ext/census/grpc_plugin.c
- src/core/ext/census/initialize.c
- src/core/ext/census/intrusive_hash_map.c
- src/core/ext/census/mlog.c
- src/core/ext/census/operation.c
- src/core/ext/census/placeholders.c
- src/core/ext/census/resource.c
- src/core/ext/census/trace_context.c
- src/core/ext/census/tracing.c
- src/core/ext/filters/max_age/max_age_filter.c
- src/core/ext/filters/message_size/message_size_filter.c
- src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c
- src/core/ext/filters/workarounds/workaround_utils.c
- src/core/plugin_registry/grpc_plugin_registry.c
+ src/core/ext/census/grpc_context.cc
+ src/core/ext/census/grpc_filter.cc
+ src/core/ext/census/grpc_plugin.cc
+ src/core/ext/census/initialize.cc
+ src/core/ext/census/intrusive_hash_map.cc
+ src/core/ext/census/mlog.cc
+ src/core/ext/census/operation.cc
+ src/core/ext/census/placeholders.cc
+ src/core/ext/census/resource.cc
+ src/core/ext/census/trace_context.cc
+ src/core/ext/census/tracing.cc
+ src/core/ext/filters/max_age/max_age_filter.cc
+ src/core/ext/filters/message_size/message_size_filter.cc
+ src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc
+ src/core/ext/filters/workarounds/workaround_utils.cc
+ src/core/plugin_registry/grpc_plugin_registry.cc
)
if(WIN32 AND MSVC)
@@ -1306,226 +1306,227 @@ endif()
add_library(grpc_cronet
- src/core/lib/surface/init.c
- src/core/lib/channel/channel_args.c
- src/core/lib/channel/channel_stack.c
- src/core/lib/channel/channel_stack_builder.c
- src/core/lib/channel/connected_channel.c
- src/core/lib/channel/handshaker.c
- src/core/lib/channel/handshaker_factory.c
- src/core/lib/channel/handshaker_registry.c
- src/core/lib/compression/compression.c
- src/core/lib/compression/compression_internal.c
- src/core/lib/compression/message_compress.c
- src/core/lib/compression/stream_compression.c
- src/core/lib/compression/stream_compression_gzip.c
- src/core/lib/compression/stream_compression_identity.c
- src/core/lib/debug/stats.c
- src/core/lib/debug/stats_data.c
- src/core/lib/http/format_request.c
- src/core/lib/http/httpcli.c
- src/core/lib/http/parser.c
- src/core/lib/iomgr/call_combiner.c
- src/core/lib/iomgr/closure.c
- src/core/lib/iomgr/combiner.c
- src/core/lib/iomgr/endpoint.c
- src/core/lib/iomgr/endpoint_pair_posix.c
- src/core/lib/iomgr/endpoint_pair_uv.c
- src/core/lib/iomgr/endpoint_pair_windows.c
- src/core/lib/iomgr/error.c
- src/core/lib/iomgr/ev_epoll1_linux.c
- src/core/lib/iomgr/ev_epollex_linux.c
- src/core/lib/iomgr/ev_epollsig_linux.c
- src/core/lib/iomgr/ev_poll_posix.c
- src/core/lib/iomgr/ev_posix.c
- src/core/lib/iomgr/ev_windows.c
- src/core/lib/iomgr/exec_ctx.c
- src/core/lib/iomgr/executor.c
- src/core/lib/iomgr/gethostname_fallback.c
- src/core/lib/iomgr/gethostname_host_name_max.c
- src/core/lib/iomgr/gethostname_sysconf.c
- src/core/lib/iomgr/iocp_windows.c
- src/core/lib/iomgr/iomgr.c
- src/core/lib/iomgr/iomgr_posix.c
- src/core/lib/iomgr/iomgr_uv.c
- src/core/lib/iomgr/iomgr_windows.c
- src/core/lib/iomgr/is_epollexclusive_available.c
- src/core/lib/iomgr/load_file.c
- src/core/lib/iomgr/lockfree_event.c
- src/core/lib/iomgr/network_status_tracker.c
- src/core/lib/iomgr/polling_entity.c
- src/core/lib/iomgr/pollset_set_uv.c
- src/core/lib/iomgr/pollset_set_windows.c
- src/core/lib/iomgr/pollset_uv.c
- src/core/lib/iomgr/pollset_windows.c
- src/core/lib/iomgr/resolve_address_posix.c
- src/core/lib/iomgr/resolve_address_uv.c
- src/core/lib/iomgr/resolve_address_windows.c
- src/core/lib/iomgr/resource_quota.c
- src/core/lib/iomgr/sockaddr_utils.c
- src/core/lib/iomgr/socket_factory_posix.c
- src/core/lib/iomgr/socket_mutator.c
- src/core/lib/iomgr/socket_utils_common_posix.c
- src/core/lib/iomgr/socket_utils_linux.c
- src/core/lib/iomgr/socket_utils_posix.c
- src/core/lib/iomgr/socket_utils_uv.c
- src/core/lib/iomgr/socket_utils_windows.c
- src/core/lib/iomgr/socket_windows.c
- src/core/lib/iomgr/tcp_client_posix.c
- src/core/lib/iomgr/tcp_client_uv.c
- src/core/lib/iomgr/tcp_client_windows.c
- src/core/lib/iomgr/tcp_posix.c
- src/core/lib/iomgr/tcp_server_posix.c
- src/core/lib/iomgr/tcp_server_utils_posix_common.c
- src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c
- src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c
- src/core/lib/iomgr/tcp_server_uv.c
- src/core/lib/iomgr/tcp_server_windows.c
- src/core/lib/iomgr/tcp_uv.c
- src/core/lib/iomgr/tcp_windows.c
- src/core/lib/iomgr/time_averaged_stats.c
- src/core/lib/iomgr/timer_generic.c
- src/core/lib/iomgr/timer_heap.c
- src/core/lib/iomgr/timer_manager.c
- src/core/lib/iomgr/timer_uv.c
- src/core/lib/iomgr/udp_server.c
- src/core/lib/iomgr/unix_sockets_posix.c
- src/core/lib/iomgr/unix_sockets_posix_noop.c
- src/core/lib/iomgr/wakeup_fd_cv.c
- src/core/lib/iomgr/wakeup_fd_eventfd.c
- src/core/lib/iomgr/wakeup_fd_nospecial.c
- src/core/lib/iomgr/wakeup_fd_pipe.c
- src/core/lib/iomgr/wakeup_fd_posix.c
- src/core/lib/json/json.c
- src/core/lib/json/json_reader.c
- src/core/lib/json/json_string.c
- src/core/lib/json/json_writer.c
- src/core/lib/slice/b64.c
- src/core/lib/slice/percent_encoding.c
- src/core/lib/slice/slice.c
- src/core/lib/slice/slice_buffer.c
- src/core/lib/slice/slice_hash_table.c
- src/core/lib/slice/slice_intern.c
- src/core/lib/slice/slice_string_helpers.c
- src/core/lib/surface/alarm.c
- src/core/lib/surface/api_trace.c
- src/core/lib/surface/byte_buffer.c
- src/core/lib/surface/byte_buffer_reader.c
- src/core/lib/surface/call.c
- src/core/lib/surface/call_details.c
- src/core/lib/surface/call_log_batch.c
- src/core/lib/surface/channel.c
- src/core/lib/surface/channel_init.c
- src/core/lib/surface/channel_ping.c
- src/core/lib/surface/channel_stack_type.c
- src/core/lib/surface/completion_queue.c
- src/core/lib/surface/completion_queue_factory.c
- src/core/lib/surface/event_string.c
+ src/core/lib/surface/init.cc
+ src/core/lib/backoff/backoff.cc
+ src/core/lib/channel/channel_args.cc
+ src/core/lib/channel/channel_stack.cc
+ src/core/lib/channel/channel_stack_builder.cc
+ src/core/lib/channel/connected_channel.cc
+ src/core/lib/channel/handshaker.cc
+ 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/message_compress.cc
+ src/core/lib/compression/stream_compression.cc
+ src/core/lib/compression/stream_compression_gzip.cc
+ src/core/lib/compression/stream_compression_identity.cc
+ src/core/lib/debug/stats.cc
+ src/core/lib/debug/stats_data.cc
+ src/core/lib/http/format_request.cc
+ src/core/lib/http/httpcli.cc
+ src/core/lib/http/parser.cc
+ src/core/lib/iomgr/call_combiner.cc
+ src/core/lib/iomgr/closure.cc
+ src/core/lib/iomgr/combiner.cc
+ src/core/lib/iomgr/endpoint.cc
+ src/core/lib/iomgr/endpoint_pair_posix.cc
+ src/core/lib/iomgr/endpoint_pair_uv.cc
+ src/core/lib/iomgr/endpoint_pair_windows.cc
+ src/core/lib/iomgr/error.cc
+ src/core/lib/iomgr/ev_epoll1_linux.cc
+ src/core/lib/iomgr/ev_epollex_linux.cc
+ src/core/lib/iomgr/ev_epollsig_linux.cc
+ src/core/lib/iomgr/ev_poll_posix.cc
+ src/core/lib/iomgr/ev_posix.cc
+ src/core/lib/iomgr/ev_windows.cc
+ src/core/lib/iomgr/exec_ctx.cc
+ src/core/lib/iomgr/executor.cc
+ src/core/lib/iomgr/gethostname_fallback.cc
+ src/core/lib/iomgr/gethostname_host_name_max.cc
+ src/core/lib/iomgr/gethostname_sysconf.cc
+ src/core/lib/iomgr/iocp_windows.cc
+ src/core/lib/iomgr/iomgr.cc
+ src/core/lib/iomgr/iomgr_posix.cc
+ src/core/lib/iomgr/iomgr_uv.cc
+ src/core/lib/iomgr/iomgr_windows.cc
+ src/core/lib/iomgr/is_epollexclusive_available.cc
+ src/core/lib/iomgr/load_file.cc
+ src/core/lib/iomgr/lockfree_event.cc
+ src/core/lib/iomgr/network_status_tracker.cc
+ src/core/lib/iomgr/polling_entity.cc
+ src/core/lib/iomgr/pollset_set_uv.cc
+ src/core/lib/iomgr/pollset_set_windows.cc
+ src/core/lib/iomgr/pollset_uv.cc
+ src/core/lib/iomgr/pollset_windows.cc
+ src/core/lib/iomgr/resolve_address_posix.cc
+ src/core/lib/iomgr/resolve_address_uv.cc
+ src/core/lib/iomgr/resolve_address_windows.cc
+ src/core/lib/iomgr/resource_quota.cc
+ src/core/lib/iomgr/sockaddr_utils.cc
+ src/core/lib/iomgr/socket_factory_posix.cc
+ src/core/lib/iomgr/socket_mutator.cc
+ src/core/lib/iomgr/socket_utils_common_posix.cc
+ src/core/lib/iomgr/socket_utils_linux.cc
+ src/core/lib/iomgr/socket_utils_posix.cc
+ src/core/lib/iomgr/socket_utils_uv.cc
+ src/core/lib/iomgr/socket_utils_windows.cc
+ src/core/lib/iomgr/socket_windows.cc
+ src/core/lib/iomgr/tcp_client_posix.cc
+ src/core/lib/iomgr/tcp_client_uv.cc
+ src/core/lib/iomgr/tcp_client_windows.cc
+ src/core/lib/iomgr/tcp_posix.cc
+ src/core/lib/iomgr/tcp_server_posix.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_common.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
+ src/core/lib/iomgr/tcp_server_uv.cc
+ src/core/lib/iomgr/tcp_server_windows.cc
+ src/core/lib/iomgr/tcp_uv.cc
+ src/core/lib/iomgr/tcp_windows.cc
+ src/core/lib/iomgr/time_averaged_stats.cc
+ src/core/lib/iomgr/timer_generic.cc
+ src/core/lib/iomgr/timer_heap.cc
+ src/core/lib/iomgr/timer_manager.cc
+ src/core/lib/iomgr/timer_uv.cc
+ src/core/lib/iomgr/udp_server.cc
+ src/core/lib/iomgr/unix_sockets_posix.cc
+ src/core/lib/iomgr/unix_sockets_posix_noop.cc
+ src/core/lib/iomgr/wakeup_fd_cv.cc
+ src/core/lib/iomgr/wakeup_fd_eventfd.cc
+ src/core/lib/iomgr/wakeup_fd_nospecial.cc
+ src/core/lib/iomgr/wakeup_fd_pipe.cc
+ src/core/lib/iomgr/wakeup_fd_posix.cc
+ src/core/lib/json/json.cc
+ src/core/lib/json/json_reader.cc
+ src/core/lib/json/json_string.cc
+ src/core/lib/json/json_writer.cc
+ src/core/lib/slice/b64.cc
+ src/core/lib/slice/percent_encoding.cc
+ src/core/lib/slice/slice.cc
+ src/core/lib/slice/slice_buffer.cc
+ src/core/lib/slice/slice_hash_table.cc
+ src/core/lib/slice/slice_intern.cc
+ src/core/lib/slice/slice_string_helpers.cc
+ src/core/lib/surface/alarm.cc
+ src/core/lib/surface/api_trace.cc
+ src/core/lib/surface/byte_buffer.cc
+ src/core/lib/surface/byte_buffer_reader.cc
+ src/core/lib/surface/call.cc
+ src/core/lib/surface/call_details.cc
+ src/core/lib/surface/call_log_batch.cc
+ src/core/lib/surface/channel.cc
+ src/core/lib/surface/channel_init.cc
+ src/core/lib/surface/channel_ping.cc
+ src/core/lib/surface/channel_stack_type.cc
+ src/core/lib/surface/completion_queue.cc
+ src/core/lib/surface/completion_queue_factory.cc
+ src/core/lib/surface/event_string.cc
src/core/lib/surface/lame_client.cc
- src/core/lib/surface/metadata_array.c
- src/core/lib/surface/server.c
- src/core/lib/surface/validate_metadata.c
- src/core/lib/surface/version.c
- src/core/lib/transport/bdp_estimator.c
- src/core/lib/transport/byte_stream.c
- src/core/lib/transport/connectivity_state.c
- src/core/lib/transport/error_utils.c
- src/core/lib/transport/metadata.c
- src/core/lib/transport/metadata_batch.c
- src/core/lib/transport/pid_controller.c
- src/core/lib/transport/service_config.c
- src/core/lib/transport/static_metadata.c
- src/core/lib/transport/status_conversion.c
- src/core/lib/transport/timeout_encoding.c
- src/core/lib/transport/transport.c
- src/core/lib/transport/transport_op_string.c
- src/core/lib/debug/trace.c
- src/core/ext/transport/cronet/client/secure/cronet_channel_create.c
- src/core/ext/transport/cronet/transport/cronet_api_dummy.c
- src/core/ext/transport/cronet/transport/cronet_transport.c
- src/core/ext/transport/chttp2/client/secure/secure_channel_create.c
- src/core/ext/transport/chttp2/transport/bin_decoder.c
- src/core/ext/transport/chttp2/transport/bin_encoder.c
- src/core/ext/transport/chttp2/transport/chttp2_plugin.c
- src/core/ext/transport/chttp2/transport/chttp2_transport.c
- src/core/ext/transport/chttp2/transport/flow_control.c
- src/core/ext/transport/chttp2/transport/frame_data.c
- src/core/ext/transport/chttp2/transport/frame_goaway.c
- src/core/ext/transport/chttp2/transport/frame_ping.c
- src/core/ext/transport/chttp2/transport/frame_rst_stream.c
- src/core/ext/transport/chttp2/transport/frame_settings.c
- src/core/ext/transport/chttp2/transport/frame_window_update.c
- src/core/ext/transport/chttp2/transport/hpack_encoder.c
- src/core/ext/transport/chttp2/transport/hpack_parser.c
- src/core/ext/transport/chttp2/transport/hpack_table.c
- src/core/ext/transport/chttp2/transport/http2_settings.c
- src/core/ext/transport/chttp2/transport/huffsyms.c
- src/core/ext/transport/chttp2/transport/incoming_metadata.c
- src/core/ext/transport/chttp2/transport/parsing.c
- src/core/ext/transport/chttp2/transport/stream_lists.c
- src/core/ext/transport/chttp2/transport/stream_map.c
- src/core/ext/transport/chttp2/transport/varint.c
- src/core/ext/transport/chttp2/transport/writing.c
- src/core/ext/transport/chttp2/alpn/alpn.c
- src/core/ext/filters/http/client/http_client_filter.c
- src/core/ext/filters/http/http_filters_plugin.c
- src/core/ext/filters/http/message_compress/message_compress_filter.c
- src/core/ext/filters/http/server/http_server_filter.c
- src/core/ext/filters/client_channel/channel_connectivity.c
- src/core/ext/filters/client_channel/client_channel.c
- src/core/ext/filters/client_channel/client_channel_factory.c
- src/core/ext/filters/client_channel/client_channel_plugin.c
- src/core/ext/filters/client_channel/connector.c
- src/core/ext/filters/client_channel/http_connect_handshaker.c
- src/core/ext/filters/client_channel/http_proxy.c
- src/core/ext/filters/client_channel/lb_policy.c
- src/core/ext/filters/client_channel/lb_policy_factory.c
- src/core/ext/filters/client_channel/lb_policy_registry.c
- src/core/ext/filters/client_channel/parse_address.c
- src/core/ext/filters/client_channel/proxy_mapper.c
- src/core/ext/filters/client_channel/proxy_mapper_registry.c
- src/core/ext/filters/client_channel/resolver.c
- src/core/ext/filters/client_channel/resolver_factory.c
- src/core/ext/filters/client_channel/resolver_registry.c
- src/core/ext/filters/client_channel/retry_throttle.c
- src/core/ext/filters/client_channel/subchannel.c
- src/core/ext/filters/client_channel/subchannel_index.c
- src/core/ext/filters/client_channel/uri_parser.c
- src/core/ext/filters/deadline/deadline_filter.c
- src/core/lib/http/httpcli_security_connector.c
- src/core/lib/security/context/security_context.c
- src/core/lib/security/credentials/composite/composite_credentials.c
- src/core/lib/security/credentials/credentials.c
- src/core/lib/security/credentials/credentials_metadata.c
- src/core/lib/security/credentials/fake/fake_credentials.c
- src/core/lib/security/credentials/google_default/credentials_generic.c
- src/core/lib/security/credentials/google_default/google_default_credentials.c
- src/core/lib/security/credentials/iam/iam_credentials.c
- src/core/lib/security/credentials/jwt/json_token.c
- src/core/lib/security/credentials/jwt/jwt_credentials.c
- src/core/lib/security/credentials/jwt/jwt_verifier.c
- src/core/lib/security/credentials/oauth2/oauth2_credentials.c
- src/core/lib/security/credentials/plugin/plugin_credentials.c
- src/core/lib/security/credentials/ssl/ssl_credentials.c
- src/core/lib/security/transport/client_auth_filter.c
- src/core/lib/security/transport/lb_targets_info.c
- src/core/lib/security/transport/secure_endpoint.c
- src/core/lib/security/transport/security_connector.c
- src/core/lib/security/transport/security_handshaker.c
- src/core/lib/security/transport/server_auth_filter.c
- src/core/lib/security/transport/tsi_error.c
- src/core/lib/security/util/json_util.c
- src/core/lib/surface/init_secure.c
- src/core/tsi/fake_transport_security.c
- src/core/tsi/gts_transport_security.c
- src/core/tsi/ssl_transport_security.c
- src/core/tsi/transport_security_grpc.c
- src/core/tsi/transport_security.c
- src/core/tsi/transport_security_adapter.c
- src/core/ext/transport/chttp2/client/chttp2_connector.c
- src/core/ext/filters/load_reporting/server_load_reporting_filter.c
- src/core/ext/filters/load_reporting/server_load_reporting_plugin.c
- src/core/plugin_registry/grpc_cronet_plugin_registry.c
+ src/core/lib/surface/metadata_array.cc
+ src/core/lib/surface/server.cc
+ src/core/lib/surface/validate_metadata.cc
+ src/core/lib/surface/version.cc
+ src/core/lib/transport/bdp_estimator.cc
+ src/core/lib/transport/byte_stream.cc
+ src/core/lib/transport/connectivity_state.cc
+ src/core/lib/transport/error_utils.cc
+ src/core/lib/transport/metadata.cc
+ src/core/lib/transport/metadata_batch.cc
+ src/core/lib/transport/pid_controller.cc
+ src/core/lib/transport/service_config.cc
+ src/core/lib/transport/static_metadata.cc
+ src/core/lib/transport/status_conversion.cc
+ src/core/lib/transport/timeout_encoding.cc
+ src/core/lib/transport/transport.cc
+ src/core/lib/transport/transport_op_string.cc
+ src/core/lib/debug/trace.cc
+ src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc
+ src/core/ext/transport/cronet/transport/cronet_api_dummy.cc
+ src/core/ext/transport/cronet/transport/cronet_transport.cc
+ src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc
+ src/core/ext/transport/chttp2/transport/bin_decoder.cc
+ src/core/ext/transport/chttp2/transport/bin_encoder.cc
+ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc
+ src/core/ext/transport/chttp2/transport/chttp2_transport.cc
+ src/core/ext/transport/chttp2/transport/flow_control.cc
+ src/core/ext/transport/chttp2/transport/frame_data.cc
+ src/core/ext/transport/chttp2/transport/frame_goaway.cc
+ src/core/ext/transport/chttp2/transport/frame_ping.cc
+ src/core/ext/transport/chttp2/transport/frame_rst_stream.cc
+ src/core/ext/transport/chttp2/transport/frame_settings.cc
+ src/core/ext/transport/chttp2/transport/frame_window_update.cc
+ src/core/ext/transport/chttp2/transport/hpack_encoder.cc
+ src/core/ext/transport/chttp2/transport/hpack_parser.cc
+ src/core/ext/transport/chttp2/transport/hpack_table.cc
+ src/core/ext/transport/chttp2/transport/http2_settings.cc
+ src/core/ext/transport/chttp2/transport/huffsyms.cc
+ src/core/ext/transport/chttp2/transport/incoming_metadata.cc
+ src/core/ext/transport/chttp2/transport/parsing.cc
+ src/core/ext/transport/chttp2/transport/stream_lists.cc
+ src/core/ext/transport/chttp2/transport/stream_map.cc
+ src/core/ext/transport/chttp2/transport/varint.cc
+ src/core/ext/transport/chttp2/transport/writing.cc
+ src/core/ext/transport/chttp2/alpn/alpn.cc
+ src/core/ext/filters/http/client/http_client_filter.cc
+ src/core/ext/filters/http/http_filters_plugin.cc
+ src/core/ext/filters/http/message_compress/message_compress_filter.cc
+ src/core/ext/filters/http/server/http_server_filter.cc
+ src/core/ext/filters/client_channel/channel_connectivity.cc
+ src/core/ext/filters/client_channel/client_channel.cc
+ src/core/ext/filters/client_channel/client_channel_factory.cc
+ src/core/ext/filters/client_channel/client_channel_plugin.cc
+ src/core/ext/filters/client_channel/connector.cc
+ src/core/ext/filters/client_channel/http_connect_handshaker.cc
+ src/core/ext/filters/client_channel/http_proxy.cc
+ src/core/ext/filters/client_channel/lb_policy.cc
+ src/core/ext/filters/client_channel/lb_policy_factory.cc
+ src/core/ext/filters/client_channel/lb_policy_registry.cc
+ src/core/ext/filters/client_channel/parse_address.cc
+ src/core/ext/filters/client_channel/proxy_mapper.cc
+ src/core/ext/filters/client_channel/proxy_mapper_registry.cc
+ src/core/ext/filters/client_channel/resolver.cc
+ src/core/ext/filters/client_channel/resolver_factory.cc
+ src/core/ext/filters/client_channel/resolver_registry.cc
+ src/core/ext/filters/client_channel/retry_throttle.cc
+ src/core/ext/filters/client_channel/subchannel.cc
+ src/core/ext/filters/client_channel/subchannel_index.cc
+ src/core/ext/filters/client_channel/uri_parser.cc
+ src/core/ext/filters/deadline/deadline_filter.cc
+ src/core/lib/http/httpcli_security_connector.cc
+ src/core/lib/security/context/security_context.cc
+ src/core/lib/security/credentials/composite/composite_credentials.cc
+ src/core/lib/security/credentials/credentials.cc
+ src/core/lib/security/credentials/credentials_metadata.cc
+ src/core/lib/security/credentials/fake/fake_credentials.cc
+ src/core/lib/security/credentials/google_default/credentials_generic.cc
+ src/core/lib/security/credentials/google_default/google_default_credentials.cc
+ src/core/lib/security/credentials/iam/iam_credentials.cc
+ src/core/lib/security/credentials/jwt/json_token.cc
+ src/core/lib/security/credentials/jwt/jwt_credentials.cc
+ src/core/lib/security/credentials/jwt/jwt_verifier.cc
+ src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
+ src/core/lib/security/credentials/plugin/plugin_credentials.cc
+ src/core/lib/security/credentials/ssl/ssl_credentials.cc
+ src/core/lib/security/transport/client_auth_filter.cc
+ src/core/lib/security/transport/lb_targets_info.cc
+ src/core/lib/security/transport/secure_endpoint.cc
+ src/core/lib/security/transport/security_connector.cc
+ src/core/lib/security/transport/security_handshaker.cc
+ src/core/lib/security/transport/server_auth_filter.cc
+ 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/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
+ src/core/tsi/transport_security_adapter.cc
+ src/core/ext/transport/chttp2/client/chttp2_connector.cc
+ src/core/ext/filters/load_reporting/server_load_reporting_filter.cc
+ src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc
+ src/core/plugin_registry/grpc_cronet_plugin_registry.cc
)
if(WIN32 AND MSVC)
@@ -1612,7 +1613,7 @@ add_library(grpc_test_util
test/core/end2end/data/server1_key.c
test/core/end2end/data/test_root_cert.c
test/core/security/oauth2_utils.c
- src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c
+ src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
test/core/end2end/cq_verifier.c
test/core/end2end/fixtures/http_proxy_fixture.c
test/core/end2end/fixtures/proxy.c
@@ -1627,187 +1628,188 @@ add_library(grpc_test_util
test/core/util/port_server_client.c
test/core/util/slice_splitter.c
test/core/util/trickle_endpoint.c
- src/core/lib/channel/channel_args.c
- src/core/lib/channel/channel_stack.c
- src/core/lib/channel/channel_stack_builder.c
- src/core/lib/channel/connected_channel.c
- src/core/lib/channel/handshaker.c
- src/core/lib/channel/handshaker_factory.c
- src/core/lib/channel/handshaker_registry.c
- src/core/lib/compression/compression.c
- src/core/lib/compression/compression_internal.c
- src/core/lib/compression/message_compress.c
- src/core/lib/compression/stream_compression.c
- src/core/lib/compression/stream_compression_gzip.c
- src/core/lib/compression/stream_compression_identity.c
- src/core/lib/debug/stats.c
- src/core/lib/debug/stats_data.c
- src/core/lib/http/format_request.c
- src/core/lib/http/httpcli.c
- src/core/lib/http/parser.c
- src/core/lib/iomgr/call_combiner.c
- src/core/lib/iomgr/closure.c
- src/core/lib/iomgr/combiner.c
- src/core/lib/iomgr/endpoint.c
- src/core/lib/iomgr/endpoint_pair_posix.c
- src/core/lib/iomgr/endpoint_pair_uv.c
- src/core/lib/iomgr/endpoint_pair_windows.c
- src/core/lib/iomgr/error.c
- src/core/lib/iomgr/ev_epoll1_linux.c
- src/core/lib/iomgr/ev_epollex_linux.c
- src/core/lib/iomgr/ev_epollsig_linux.c
- src/core/lib/iomgr/ev_poll_posix.c
- src/core/lib/iomgr/ev_posix.c
- src/core/lib/iomgr/ev_windows.c
- src/core/lib/iomgr/exec_ctx.c
- src/core/lib/iomgr/executor.c
- src/core/lib/iomgr/gethostname_fallback.c
- src/core/lib/iomgr/gethostname_host_name_max.c
- src/core/lib/iomgr/gethostname_sysconf.c
- src/core/lib/iomgr/iocp_windows.c
- src/core/lib/iomgr/iomgr.c
- src/core/lib/iomgr/iomgr_posix.c
- src/core/lib/iomgr/iomgr_uv.c
- src/core/lib/iomgr/iomgr_windows.c
- src/core/lib/iomgr/is_epollexclusive_available.c
- src/core/lib/iomgr/load_file.c
- src/core/lib/iomgr/lockfree_event.c
- src/core/lib/iomgr/network_status_tracker.c
- src/core/lib/iomgr/polling_entity.c
- src/core/lib/iomgr/pollset_set_uv.c
- src/core/lib/iomgr/pollset_set_windows.c
- src/core/lib/iomgr/pollset_uv.c
- src/core/lib/iomgr/pollset_windows.c
- src/core/lib/iomgr/resolve_address_posix.c
- src/core/lib/iomgr/resolve_address_uv.c
- src/core/lib/iomgr/resolve_address_windows.c
- src/core/lib/iomgr/resource_quota.c
- src/core/lib/iomgr/sockaddr_utils.c
- src/core/lib/iomgr/socket_factory_posix.c
- src/core/lib/iomgr/socket_mutator.c
- src/core/lib/iomgr/socket_utils_common_posix.c
- src/core/lib/iomgr/socket_utils_linux.c
- src/core/lib/iomgr/socket_utils_posix.c
- src/core/lib/iomgr/socket_utils_uv.c
- src/core/lib/iomgr/socket_utils_windows.c
- src/core/lib/iomgr/socket_windows.c
- src/core/lib/iomgr/tcp_client_posix.c
- src/core/lib/iomgr/tcp_client_uv.c
- src/core/lib/iomgr/tcp_client_windows.c
- src/core/lib/iomgr/tcp_posix.c
- src/core/lib/iomgr/tcp_server_posix.c
- src/core/lib/iomgr/tcp_server_utils_posix_common.c
- src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c
- src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c
- src/core/lib/iomgr/tcp_server_uv.c
- src/core/lib/iomgr/tcp_server_windows.c
- src/core/lib/iomgr/tcp_uv.c
- src/core/lib/iomgr/tcp_windows.c
- src/core/lib/iomgr/time_averaged_stats.c
- src/core/lib/iomgr/timer_generic.c
- src/core/lib/iomgr/timer_heap.c
- src/core/lib/iomgr/timer_manager.c
- src/core/lib/iomgr/timer_uv.c
- src/core/lib/iomgr/udp_server.c
- src/core/lib/iomgr/unix_sockets_posix.c
- src/core/lib/iomgr/unix_sockets_posix_noop.c
- src/core/lib/iomgr/wakeup_fd_cv.c
- src/core/lib/iomgr/wakeup_fd_eventfd.c
- src/core/lib/iomgr/wakeup_fd_nospecial.c
- src/core/lib/iomgr/wakeup_fd_pipe.c
- src/core/lib/iomgr/wakeup_fd_posix.c
- src/core/lib/json/json.c
- src/core/lib/json/json_reader.c
- src/core/lib/json/json_string.c
- src/core/lib/json/json_writer.c
- src/core/lib/slice/b64.c
- src/core/lib/slice/percent_encoding.c
- src/core/lib/slice/slice.c
- src/core/lib/slice/slice_buffer.c
- src/core/lib/slice/slice_hash_table.c
- src/core/lib/slice/slice_intern.c
- src/core/lib/slice/slice_string_helpers.c
- src/core/lib/surface/alarm.c
- src/core/lib/surface/api_trace.c
- src/core/lib/surface/byte_buffer.c
- src/core/lib/surface/byte_buffer_reader.c
- src/core/lib/surface/call.c
- src/core/lib/surface/call_details.c
- src/core/lib/surface/call_log_batch.c
- src/core/lib/surface/channel.c
- src/core/lib/surface/channel_init.c
- src/core/lib/surface/channel_ping.c
- src/core/lib/surface/channel_stack_type.c
- src/core/lib/surface/completion_queue.c
- src/core/lib/surface/completion_queue_factory.c
- src/core/lib/surface/event_string.c
+ src/core/lib/backoff/backoff.cc
+ src/core/lib/channel/channel_args.cc
+ src/core/lib/channel/channel_stack.cc
+ src/core/lib/channel/channel_stack_builder.cc
+ src/core/lib/channel/connected_channel.cc
+ src/core/lib/channel/handshaker.cc
+ 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/message_compress.cc
+ src/core/lib/compression/stream_compression.cc
+ src/core/lib/compression/stream_compression_gzip.cc
+ src/core/lib/compression/stream_compression_identity.cc
+ src/core/lib/debug/stats.cc
+ src/core/lib/debug/stats_data.cc
+ src/core/lib/http/format_request.cc
+ src/core/lib/http/httpcli.cc
+ src/core/lib/http/parser.cc
+ src/core/lib/iomgr/call_combiner.cc
+ src/core/lib/iomgr/closure.cc
+ src/core/lib/iomgr/combiner.cc
+ src/core/lib/iomgr/endpoint.cc
+ src/core/lib/iomgr/endpoint_pair_posix.cc
+ src/core/lib/iomgr/endpoint_pair_uv.cc
+ src/core/lib/iomgr/endpoint_pair_windows.cc
+ src/core/lib/iomgr/error.cc
+ src/core/lib/iomgr/ev_epoll1_linux.cc
+ src/core/lib/iomgr/ev_epollex_linux.cc
+ src/core/lib/iomgr/ev_epollsig_linux.cc
+ src/core/lib/iomgr/ev_poll_posix.cc
+ src/core/lib/iomgr/ev_posix.cc
+ src/core/lib/iomgr/ev_windows.cc
+ src/core/lib/iomgr/exec_ctx.cc
+ src/core/lib/iomgr/executor.cc
+ src/core/lib/iomgr/gethostname_fallback.cc
+ src/core/lib/iomgr/gethostname_host_name_max.cc
+ src/core/lib/iomgr/gethostname_sysconf.cc
+ src/core/lib/iomgr/iocp_windows.cc
+ src/core/lib/iomgr/iomgr.cc
+ src/core/lib/iomgr/iomgr_posix.cc
+ src/core/lib/iomgr/iomgr_uv.cc
+ src/core/lib/iomgr/iomgr_windows.cc
+ src/core/lib/iomgr/is_epollexclusive_available.cc
+ src/core/lib/iomgr/load_file.cc
+ src/core/lib/iomgr/lockfree_event.cc
+ src/core/lib/iomgr/network_status_tracker.cc
+ src/core/lib/iomgr/polling_entity.cc
+ src/core/lib/iomgr/pollset_set_uv.cc
+ src/core/lib/iomgr/pollset_set_windows.cc
+ src/core/lib/iomgr/pollset_uv.cc
+ src/core/lib/iomgr/pollset_windows.cc
+ src/core/lib/iomgr/resolve_address_posix.cc
+ src/core/lib/iomgr/resolve_address_uv.cc
+ src/core/lib/iomgr/resolve_address_windows.cc
+ src/core/lib/iomgr/resource_quota.cc
+ src/core/lib/iomgr/sockaddr_utils.cc
+ src/core/lib/iomgr/socket_factory_posix.cc
+ src/core/lib/iomgr/socket_mutator.cc
+ src/core/lib/iomgr/socket_utils_common_posix.cc
+ src/core/lib/iomgr/socket_utils_linux.cc
+ src/core/lib/iomgr/socket_utils_posix.cc
+ src/core/lib/iomgr/socket_utils_uv.cc
+ src/core/lib/iomgr/socket_utils_windows.cc
+ src/core/lib/iomgr/socket_windows.cc
+ src/core/lib/iomgr/tcp_client_posix.cc
+ src/core/lib/iomgr/tcp_client_uv.cc
+ src/core/lib/iomgr/tcp_client_windows.cc
+ src/core/lib/iomgr/tcp_posix.cc
+ src/core/lib/iomgr/tcp_server_posix.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_common.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
+ src/core/lib/iomgr/tcp_server_uv.cc
+ src/core/lib/iomgr/tcp_server_windows.cc
+ src/core/lib/iomgr/tcp_uv.cc
+ src/core/lib/iomgr/tcp_windows.cc
+ src/core/lib/iomgr/time_averaged_stats.cc
+ src/core/lib/iomgr/timer_generic.cc
+ src/core/lib/iomgr/timer_heap.cc
+ src/core/lib/iomgr/timer_manager.cc
+ src/core/lib/iomgr/timer_uv.cc
+ src/core/lib/iomgr/udp_server.cc
+ src/core/lib/iomgr/unix_sockets_posix.cc
+ src/core/lib/iomgr/unix_sockets_posix_noop.cc
+ src/core/lib/iomgr/wakeup_fd_cv.cc
+ src/core/lib/iomgr/wakeup_fd_eventfd.cc
+ src/core/lib/iomgr/wakeup_fd_nospecial.cc
+ src/core/lib/iomgr/wakeup_fd_pipe.cc
+ src/core/lib/iomgr/wakeup_fd_posix.cc
+ src/core/lib/json/json.cc
+ src/core/lib/json/json_reader.cc
+ src/core/lib/json/json_string.cc
+ src/core/lib/json/json_writer.cc
+ src/core/lib/slice/b64.cc
+ src/core/lib/slice/percent_encoding.cc
+ src/core/lib/slice/slice.cc
+ src/core/lib/slice/slice_buffer.cc
+ src/core/lib/slice/slice_hash_table.cc
+ src/core/lib/slice/slice_intern.cc
+ src/core/lib/slice/slice_string_helpers.cc
+ src/core/lib/surface/alarm.cc
+ src/core/lib/surface/api_trace.cc
+ src/core/lib/surface/byte_buffer.cc
+ src/core/lib/surface/byte_buffer_reader.cc
+ src/core/lib/surface/call.cc
+ src/core/lib/surface/call_details.cc
+ src/core/lib/surface/call_log_batch.cc
+ src/core/lib/surface/channel.cc
+ src/core/lib/surface/channel_init.cc
+ src/core/lib/surface/channel_ping.cc
+ src/core/lib/surface/channel_stack_type.cc
+ src/core/lib/surface/completion_queue.cc
+ src/core/lib/surface/completion_queue_factory.cc
+ src/core/lib/surface/event_string.cc
src/core/lib/surface/lame_client.cc
- src/core/lib/surface/metadata_array.c
- src/core/lib/surface/server.c
- src/core/lib/surface/validate_metadata.c
- src/core/lib/surface/version.c
- src/core/lib/transport/bdp_estimator.c
- src/core/lib/transport/byte_stream.c
- src/core/lib/transport/connectivity_state.c
- src/core/lib/transport/error_utils.c
- src/core/lib/transport/metadata.c
- src/core/lib/transport/metadata_batch.c
- src/core/lib/transport/pid_controller.c
- src/core/lib/transport/service_config.c
- src/core/lib/transport/static_metadata.c
- src/core/lib/transport/status_conversion.c
- src/core/lib/transport/timeout_encoding.c
- src/core/lib/transport/transport.c
- src/core/lib/transport/transport_op_string.c
- src/core/lib/debug/trace.c
- src/core/ext/filters/client_channel/channel_connectivity.c
- src/core/ext/filters/client_channel/client_channel.c
- src/core/ext/filters/client_channel/client_channel_factory.c
- src/core/ext/filters/client_channel/client_channel_plugin.c
- src/core/ext/filters/client_channel/connector.c
- src/core/ext/filters/client_channel/http_connect_handshaker.c
- src/core/ext/filters/client_channel/http_proxy.c
- src/core/ext/filters/client_channel/lb_policy.c
- src/core/ext/filters/client_channel/lb_policy_factory.c
- src/core/ext/filters/client_channel/lb_policy_registry.c
- src/core/ext/filters/client_channel/parse_address.c
- src/core/ext/filters/client_channel/proxy_mapper.c
- src/core/ext/filters/client_channel/proxy_mapper_registry.c
- src/core/ext/filters/client_channel/resolver.c
- src/core/ext/filters/client_channel/resolver_factory.c
- src/core/ext/filters/client_channel/resolver_registry.c
- src/core/ext/filters/client_channel/retry_throttle.c
- src/core/ext/filters/client_channel/subchannel.c
- src/core/ext/filters/client_channel/subchannel_index.c
- src/core/ext/filters/client_channel/uri_parser.c
- src/core/ext/filters/deadline/deadline_filter.c
- src/core/ext/transport/chttp2/transport/bin_decoder.c
- src/core/ext/transport/chttp2/transport/bin_encoder.c
- src/core/ext/transport/chttp2/transport/chttp2_plugin.c
- src/core/ext/transport/chttp2/transport/chttp2_transport.c
- src/core/ext/transport/chttp2/transport/flow_control.c
- src/core/ext/transport/chttp2/transport/frame_data.c
- src/core/ext/transport/chttp2/transport/frame_goaway.c
- src/core/ext/transport/chttp2/transport/frame_ping.c
- src/core/ext/transport/chttp2/transport/frame_rst_stream.c
- src/core/ext/transport/chttp2/transport/frame_settings.c
- src/core/ext/transport/chttp2/transport/frame_window_update.c
- src/core/ext/transport/chttp2/transport/hpack_encoder.c
- src/core/ext/transport/chttp2/transport/hpack_parser.c
- src/core/ext/transport/chttp2/transport/hpack_table.c
- src/core/ext/transport/chttp2/transport/http2_settings.c
- src/core/ext/transport/chttp2/transport/huffsyms.c
- src/core/ext/transport/chttp2/transport/incoming_metadata.c
- src/core/ext/transport/chttp2/transport/parsing.c
- src/core/ext/transport/chttp2/transport/stream_lists.c
- src/core/ext/transport/chttp2/transport/stream_map.c
- src/core/ext/transport/chttp2/transport/varint.c
- src/core/ext/transport/chttp2/transport/writing.c
- src/core/ext/transport/chttp2/alpn/alpn.c
- src/core/ext/filters/http/client/http_client_filter.c
- src/core/ext/filters/http/http_filters_plugin.c
- src/core/ext/filters/http/message_compress/message_compress_filter.c
- src/core/ext/filters/http/server/http_server_filter.c
+ src/core/lib/surface/metadata_array.cc
+ src/core/lib/surface/server.cc
+ src/core/lib/surface/validate_metadata.cc
+ src/core/lib/surface/version.cc
+ src/core/lib/transport/bdp_estimator.cc
+ src/core/lib/transport/byte_stream.cc
+ src/core/lib/transport/connectivity_state.cc
+ src/core/lib/transport/error_utils.cc
+ src/core/lib/transport/metadata.cc
+ src/core/lib/transport/metadata_batch.cc
+ src/core/lib/transport/pid_controller.cc
+ src/core/lib/transport/service_config.cc
+ src/core/lib/transport/static_metadata.cc
+ src/core/lib/transport/status_conversion.cc
+ src/core/lib/transport/timeout_encoding.cc
+ src/core/lib/transport/transport.cc
+ src/core/lib/transport/transport_op_string.cc
+ src/core/lib/debug/trace.cc
+ src/core/ext/filters/client_channel/channel_connectivity.cc
+ src/core/ext/filters/client_channel/client_channel.cc
+ src/core/ext/filters/client_channel/client_channel_factory.cc
+ src/core/ext/filters/client_channel/client_channel_plugin.cc
+ src/core/ext/filters/client_channel/connector.cc
+ src/core/ext/filters/client_channel/http_connect_handshaker.cc
+ src/core/ext/filters/client_channel/http_proxy.cc
+ src/core/ext/filters/client_channel/lb_policy.cc
+ src/core/ext/filters/client_channel/lb_policy_factory.cc
+ src/core/ext/filters/client_channel/lb_policy_registry.cc
+ src/core/ext/filters/client_channel/parse_address.cc
+ src/core/ext/filters/client_channel/proxy_mapper.cc
+ src/core/ext/filters/client_channel/proxy_mapper_registry.cc
+ src/core/ext/filters/client_channel/resolver.cc
+ src/core/ext/filters/client_channel/resolver_factory.cc
+ src/core/ext/filters/client_channel/resolver_registry.cc
+ src/core/ext/filters/client_channel/retry_throttle.cc
+ src/core/ext/filters/client_channel/subchannel.cc
+ src/core/ext/filters/client_channel/subchannel_index.cc
+ src/core/ext/filters/client_channel/uri_parser.cc
+ src/core/ext/filters/deadline/deadline_filter.cc
+ src/core/ext/transport/chttp2/transport/bin_decoder.cc
+ src/core/ext/transport/chttp2/transport/bin_encoder.cc
+ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc
+ src/core/ext/transport/chttp2/transport/chttp2_transport.cc
+ src/core/ext/transport/chttp2/transport/flow_control.cc
+ src/core/ext/transport/chttp2/transport/frame_data.cc
+ src/core/ext/transport/chttp2/transport/frame_goaway.cc
+ src/core/ext/transport/chttp2/transport/frame_ping.cc
+ src/core/ext/transport/chttp2/transport/frame_rst_stream.cc
+ src/core/ext/transport/chttp2/transport/frame_settings.cc
+ src/core/ext/transport/chttp2/transport/frame_window_update.cc
+ src/core/ext/transport/chttp2/transport/hpack_encoder.cc
+ src/core/ext/transport/chttp2/transport/hpack_parser.cc
+ src/core/ext/transport/chttp2/transport/hpack_table.cc
+ src/core/ext/transport/chttp2/transport/http2_settings.cc
+ src/core/ext/transport/chttp2/transport/huffsyms.cc
+ src/core/ext/transport/chttp2/transport/incoming_metadata.cc
+ src/core/ext/transport/chttp2/transport/parsing.cc
+ src/core/ext/transport/chttp2/transport/stream_lists.cc
+ src/core/ext/transport/chttp2/transport/stream_map.cc
+ src/core/ext/transport/chttp2/transport/varint.cc
+ src/core/ext/transport/chttp2/transport/writing.cc
+ src/core/ext/transport/chttp2/alpn/alpn.cc
+ src/core/ext/filters/http/client/http_client_filter.cc
+ src/core/ext/filters/http/http_filters_plugin.cc
+ src/core/ext/filters/http/message_compress/message_compress_filter.cc
+ src/core/ext/filters/http/server/http_server_filter.cc
)
if(WIN32 AND MSVC)
@@ -1876,7 +1878,7 @@ endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
add_library(grpc_test_util_unsecure
- src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c
+ src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
test/core/end2end/cq_verifier.c
test/core/end2end/fixtures/http_proxy_fixture.c
test/core/end2end/fixtures/proxy.c
@@ -1891,187 +1893,188 @@ add_library(grpc_test_util_unsecure
test/core/util/port_server_client.c
test/core/util/slice_splitter.c
test/core/util/trickle_endpoint.c
- src/core/lib/channel/channel_args.c
- src/core/lib/channel/channel_stack.c
- src/core/lib/channel/channel_stack_builder.c
- src/core/lib/channel/connected_channel.c
- src/core/lib/channel/handshaker.c
- src/core/lib/channel/handshaker_factory.c
- src/core/lib/channel/handshaker_registry.c
- src/core/lib/compression/compression.c
- src/core/lib/compression/compression_internal.c
- src/core/lib/compression/message_compress.c
- src/core/lib/compression/stream_compression.c
- src/core/lib/compression/stream_compression_gzip.c
- src/core/lib/compression/stream_compression_identity.c
- src/core/lib/debug/stats.c
- src/core/lib/debug/stats_data.c
- src/core/lib/http/format_request.c
- src/core/lib/http/httpcli.c
- src/core/lib/http/parser.c
- src/core/lib/iomgr/call_combiner.c
- src/core/lib/iomgr/closure.c
- src/core/lib/iomgr/combiner.c
- src/core/lib/iomgr/endpoint.c
- src/core/lib/iomgr/endpoint_pair_posix.c
- src/core/lib/iomgr/endpoint_pair_uv.c
- src/core/lib/iomgr/endpoint_pair_windows.c
- src/core/lib/iomgr/error.c
- src/core/lib/iomgr/ev_epoll1_linux.c
- src/core/lib/iomgr/ev_epollex_linux.c
- src/core/lib/iomgr/ev_epollsig_linux.c
- src/core/lib/iomgr/ev_poll_posix.c
- src/core/lib/iomgr/ev_posix.c
- src/core/lib/iomgr/ev_windows.c
- src/core/lib/iomgr/exec_ctx.c
- src/core/lib/iomgr/executor.c
- src/core/lib/iomgr/gethostname_fallback.c
- src/core/lib/iomgr/gethostname_host_name_max.c
- src/core/lib/iomgr/gethostname_sysconf.c
- src/core/lib/iomgr/iocp_windows.c
- src/core/lib/iomgr/iomgr.c
- src/core/lib/iomgr/iomgr_posix.c
- src/core/lib/iomgr/iomgr_uv.c
- src/core/lib/iomgr/iomgr_windows.c
- src/core/lib/iomgr/is_epollexclusive_available.c
- src/core/lib/iomgr/load_file.c
- src/core/lib/iomgr/lockfree_event.c
- src/core/lib/iomgr/network_status_tracker.c
- src/core/lib/iomgr/polling_entity.c
- src/core/lib/iomgr/pollset_set_uv.c
- src/core/lib/iomgr/pollset_set_windows.c
- src/core/lib/iomgr/pollset_uv.c
- src/core/lib/iomgr/pollset_windows.c
- src/core/lib/iomgr/resolve_address_posix.c
- src/core/lib/iomgr/resolve_address_uv.c
- src/core/lib/iomgr/resolve_address_windows.c
- src/core/lib/iomgr/resource_quota.c
- src/core/lib/iomgr/sockaddr_utils.c
- src/core/lib/iomgr/socket_factory_posix.c
- src/core/lib/iomgr/socket_mutator.c
- src/core/lib/iomgr/socket_utils_common_posix.c
- src/core/lib/iomgr/socket_utils_linux.c
- src/core/lib/iomgr/socket_utils_posix.c
- src/core/lib/iomgr/socket_utils_uv.c
- src/core/lib/iomgr/socket_utils_windows.c
- src/core/lib/iomgr/socket_windows.c
- src/core/lib/iomgr/tcp_client_posix.c
- src/core/lib/iomgr/tcp_client_uv.c
- src/core/lib/iomgr/tcp_client_windows.c
- src/core/lib/iomgr/tcp_posix.c
- src/core/lib/iomgr/tcp_server_posix.c
- src/core/lib/iomgr/tcp_server_utils_posix_common.c
- src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c
- src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c
- src/core/lib/iomgr/tcp_server_uv.c
- src/core/lib/iomgr/tcp_server_windows.c
- src/core/lib/iomgr/tcp_uv.c
- src/core/lib/iomgr/tcp_windows.c
- src/core/lib/iomgr/time_averaged_stats.c
- src/core/lib/iomgr/timer_generic.c
- src/core/lib/iomgr/timer_heap.c
- src/core/lib/iomgr/timer_manager.c
- src/core/lib/iomgr/timer_uv.c
- src/core/lib/iomgr/udp_server.c
- src/core/lib/iomgr/unix_sockets_posix.c
- src/core/lib/iomgr/unix_sockets_posix_noop.c
- src/core/lib/iomgr/wakeup_fd_cv.c
- src/core/lib/iomgr/wakeup_fd_eventfd.c
- src/core/lib/iomgr/wakeup_fd_nospecial.c
- src/core/lib/iomgr/wakeup_fd_pipe.c
- src/core/lib/iomgr/wakeup_fd_posix.c
- src/core/lib/json/json.c
- src/core/lib/json/json_reader.c
- src/core/lib/json/json_string.c
- src/core/lib/json/json_writer.c
- src/core/lib/slice/b64.c
- src/core/lib/slice/percent_encoding.c
- src/core/lib/slice/slice.c
- src/core/lib/slice/slice_buffer.c
- src/core/lib/slice/slice_hash_table.c
- src/core/lib/slice/slice_intern.c
- src/core/lib/slice/slice_string_helpers.c
- src/core/lib/surface/alarm.c
- src/core/lib/surface/api_trace.c
- src/core/lib/surface/byte_buffer.c
- src/core/lib/surface/byte_buffer_reader.c
- src/core/lib/surface/call.c
- src/core/lib/surface/call_details.c
- src/core/lib/surface/call_log_batch.c
- src/core/lib/surface/channel.c
- src/core/lib/surface/channel_init.c
- src/core/lib/surface/channel_ping.c
- src/core/lib/surface/channel_stack_type.c
- src/core/lib/surface/completion_queue.c
- src/core/lib/surface/completion_queue_factory.c
- src/core/lib/surface/event_string.c
+ src/core/lib/backoff/backoff.cc
+ src/core/lib/channel/channel_args.cc
+ src/core/lib/channel/channel_stack.cc
+ src/core/lib/channel/channel_stack_builder.cc
+ src/core/lib/channel/connected_channel.cc
+ src/core/lib/channel/handshaker.cc
+ 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/message_compress.cc
+ src/core/lib/compression/stream_compression.cc
+ src/core/lib/compression/stream_compression_gzip.cc
+ src/core/lib/compression/stream_compression_identity.cc
+ src/core/lib/debug/stats.cc
+ src/core/lib/debug/stats_data.cc
+ src/core/lib/http/format_request.cc
+ src/core/lib/http/httpcli.cc
+ src/core/lib/http/parser.cc
+ src/core/lib/iomgr/call_combiner.cc
+ src/core/lib/iomgr/closure.cc
+ src/core/lib/iomgr/combiner.cc
+ src/core/lib/iomgr/endpoint.cc
+ src/core/lib/iomgr/endpoint_pair_posix.cc
+ src/core/lib/iomgr/endpoint_pair_uv.cc
+ src/core/lib/iomgr/endpoint_pair_windows.cc
+ src/core/lib/iomgr/error.cc
+ src/core/lib/iomgr/ev_epoll1_linux.cc
+ src/core/lib/iomgr/ev_epollex_linux.cc
+ src/core/lib/iomgr/ev_epollsig_linux.cc
+ src/core/lib/iomgr/ev_poll_posix.cc
+ src/core/lib/iomgr/ev_posix.cc
+ src/core/lib/iomgr/ev_windows.cc
+ src/core/lib/iomgr/exec_ctx.cc
+ src/core/lib/iomgr/executor.cc
+ src/core/lib/iomgr/gethostname_fallback.cc
+ src/core/lib/iomgr/gethostname_host_name_max.cc
+ src/core/lib/iomgr/gethostname_sysconf.cc
+ src/core/lib/iomgr/iocp_windows.cc
+ src/core/lib/iomgr/iomgr.cc
+ src/core/lib/iomgr/iomgr_posix.cc
+ src/core/lib/iomgr/iomgr_uv.cc
+ src/core/lib/iomgr/iomgr_windows.cc
+ src/core/lib/iomgr/is_epollexclusive_available.cc
+ src/core/lib/iomgr/load_file.cc
+ src/core/lib/iomgr/lockfree_event.cc
+ src/core/lib/iomgr/network_status_tracker.cc
+ src/core/lib/iomgr/polling_entity.cc
+ src/core/lib/iomgr/pollset_set_uv.cc
+ src/core/lib/iomgr/pollset_set_windows.cc
+ src/core/lib/iomgr/pollset_uv.cc
+ src/core/lib/iomgr/pollset_windows.cc
+ src/core/lib/iomgr/resolve_address_posix.cc
+ src/core/lib/iomgr/resolve_address_uv.cc
+ src/core/lib/iomgr/resolve_address_windows.cc
+ src/core/lib/iomgr/resource_quota.cc
+ src/core/lib/iomgr/sockaddr_utils.cc
+ src/core/lib/iomgr/socket_factory_posix.cc
+ src/core/lib/iomgr/socket_mutator.cc
+ src/core/lib/iomgr/socket_utils_common_posix.cc
+ src/core/lib/iomgr/socket_utils_linux.cc
+ src/core/lib/iomgr/socket_utils_posix.cc
+ src/core/lib/iomgr/socket_utils_uv.cc
+ src/core/lib/iomgr/socket_utils_windows.cc
+ src/core/lib/iomgr/socket_windows.cc
+ src/core/lib/iomgr/tcp_client_posix.cc
+ src/core/lib/iomgr/tcp_client_uv.cc
+ src/core/lib/iomgr/tcp_client_windows.cc
+ src/core/lib/iomgr/tcp_posix.cc
+ src/core/lib/iomgr/tcp_server_posix.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_common.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
+ src/core/lib/iomgr/tcp_server_uv.cc
+ src/core/lib/iomgr/tcp_server_windows.cc
+ src/core/lib/iomgr/tcp_uv.cc
+ src/core/lib/iomgr/tcp_windows.cc
+ src/core/lib/iomgr/time_averaged_stats.cc
+ src/core/lib/iomgr/timer_generic.cc
+ src/core/lib/iomgr/timer_heap.cc
+ src/core/lib/iomgr/timer_manager.cc
+ src/core/lib/iomgr/timer_uv.cc
+ src/core/lib/iomgr/udp_server.cc
+ src/core/lib/iomgr/unix_sockets_posix.cc
+ src/core/lib/iomgr/unix_sockets_posix_noop.cc
+ src/core/lib/iomgr/wakeup_fd_cv.cc
+ src/core/lib/iomgr/wakeup_fd_eventfd.cc
+ src/core/lib/iomgr/wakeup_fd_nospecial.cc
+ src/core/lib/iomgr/wakeup_fd_pipe.cc
+ src/core/lib/iomgr/wakeup_fd_posix.cc
+ src/core/lib/json/json.cc
+ src/core/lib/json/json_reader.cc
+ src/core/lib/json/json_string.cc
+ src/core/lib/json/json_writer.cc
+ src/core/lib/slice/b64.cc
+ src/core/lib/slice/percent_encoding.cc
+ src/core/lib/slice/slice.cc
+ src/core/lib/slice/slice_buffer.cc
+ src/core/lib/slice/slice_hash_table.cc
+ src/core/lib/slice/slice_intern.cc
+ src/core/lib/slice/slice_string_helpers.cc
+ src/core/lib/surface/alarm.cc
+ src/core/lib/surface/api_trace.cc
+ src/core/lib/surface/byte_buffer.cc
+ src/core/lib/surface/byte_buffer_reader.cc
+ src/core/lib/surface/call.cc
+ src/core/lib/surface/call_details.cc
+ src/core/lib/surface/call_log_batch.cc
+ src/core/lib/surface/channel.cc
+ src/core/lib/surface/channel_init.cc
+ src/core/lib/surface/channel_ping.cc
+ src/core/lib/surface/channel_stack_type.cc
+ src/core/lib/surface/completion_queue.cc
+ src/core/lib/surface/completion_queue_factory.cc
+ src/core/lib/surface/event_string.cc
src/core/lib/surface/lame_client.cc
- src/core/lib/surface/metadata_array.c
- src/core/lib/surface/server.c
- src/core/lib/surface/validate_metadata.c
- src/core/lib/surface/version.c
- src/core/lib/transport/bdp_estimator.c
- src/core/lib/transport/byte_stream.c
- src/core/lib/transport/connectivity_state.c
- src/core/lib/transport/error_utils.c
- src/core/lib/transport/metadata.c
- src/core/lib/transport/metadata_batch.c
- src/core/lib/transport/pid_controller.c
- src/core/lib/transport/service_config.c
- src/core/lib/transport/static_metadata.c
- src/core/lib/transport/status_conversion.c
- src/core/lib/transport/timeout_encoding.c
- src/core/lib/transport/transport.c
- src/core/lib/transport/transport_op_string.c
- src/core/lib/debug/trace.c
- src/core/ext/filters/client_channel/channel_connectivity.c
- src/core/ext/filters/client_channel/client_channel.c
- src/core/ext/filters/client_channel/client_channel_factory.c
- src/core/ext/filters/client_channel/client_channel_plugin.c
- src/core/ext/filters/client_channel/connector.c
- src/core/ext/filters/client_channel/http_connect_handshaker.c
- src/core/ext/filters/client_channel/http_proxy.c
- src/core/ext/filters/client_channel/lb_policy.c
- src/core/ext/filters/client_channel/lb_policy_factory.c
- src/core/ext/filters/client_channel/lb_policy_registry.c
- src/core/ext/filters/client_channel/parse_address.c
- src/core/ext/filters/client_channel/proxy_mapper.c
- src/core/ext/filters/client_channel/proxy_mapper_registry.c
- src/core/ext/filters/client_channel/resolver.c
- src/core/ext/filters/client_channel/resolver_factory.c
- src/core/ext/filters/client_channel/resolver_registry.c
- src/core/ext/filters/client_channel/retry_throttle.c
- src/core/ext/filters/client_channel/subchannel.c
- src/core/ext/filters/client_channel/subchannel_index.c
- src/core/ext/filters/client_channel/uri_parser.c
- src/core/ext/filters/deadline/deadline_filter.c
- src/core/ext/transport/chttp2/transport/bin_decoder.c
- src/core/ext/transport/chttp2/transport/bin_encoder.c
- src/core/ext/transport/chttp2/transport/chttp2_plugin.c
- src/core/ext/transport/chttp2/transport/chttp2_transport.c
- src/core/ext/transport/chttp2/transport/flow_control.c
- src/core/ext/transport/chttp2/transport/frame_data.c
- src/core/ext/transport/chttp2/transport/frame_goaway.c
- src/core/ext/transport/chttp2/transport/frame_ping.c
- src/core/ext/transport/chttp2/transport/frame_rst_stream.c
- src/core/ext/transport/chttp2/transport/frame_settings.c
- src/core/ext/transport/chttp2/transport/frame_window_update.c
- src/core/ext/transport/chttp2/transport/hpack_encoder.c
- src/core/ext/transport/chttp2/transport/hpack_parser.c
- src/core/ext/transport/chttp2/transport/hpack_table.c
- src/core/ext/transport/chttp2/transport/http2_settings.c
- src/core/ext/transport/chttp2/transport/huffsyms.c
- src/core/ext/transport/chttp2/transport/incoming_metadata.c
- src/core/ext/transport/chttp2/transport/parsing.c
- src/core/ext/transport/chttp2/transport/stream_lists.c
- src/core/ext/transport/chttp2/transport/stream_map.c
- src/core/ext/transport/chttp2/transport/varint.c
- src/core/ext/transport/chttp2/transport/writing.c
- src/core/ext/transport/chttp2/alpn/alpn.c
- src/core/ext/filters/http/client/http_client_filter.c
- src/core/ext/filters/http/http_filters_plugin.c
- src/core/ext/filters/http/message_compress/message_compress_filter.c
- src/core/ext/filters/http/server/http_server_filter.c
+ src/core/lib/surface/metadata_array.cc
+ src/core/lib/surface/server.cc
+ src/core/lib/surface/validate_metadata.cc
+ src/core/lib/surface/version.cc
+ src/core/lib/transport/bdp_estimator.cc
+ src/core/lib/transport/byte_stream.cc
+ src/core/lib/transport/connectivity_state.cc
+ src/core/lib/transport/error_utils.cc
+ src/core/lib/transport/metadata.cc
+ src/core/lib/transport/metadata_batch.cc
+ src/core/lib/transport/pid_controller.cc
+ src/core/lib/transport/service_config.cc
+ src/core/lib/transport/static_metadata.cc
+ src/core/lib/transport/status_conversion.cc
+ src/core/lib/transport/timeout_encoding.cc
+ src/core/lib/transport/transport.cc
+ src/core/lib/transport/transport_op_string.cc
+ src/core/lib/debug/trace.cc
+ src/core/ext/filters/client_channel/channel_connectivity.cc
+ src/core/ext/filters/client_channel/client_channel.cc
+ src/core/ext/filters/client_channel/client_channel_factory.cc
+ src/core/ext/filters/client_channel/client_channel_plugin.cc
+ src/core/ext/filters/client_channel/connector.cc
+ src/core/ext/filters/client_channel/http_connect_handshaker.cc
+ src/core/ext/filters/client_channel/http_proxy.cc
+ src/core/ext/filters/client_channel/lb_policy.cc
+ src/core/ext/filters/client_channel/lb_policy_factory.cc
+ src/core/ext/filters/client_channel/lb_policy_registry.cc
+ src/core/ext/filters/client_channel/parse_address.cc
+ src/core/ext/filters/client_channel/proxy_mapper.cc
+ src/core/ext/filters/client_channel/proxy_mapper_registry.cc
+ src/core/ext/filters/client_channel/resolver.cc
+ src/core/ext/filters/client_channel/resolver_factory.cc
+ src/core/ext/filters/client_channel/resolver_registry.cc
+ src/core/ext/filters/client_channel/retry_throttle.cc
+ src/core/ext/filters/client_channel/subchannel.cc
+ src/core/ext/filters/client_channel/subchannel_index.cc
+ src/core/ext/filters/client_channel/uri_parser.cc
+ src/core/ext/filters/deadline/deadline_filter.cc
+ src/core/ext/transport/chttp2/transport/bin_decoder.cc
+ src/core/ext/transport/chttp2/transport/bin_encoder.cc
+ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc
+ src/core/ext/transport/chttp2/transport/chttp2_transport.cc
+ src/core/ext/transport/chttp2/transport/flow_control.cc
+ src/core/ext/transport/chttp2/transport/frame_data.cc
+ src/core/ext/transport/chttp2/transport/frame_goaway.cc
+ src/core/ext/transport/chttp2/transport/frame_ping.cc
+ src/core/ext/transport/chttp2/transport/frame_rst_stream.cc
+ src/core/ext/transport/chttp2/transport/frame_settings.cc
+ src/core/ext/transport/chttp2/transport/frame_window_update.cc
+ src/core/ext/transport/chttp2/transport/hpack_encoder.cc
+ src/core/ext/transport/chttp2/transport/hpack_parser.cc
+ src/core/ext/transport/chttp2/transport/hpack_table.cc
+ src/core/ext/transport/chttp2/transport/http2_settings.cc
+ src/core/ext/transport/chttp2/transport/huffsyms.cc
+ src/core/ext/transport/chttp2/transport/incoming_metadata.cc
+ src/core/ext/transport/chttp2/transport/parsing.cc
+ src/core/ext/transport/chttp2/transport/stream_lists.cc
+ src/core/ext/transport/chttp2/transport/stream_map.cc
+ src/core/ext/transport/chttp2/transport/varint.cc
+ src/core/ext/transport/chttp2/transport/writing.cc
+ src/core/ext/transport/chttp2/alpn/alpn.cc
+ src/core/ext/filters/http/client/http_client_filter.cc
+ src/core/ext/filters/http/http_filters_plugin.cc
+ src/core/ext/filters/http/message_compress/message_compress_filter.cc
+ src/core/ext/filters/http/server/http_server_filter.cc
)
if(WIN32 AND MSVC)
@@ -2139,237 +2142,238 @@ endforeach()
endif (gRPC_BUILD_TESTS)
add_library(grpc_unsecure
- src/core/lib/surface/init.c
- src/core/lib/surface/init_unsecure.c
- src/core/lib/channel/channel_args.c
- src/core/lib/channel/channel_stack.c
- src/core/lib/channel/channel_stack_builder.c
- src/core/lib/channel/connected_channel.c
- src/core/lib/channel/handshaker.c
- src/core/lib/channel/handshaker_factory.c
- src/core/lib/channel/handshaker_registry.c
- src/core/lib/compression/compression.c
- src/core/lib/compression/compression_internal.c
- src/core/lib/compression/message_compress.c
- src/core/lib/compression/stream_compression.c
- src/core/lib/compression/stream_compression_gzip.c
- src/core/lib/compression/stream_compression_identity.c
- src/core/lib/debug/stats.c
- src/core/lib/debug/stats_data.c
- src/core/lib/http/format_request.c
- src/core/lib/http/httpcli.c
- src/core/lib/http/parser.c
- src/core/lib/iomgr/call_combiner.c
- src/core/lib/iomgr/closure.c
- src/core/lib/iomgr/combiner.c
- src/core/lib/iomgr/endpoint.c
- src/core/lib/iomgr/endpoint_pair_posix.c
- src/core/lib/iomgr/endpoint_pair_uv.c
- src/core/lib/iomgr/endpoint_pair_windows.c
- src/core/lib/iomgr/error.c
- src/core/lib/iomgr/ev_epoll1_linux.c
- src/core/lib/iomgr/ev_epollex_linux.c
- src/core/lib/iomgr/ev_epollsig_linux.c
- src/core/lib/iomgr/ev_poll_posix.c
- src/core/lib/iomgr/ev_posix.c
- src/core/lib/iomgr/ev_windows.c
- src/core/lib/iomgr/exec_ctx.c
- src/core/lib/iomgr/executor.c
- src/core/lib/iomgr/gethostname_fallback.c
- src/core/lib/iomgr/gethostname_host_name_max.c
- src/core/lib/iomgr/gethostname_sysconf.c
- src/core/lib/iomgr/iocp_windows.c
- src/core/lib/iomgr/iomgr.c
- src/core/lib/iomgr/iomgr_posix.c
- src/core/lib/iomgr/iomgr_uv.c
- src/core/lib/iomgr/iomgr_windows.c
- src/core/lib/iomgr/is_epollexclusive_available.c
- src/core/lib/iomgr/load_file.c
- src/core/lib/iomgr/lockfree_event.c
- src/core/lib/iomgr/network_status_tracker.c
- src/core/lib/iomgr/polling_entity.c
- src/core/lib/iomgr/pollset_set_uv.c
- src/core/lib/iomgr/pollset_set_windows.c
- src/core/lib/iomgr/pollset_uv.c
- src/core/lib/iomgr/pollset_windows.c
- src/core/lib/iomgr/resolve_address_posix.c
- src/core/lib/iomgr/resolve_address_uv.c
- src/core/lib/iomgr/resolve_address_windows.c
- src/core/lib/iomgr/resource_quota.c
- src/core/lib/iomgr/sockaddr_utils.c
- src/core/lib/iomgr/socket_factory_posix.c
- src/core/lib/iomgr/socket_mutator.c
- src/core/lib/iomgr/socket_utils_common_posix.c
- src/core/lib/iomgr/socket_utils_linux.c
- src/core/lib/iomgr/socket_utils_posix.c
- src/core/lib/iomgr/socket_utils_uv.c
- src/core/lib/iomgr/socket_utils_windows.c
- src/core/lib/iomgr/socket_windows.c
- src/core/lib/iomgr/tcp_client_posix.c
- src/core/lib/iomgr/tcp_client_uv.c
- src/core/lib/iomgr/tcp_client_windows.c
- src/core/lib/iomgr/tcp_posix.c
- src/core/lib/iomgr/tcp_server_posix.c
- src/core/lib/iomgr/tcp_server_utils_posix_common.c
- src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c
- src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c
- src/core/lib/iomgr/tcp_server_uv.c
- src/core/lib/iomgr/tcp_server_windows.c
- src/core/lib/iomgr/tcp_uv.c
- src/core/lib/iomgr/tcp_windows.c
- src/core/lib/iomgr/time_averaged_stats.c
- src/core/lib/iomgr/timer_generic.c
- src/core/lib/iomgr/timer_heap.c
- src/core/lib/iomgr/timer_manager.c
- src/core/lib/iomgr/timer_uv.c
- src/core/lib/iomgr/udp_server.c
- src/core/lib/iomgr/unix_sockets_posix.c
- src/core/lib/iomgr/unix_sockets_posix_noop.c
- src/core/lib/iomgr/wakeup_fd_cv.c
- src/core/lib/iomgr/wakeup_fd_eventfd.c
- src/core/lib/iomgr/wakeup_fd_nospecial.c
- src/core/lib/iomgr/wakeup_fd_pipe.c
- src/core/lib/iomgr/wakeup_fd_posix.c
- src/core/lib/json/json.c
- src/core/lib/json/json_reader.c
- src/core/lib/json/json_string.c
- src/core/lib/json/json_writer.c
- src/core/lib/slice/b64.c
- src/core/lib/slice/percent_encoding.c
- src/core/lib/slice/slice.c
- src/core/lib/slice/slice_buffer.c
- src/core/lib/slice/slice_hash_table.c
- src/core/lib/slice/slice_intern.c
- src/core/lib/slice/slice_string_helpers.c
- src/core/lib/surface/alarm.c
- src/core/lib/surface/api_trace.c
- src/core/lib/surface/byte_buffer.c
- src/core/lib/surface/byte_buffer_reader.c
- src/core/lib/surface/call.c
- src/core/lib/surface/call_details.c
- src/core/lib/surface/call_log_batch.c
- src/core/lib/surface/channel.c
- src/core/lib/surface/channel_init.c
- src/core/lib/surface/channel_ping.c
- src/core/lib/surface/channel_stack_type.c
- src/core/lib/surface/completion_queue.c
- src/core/lib/surface/completion_queue_factory.c
- src/core/lib/surface/event_string.c
+ src/core/lib/surface/init.cc
+ src/core/lib/surface/init_unsecure.cc
+ src/core/lib/backoff/backoff.cc
+ src/core/lib/channel/channel_args.cc
+ src/core/lib/channel/channel_stack.cc
+ src/core/lib/channel/channel_stack_builder.cc
+ src/core/lib/channel/connected_channel.cc
+ src/core/lib/channel/handshaker.cc
+ 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/message_compress.cc
+ src/core/lib/compression/stream_compression.cc
+ src/core/lib/compression/stream_compression_gzip.cc
+ src/core/lib/compression/stream_compression_identity.cc
+ src/core/lib/debug/stats.cc
+ src/core/lib/debug/stats_data.cc
+ src/core/lib/http/format_request.cc
+ src/core/lib/http/httpcli.cc
+ src/core/lib/http/parser.cc
+ src/core/lib/iomgr/call_combiner.cc
+ src/core/lib/iomgr/closure.cc
+ src/core/lib/iomgr/combiner.cc
+ src/core/lib/iomgr/endpoint.cc
+ src/core/lib/iomgr/endpoint_pair_posix.cc
+ src/core/lib/iomgr/endpoint_pair_uv.cc
+ src/core/lib/iomgr/endpoint_pair_windows.cc
+ src/core/lib/iomgr/error.cc
+ src/core/lib/iomgr/ev_epoll1_linux.cc
+ src/core/lib/iomgr/ev_epollex_linux.cc
+ src/core/lib/iomgr/ev_epollsig_linux.cc
+ src/core/lib/iomgr/ev_poll_posix.cc
+ src/core/lib/iomgr/ev_posix.cc
+ src/core/lib/iomgr/ev_windows.cc
+ src/core/lib/iomgr/exec_ctx.cc
+ src/core/lib/iomgr/executor.cc
+ src/core/lib/iomgr/gethostname_fallback.cc
+ src/core/lib/iomgr/gethostname_host_name_max.cc
+ src/core/lib/iomgr/gethostname_sysconf.cc
+ src/core/lib/iomgr/iocp_windows.cc
+ src/core/lib/iomgr/iomgr.cc
+ src/core/lib/iomgr/iomgr_posix.cc
+ src/core/lib/iomgr/iomgr_uv.cc
+ src/core/lib/iomgr/iomgr_windows.cc
+ src/core/lib/iomgr/is_epollexclusive_available.cc
+ src/core/lib/iomgr/load_file.cc
+ src/core/lib/iomgr/lockfree_event.cc
+ src/core/lib/iomgr/network_status_tracker.cc
+ src/core/lib/iomgr/polling_entity.cc
+ src/core/lib/iomgr/pollset_set_uv.cc
+ src/core/lib/iomgr/pollset_set_windows.cc
+ src/core/lib/iomgr/pollset_uv.cc
+ src/core/lib/iomgr/pollset_windows.cc
+ src/core/lib/iomgr/resolve_address_posix.cc
+ src/core/lib/iomgr/resolve_address_uv.cc
+ src/core/lib/iomgr/resolve_address_windows.cc
+ src/core/lib/iomgr/resource_quota.cc
+ src/core/lib/iomgr/sockaddr_utils.cc
+ src/core/lib/iomgr/socket_factory_posix.cc
+ src/core/lib/iomgr/socket_mutator.cc
+ src/core/lib/iomgr/socket_utils_common_posix.cc
+ src/core/lib/iomgr/socket_utils_linux.cc
+ src/core/lib/iomgr/socket_utils_posix.cc
+ src/core/lib/iomgr/socket_utils_uv.cc
+ src/core/lib/iomgr/socket_utils_windows.cc
+ src/core/lib/iomgr/socket_windows.cc
+ src/core/lib/iomgr/tcp_client_posix.cc
+ src/core/lib/iomgr/tcp_client_uv.cc
+ src/core/lib/iomgr/tcp_client_windows.cc
+ src/core/lib/iomgr/tcp_posix.cc
+ src/core/lib/iomgr/tcp_server_posix.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_common.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
+ src/core/lib/iomgr/tcp_server_uv.cc
+ src/core/lib/iomgr/tcp_server_windows.cc
+ src/core/lib/iomgr/tcp_uv.cc
+ src/core/lib/iomgr/tcp_windows.cc
+ src/core/lib/iomgr/time_averaged_stats.cc
+ src/core/lib/iomgr/timer_generic.cc
+ src/core/lib/iomgr/timer_heap.cc
+ src/core/lib/iomgr/timer_manager.cc
+ src/core/lib/iomgr/timer_uv.cc
+ src/core/lib/iomgr/udp_server.cc
+ src/core/lib/iomgr/unix_sockets_posix.cc
+ src/core/lib/iomgr/unix_sockets_posix_noop.cc
+ src/core/lib/iomgr/wakeup_fd_cv.cc
+ src/core/lib/iomgr/wakeup_fd_eventfd.cc
+ src/core/lib/iomgr/wakeup_fd_nospecial.cc
+ src/core/lib/iomgr/wakeup_fd_pipe.cc
+ src/core/lib/iomgr/wakeup_fd_posix.cc
+ src/core/lib/json/json.cc
+ src/core/lib/json/json_reader.cc
+ src/core/lib/json/json_string.cc
+ src/core/lib/json/json_writer.cc
+ src/core/lib/slice/b64.cc
+ src/core/lib/slice/percent_encoding.cc
+ src/core/lib/slice/slice.cc
+ src/core/lib/slice/slice_buffer.cc
+ src/core/lib/slice/slice_hash_table.cc
+ src/core/lib/slice/slice_intern.cc
+ src/core/lib/slice/slice_string_helpers.cc
+ src/core/lib/surface/alarm.cc
+ src/core/lib/surface/api_trace.cc
+ src/core/lib/surface/byte_buffer.cc
+ src/core/lib/surface/byte_buffer_reader.cc
+ src/core/lib/surface/call.cc
+ src/core/lib/surface/call_details.cc
+ src/core/lib/surface/call_log_batch.cc
+ src/core/lib/surface/channel.cc
+ src/core/lib/surface/channel_init.cc
+ src/core/lib/surface/channel_ping.cc
+ src/core/lib/surface/channel_stack_type.cc
+ src/core/lib/surface/completion_queue.cc
+ src/core/lib/surface/completion_queue_factory.cc
+ src/core/lib/surface/event_string.cc
src/core/lib/surface/lame_client.cc
- src/core/lib/surface/metadata_array.c
- src/core/lib/surface/server.c
- src/core/lib/surface/validate_metadata.c
- src/core/lib/surface/version.c
- src/core/lib/transport/bdp_estimator.c
- src/core/lib/transport/byte_stream.c
- src/core/lib/transport/connectivity_state.c
- src/core/lib/transport/error_utils.c
- src/core/lib/transport/metadata.c
- src/core/lib/transport/metadata_batch.c
- src/core/lib/transport/pid_controller.c
- src/core/lib/transport/service_config.c
- src/core/lib/transport/static_metadata.c
- src/core/lib/transport/status_conversion.c
- src/core/lib/transport/timeout_encoding.c
- src/core/lib/transport/transport.c
- src/core/lib/transport/transport_op_string.c
- src/core/lib/debug/trace.c
- src/core/ext/transport/chttp2/server/insecure/server_chttp2.c
- src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c
- src/core/ext/transport/chttp2/transport/bin_decoder.c
- src/core/ext/transport/chttp2/transport/bin_encoder.c
- src/core/ext/transport/chttp2/transport/chttp2_plugin.c
- src/core/ext/transport/chttp2/transport/chttp2_transport.c
- src/core/ext/transport/chttp2/transport/flow_control.c
- src/core/ext/transport/chttp2/transport/frame_data.c
- src/core/ext/transport/chttp2/transport/frame_goaway.c
- src/core/ext/transport/chttp2/transport/frame_ping.c
- src/core/ext/transport/chttp2/transport/frame_rst_stream.c
- src/core/ext/transport/chttp2/transport/frame_settings.c
- src/core/ext/transport/chttp2/transport/frame_window_update.c
- src/core/ext/transport/chttp2/transport/hpack_encoder.c
- src/core/ext/transport/chttp2/transport/hpack_parser.c
- src/core/ext/transport/chttp2/transport/hpack_table.c
- src/core/ext/transport/chttp2/transport/http2_settings.c
- src/core/ext/transport/chttp2/transport/huffsyms.c
- src/core/ext/transport/chttp2/transport/incoming_metadata.c
- src/core/ext/transport/chttp2/transport/parsing.c
- src/core/ext/transport/chttp2/transport/stream_lists.c
- src/core/ext/transport/chttp2/transport/stream_map.c
- src/core/ext/transport/chttp2/transport/varint.c
- src/core/ext/transport/chttp2/transport/writing.c
- src/core/ext/transport/chttp2/alpn/alpn.c
- src/core/ext/filters/http/client/http_client_filter.c
- src/core/ext/filters/http/http_filters_plugin.c
- src/core/ext/filters/http/message_compress/message_compress_filter.c
- src/core/ext/filters/http/server/http_server_filter.c
- src/core/ext/transport/chttp2/server/chttp2_server.c
- src/core/ext/transport/chttp2/client/insecure/channel_create.c
- src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c
- src/core/ext/transport/chttp2/client/chttp2_connector.c
- src/core/ext/filters/client_channel/channel_connectivity.c
- src/core/ext/filters/client_channel/client_channel.c
- src/core/ext/filters/client_channel/client_channel_factory.c
- src/core/ext/filters/client_channel/client_channel_plugin.c
- src/core/ext/filters/client_channel/connector.c
- src/core/ext/filters/client_channel/http_connect_handshaker.c
- src/core/ext/filters/client_channel/http_proxy.c
- src/core/ext/filters/client_channel/lb_policy.c
- src/core/ext/filters/client_channel/lb_policy_factory.c
- src/core/ext/filters/client_channel/lb_policy_registry.c
- src/core/ext/filters/client_channel/parse_address.c
- src/core/ext/filters/client_channel/proxy_mapper.c
- src/core/ext/filters/client_channel/proxy_mapper_registry.c
- src/core/ext/filters/client_channel/resolver.c
- src/core/ext/filters/client_channel/resolver_factory.c
- src/core/ext/filters/client_channel/resolver_registry.c
- src/core/ext/filters/client_channel/retry_throttle.c
- src/core/ext/filters/client_channel/subchannel.c
- src/core/ext/filters/client_channel/subchannel_index.c
- src/core/ext/filters/client_channel/uri_parser.c
- src/core/ext/filters/deadline/deadline_filter.c
- src/core/ext/transport/inproc/inproc_plugin.c
- src/core/ext/transport/inproc/inproc_transport.c
- src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c
- src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c
- src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c
- src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c
- src/core/ext/filters/load_reporting/server_load_reporting_filter.c
- src/core/ext/filters/load_reporting/server_load_reporting_plugin.c
- src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.c
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c
- src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c
+ src/core/lib/surface/metadata_array.cc
+ src/core/lib/surface/server.cc
+ src/core/lib/surface/validate_metadata.cc
+ src/core/lib/surface/version.cc
+ src/core/lib/transport/bdp_estimator.cc
+ src/core/lib/transport/byte_stream.cc
+ src/core/lib/transport/connectivity_state.cc
+ src/core/lib/transport/error_utils.cc
+ src/core/lib/transport/metadata.cc
+ src/core/lib/transport/metadata_batch.cc
+ src/core/lib/transport/pid_controller.cc
+ src/core/lib/transport/service_config.cc
+ src/core/lib/transport/static_metadata.cc
+ src/core/lib/transport/status_conversion.cc
+ src/core/lib/transport/timeout_encoding.cc
+ src/core/lib/transport/transport.cc
+ src/core/lib/transport/transport_op_string.cc
+ src/core/lib/debug/trace.cc
+ src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc
+ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc
+ src/core/ext/transport/chttp2/transport/bin_decoder.cc
+ src/core/ext/transport/chttp2/transport/bin_encoder.cc
+ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc
+ src/core/ext/transport/chttp2/transport/chttp2_transport.cc
+ src/core/ext/transport/chttp2/transport/flow_control.cc
+ src/core/ext/transport/chttp2/transport/frame_data.cc
+ src/core/ext/transport/chttp2/transport/frame_goaway.cc
+ src/core/ext/transport/chttp2/transport/frame_ping.cc
+ src/core/ext/transport/chttp2/transport/frame_rst_stream.cc
+ src/core/ext/transport/chttp2/transport/frame_settings.cc
+ src/core/ext/transport/chttp2/transport/frame_window_update.cc
+ src/core/ext/transport/chttp2/transport/hpack_encoder.cc
+ src/core/ext/transport/chttp2/transport/hpack_parser.cc
+ src/core/ext/transport/chttp2/transport/hpack_table.cc
+ src/core/ext/transport/chttp2/transport/http2_settings.cc
+ src/core/ext/transport/chttp2/transport/huffsyms.cc
+ src/core/ext/transport/chttp2/transport/incoming_metadata.cc
+ src/core/ext/transport/chttp2/transport/parsing.cc
+ src/core/ext/transport/chttp2/transport/stream_lists.cc
+ src/core/ext/transport/chttp2/transport/stream_map.cc
+ src/core/ext/transport/chttp2/transport/varint.cc
+ src/core/ext/transport/chttp2/transport/writing.cc
+ src/core/ext/transport/chttp2/alpn/alpn.cc
+ src/core/ext/filters/http/client/http_client_filter.cc
+ src/core/ext/filters/http/http_filters_plugin.cc
+ src/core/ext/filters/http/message_compress/message_compress_filter.cc
+ src/core/ext/filters/http/server/http_server_filter.cc
+ src/core/ext/transport/chttp2/server/chttp2_server.cc
+ src/core/ext/transport/chttp2/client/insecure/channel_create.cc
+ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc
+ src/core/ext/transport/chttp2/client/chttp2_connector.cc
+ src/core/ext/filters/client_channel/channel_connectivity.cc
+ src/core/ext/filters/client_channel/client_channel.cc
+ src/core/ext/filters/client_channel/client_channel_factory.cc
+ src/core/ext/filters/client_channel/client_channel_plugin.cc
+ src/core/ext/filters/client_channel/connector.cc
+ src/core/ext/filters/client_channel/http_connect_handshaker.cc
+ src/core/ext/filters/client_channel/http_proxy.cc
+ src/core/ext/filters/client_channel/lb_policy.cc
+ src/core/ext/filters/client_channel/lb_policy_factory.cc
+ src/core/ext/filters/client_channel/lb_policy_registry.cc
+ src/core/ext/filters/client_channel/parse_address.cc
+ src/core/ext/filters/client_channel/proxy_mapper.cc
+ src/core/ext/filters/client_channel/proxy_mapper_registry.cc
+ src/core/ext/filters/client_channel/resolver.cc
+ src/core/ext/filters/client_channel/resolver_factory.cc
+ src/core/ext/filters/client_channel/resolver_registry.cc
+ src/core/ext/filters/client_channel/retry_throttle.cc
+ src/core/ext/filters/client_channel/subchannel.cc
+ src/core/ext/filters/client_channel/subchannel_index.cc
+ src/core/ext/filters/client_channel/uri_parser.cc
+ src/core/ext/filters/deadline/deadline_filter.cc
+ src/core/ext/transport/inproc/inproc_plugin.cc
+ src/core/ext/transport/inproc/inproc_transport.cc
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc
+ src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
+ src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
+ src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
+ src/core/ext/filters/load_reporting/server_load_reporting_filter.cc
+ src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc
+ src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc
+ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
+ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc
+ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc
+ src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c
third_party/nanopb/pb_common.c
third_party/nanopb/pb_decode.c
third_party/nanopb/pb_encode.c
- src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c
- src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c
- src/core/ext/census/base_resources.c
- src/core/ext/census/context.c
+ src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
+ src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
+ src/core/ext/census/base_resources.cc
+ src/core/ext/census/context.cc
src/core/ext/census/gen/census.pb.c
src/core/ext/census/gen/trace_context.pb.c
- src/core/ext/census/grpc_context.c
- src/core/ext/census/grpc_filter.c
- src/core/ext/census/grpc_plugin.c
- src/core/ext/census/initialize.c
- src/core/ext/census/intrusive_hash_map.c
- src/core/ext/census/mlog.c
- src/core/ext/census/operation.c
- src/core/ext/census/placeholders.c
- src/core/ext/census/resource.c
- src/core/ext/census/trace_context.c
- src/core/ext/census/tracing.c
- src/core/ext/filters/max_age/max_age_filter.c
- src/core/ext/filters/message_size/message_size_filter.c
- src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c
- src/core/ext/filters/workarounds/workaround_utils.c
- src/core/plugin_registry/grpc_unsecure_plugin_registry.c
+ src/core/ext/census/grpc_context.cc
+ src/core/ext/census/grpc_filter.cc
+ src/core/ext/census/grpc_plugin.cc
+ src/core/ext/census/initialize.cc
+ src/core/ext/census/intrusive_hash_map.cc
+ src/core/ext/census/mlog.cc
+ src/core/ext/census/operation.cc
+ src/core/ext/census/placeholders.cc
+ src/core/ext/census/resource.cc
+ src/core/ext/census/trace_context.cc
+ src/core/ext/census/tracing.cc
+ src/core/ext/filters/max_age/max_age_filter.cc
+ src/core/ext/filters/message_size/message_size_filter.cc
+ src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc
+ src/core/ext/filters/workarounds/workaround_utils.cc
+ src/core/plugin_registry/grpc_unsecure_plugin_registry.cc
)
if(WIN32 AND MSVC)
@@ -2874,208 +2878,209 @@ add_library(grpc++_cronet
src/cpp/util/string_ref.cc
src/cpp/util/time_cc.cc
src/cpp/codegen/codegen_init.cc
- src/core/ext/transport/chttp2/client/insecure/channel_create.c
- src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c
- src/core/ext/transport/chttp2/client/chttp2_connector.c
- src/core/ext/transport/chttp2/transport/bin_decoder.c
- src/core/ext/transport/chttp2/transport/bin_encoder.c
- src/core/ext/transport/chttp2/transport/chttp2_plugin.c
- src/core/ext/transport/chttp2/transport/chttp2_transport.c
- src/core/ext/transport/chttp2/transport/flow_control.c
- src/core/ext/transport/chttp2/transport/frame_data.c
- src/core/ext/transport/chttp2/transport/frame_goaway.c
- src/core/ext/transport/chttp2/transport/frame_ping.c
- src/core/ext/transport/chttp2/transport/frame_rst_stream.c
- src/core/ext/transport/chttp2/transport/frame_settings.c
- src/core/ext/transport/chttp2/transport/frame_window_update.c
- src/core/ext/transport/chttp2/transport/hpack_encoder.c
- src/core/ext/transport/chttp2/transport/hpack_parser.c
- src/core/ext/transport/chttp2/transport/hpack_table.c
- src/core/ext/transport/chttp2/transport/http2_settings.c
- src/core/ext/transport/chttp2/transport/huffsyms.c
- src/core/ext/transport/chttp2/transport/incoming_metadata.c
- src/core/ext/transport/chttp2/transport/parsing.c
- src/core/ext/transport/chttp2/transport/stream_lists.c
- src/core/ext/transport/chttp2/transport/stream_map.c
- src/core/ext/transport/chttp2/transport/varint.c
- src/core/ext/transport/chttp2/transport/writing.c
- src/core/lib/channel/channel_args.c
- src/core/lib/channel/channel_stack.c
- src/core/lib/channel/channel_stack_builder.c
- src/core/lib/channel/connected_channel.c
- src/core/lib/channel/handshaker.c
- src/core/lib/channel/handshaker_factory.c
- src/core/lib/channel/handshaker_registry.c
- src/core/lib/compression/compression.c
- src/core/lib/compression/compression_internal.c
- src/core/lib/compression/message_compress.c
- src/core/lib/compression/stream_compression.c
- src/core/lib/compression/stream_compression_gzip.c
- src/core/lib/compression/stream_compression_identity.c
- src/core/lib/debug/stats.c
- src/core/lib/debug/stats_data.c
- src/core/lib/http/format_request.c
- src/core/lib/http/httpcli.c
- src/core/lib/http/parser.c
- src/core/lib/iomgr/call_combiner.c
- src/core/lib/iomgr/closure.c
- src/core/lib/iomgr/combiner.c
- src/core/lib/iomgr/endpoint.c
- src/core/lib/iomgr/endpoint_pair_posix.c
- src/core/lib/iomgr/endpoint_pair_uv.c
- src/core/lib/iomgr/endpoint_pair_windows.c
- src/core/lib/iomgr/error.c
- src/core/lib/iomgr/ev_epoll1_linux.c
- src/core/lib/iomgr/ev_epollex_linux.c
- src/core/lib/iomgr/ev_epollsig_linux.c
- src/core/lib/iomgr/ev_poll_posix.c
- src/core/lib/iomgr/ev_posix.c
- src/core/lib/iomgr/ev_windows.c
- src/core/lib/iomgr/exec_ctx.c
- src/core/lib/iomgr/executor.c
- src/core/lib/iomgr/gethostname_fallback.c
- src/core/lib/iomgr/gethostname_host_name_max.c
- src/core/lib/iomgr/gethostname_sysconf.c
- src/core/lib/iomgr/iocp_windows.c
- src/core/lib/iomgr/iomgr.c
- src/core/lib/iomgr/iomgr_posix.c
- src/core/lib/iomgr/iomgr_uv.c
- src/core/lib/iomgr/iomgr_windows.c
- src/core/lib/iomgr/is_epollexclusive_available.c
- src/core/lib/iomgr/load_file.c
- src/core/lib/iomgr/lockfree_event.c
- src/core/lib/iomgr/network_status_tracker.c
- src/core/lib/iomgr/polling_entity.c
- src/core/lib/iomgr/pollset_set_uv.c
- src/core/lib/iomgr/pollset_set_windows.c
- src/core/lib/iomgr/pollset_uv.c
- src/core/lib/iomgr/pollset_windows.c
- src/core/lib/iomgr/resolve_address_posix.c
- src/core/lib/iomgr/resolve_address_uv.c
- src/core/lib/iomgr/resolve_address_windows.c
- src/core/lib/iomgr/resource_quota.c
- src/core/lib/iomgr/sockaddr_utils.c
- src/core/lib/iomgr/socket_factory_posix.c
- src/core/lib/iomgr/socket_mutator.c
- src/core/lib/iomgr/socket_utils_common_posix.c
- src/core/lib/iomgr/socket_utils_linux.c
- src/core/lib/iomgr/socket_utils_posix.c
- src/core/lib/iomgr/socket_utils_uv.c
- src/core/lib/iomgr/socket_utils_windows.c
- src/core/lib/iomgr/socket_windows.c
- src/core/lib/iomgr/tcp_client_posix.c
- src/core/lib/iomgr/tcp_client_uv.c
- src/core/lib/iomgr/tcp_client_windows.c
- src/core/lib/iomgr/tcp_posix.c
- src/core/lib/iomgr/tcp_server_posix.c
- src/core/lib/iomgr/tcp_server_utils_posix_common.c
- src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c
- src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c
- src/core/lib/iomgr/tcp_server_uv.c
- src/core/lib/iomgr/tcp_server_windows.c
- src/core/lib/iomgr/tcp_uv.c
- src/core/lib/iomgr/tcp_windows.c
- src/core/lib/iomgr/time_averaged_stats.c
- src/core/lib/iomgr/timer_generic.c
- src/core/lib/iomgr/timer_heap.c
- src/core/lib/iomgr/timer_manager.c
- src/core/lib/iomgr/timer_uv.c
- src/core/lib/iomgr/udp_server.c
- src/core/lib/iomgr/unix_sockets_posix.c
- src/core/lib/iomgr/unix_sockets_posix_noop.c
- src/core/lib/iomgr/wakeup_fd_cv.c
- src/core/lib/iomgr/wakeup_fd_eventfd.c
- src/core/lib/iomgr/wakeup_fd_nospecial.c
- src/core/lib/iomgr/wakeup_fd_pipe.c
- src/core/lib/iomgr/wakeup_fd_posix.c
- src/core/lib/json/json.c
- src/core/lib/json/json_reader.c
- src/core/lib/json/json_string.c
- src/core/lib/json/json_writer.c
- src/core/lib/slice/b64.c
- src/core/lib/slice/percent_encoding.c
- src/core/lib/slice/slice.c
- src/core/lib/slice/slice_buffer.c
- src/core/lib/slice/slice_hash_table.c
- src/core/lib/slice/slice_intern.c
- src/core/lib/slice/slice_string_helpers.c
- src/core/lib/surface/alarm.c
- src/core/lib/surface/api_trace.c
- src/core/lib/surface/byte_buffer.c
- src/core/lib/surface/byte_buffer_reader.c
- src/core/lib/surface/call.c
- src/core/lib/surface/call_details.c
- src/core/lib/surface/call_log_batch.c
- src/core/lib/surface/channel.c
- src/core/lib/surface/channel_init.c
- src/core/lib/surface/channel_ping.c
- src/core/lib/surface/channel_stack_type.c
- src/core/lib/surface/completion_queue.c
- src/core/lib/surface/completion_queue_factory.c
- src/core/lib/surface/event_string.c
+ src/core/ext/transport/chttp2/client/insecure/channel_create.cc
+ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc
+ src/core/ext/transport/chttp2/client/chttp2_connector.cc
+ src/core/ext/transport/chttp2/transport/bin_decoder.cc
+ src/core/ext/transport/chttp2/transport/bin_encoder.cc
+ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc
+ src/core/ext/transport/chttp2/transport/chttp2_transport.cc
+ src/core/ext/transport/chttp2/transport/flow_control.cc
+ src/core/ext/transport/chttp2/transport/frame_data.cc
+ src/core/ext/transport/chttp2/transport/frame_goaway.cc
+ src/core/ext/transport/chttp2/transport/frame_ping.cc
+ src/core/ext/transport/chttp2/transport/frame_rst_stream.cc
+ src/core/ext/transport/chttp2/transport/frame_settings.cc
+ src/core/ext/transport/chttp2/transport/frame_window_update.cc
+ src/core/ext/transport/chttp2/transport/hpack_encoder.cc
+ src/core/ext/transport/chttp2/transport/hpack_parser.cc
+ src/core/ext/transport/chttp2/transport/hpack_table.cc
+ src/core/ext/transport/chttp2/transport/http2_settings.cc
+ src/core/ext/transport/chttp2/transport/huffsyms.cc
+ src/core/ext/transport/chttp2/transport/incoming_metadata.cc
+ src/core/ext/transport/chttp2/transport/parsing.cc
+ src/core/ext/transport/chttp2/transport/stream_lists.cc
+ src/core/ext/transport/chttp2/transport/stream_map.cc
+ src/core/ext/transport/chttp2/transport/varint.cc
+ src/core/ext/transport/chttp2/transport/writing.cc
+ src/core/lib/backoff/backoff.cc
+ src/core/lib/channel/channel_args.cc
+ src/core/lib/channel/channel_stack.cc
+ src/core/lib/channel/channel_stack_builder.cc
+ src/core/lib/channel/connected_channel.cc
+ src/core/lib/channel/handshaker.cc
+ 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/message_compress.cc
+ src/core/lib/compression/stream_compression.cc
+ src/core/lib/compression/stream_compression_gzip.cc
+ src/core/lib/compression/stream_compression_identity.cc
+ src/core/lib/debug/stats.cc
+ src/core/lib/debug/stats_data.cc
+ src/core/lib/http/format_request.cc
+ src/core/lib/http/httpcli.cc
+ src/core/lib/http/parser.cc
+ src/core/lib/iomgr/call_combiner.cc
+ src/core/lib/iomgr/closure.cc
+ src/core/lib/iomgr/combiner.cc
+ src/core/lib/iomgr/endpoint.cc
+ src/core/lib/iomgr/endpoint_pair_posix.cc
+ src/core/lib/iomgr/endpoint_pair_uv.cc
+ src/core/lib/iomgr/endpoint_pair_windows.cc
+ src/core/lib/iomgr/error.cc
+ src/core/lib/iomgr/ev_epoll1_linux.cc
+ src/core/lib/iomgr/ev_epollex_linux.cc
+ src/core/lib/iomgr/ev_epollsig_linux.cc
+ src/core/lib/iomgr/ev_poll_posix.cc
+ src/core/lib/iomgr/ev_posix.cc
+ src/core/lib/iomgr/ev_windows.cc
+ src/core/lib/iomgr/exec_ctx.cc
+ src/core/lib/iomgr/executor.cc
+ src/core/lib/iomgr/gethostname_fallback.cc
+ src/core/lib/iomgr/gethostname_host_name_max.cc
+ src/core/lib/iomgr/gethostname_sysconf.cc
+ src/core/lib/iomgr/iocp_windows.cc
+ src/core/lib/iomgr/iomgr.cc
+ src/core/lib/iomgr/iomgr_posix.cc
+ src/core/lib/iomgr/iomgr_uv.cc
+ src/core/lib/iomgr/iomgr_windows.cc
+ src/core/lib/iomgr/is_epollexclusive_available.cc
+ src/core/lib/iomgr/load_file.cc
+ src/core/lib/iomgr/lockfree_event.cc
+ src/core/lib/iomgr/network_status_tracker.cc
+ src/core/lib/iomgr/polling_entity.cc
+ src/core/lib/iomgr/pollset_set_uv.cc
+ src/core/lib/iomgr/pollset_set_windows.cc
+ src/core/lib/iomgr/pollset_uv.cc
+ src/core/lib/iomgr/pollset_windows.cc
+ src/core/lib/iomgr/resolve_address_posix.cc
+ src/core/lib/iomgr/resolve_address_uv.cc
+ src/core/lib/iomgr/resolve_address_windows.cc
+ src/core/lib/iomgr/resource_quota.cc
+ src/core/lib/iomgr/sockaddr_utils.cc
+ src/core/lib/iomgr/socket_factory_posix.cc
+ src/core/lib/iomgr/socket_mutator.cc
+ src/core/lib/iomgr/socket_utils_common_posix.cc
+ src/core/lib/iomgr/socket_utils_linux.cc
+ src/core/lib/iomgr/socket_utils_posix.cc
+ src/core/lib/iomgr/socket_utils_uv.cc
+ src/core/lib/iomgr/socket_utils_windows.cc
+ src/core/lib/iomgr/socket_windows.cc
+ src/core/lib/iomgr/tcp_client_posix.cc
+ src/core/lib/iomgr/tcp_client_uv.cc
+ src/core/lib/iomgr/tcp_client_windows.cc
+ src/core/lib/iomgr/tcp_posix.cc
+ src/core/lib/iomgr/tcp_server_posix.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_common.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
+ src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
+ src/core/lib/iomgr/tcp_server_uv.cc
+ src/core/lib/iomgr/tcp_server_windows.cc
+ src/core/lib/iomgr/tcp_uv.cc
+ src/core/lib/iomgr/tcp_windows.cc
+ src/core/lib/iomgr/time_averaged_stats.cc
+ src/core/lib/iomgr/timer_generic.cc
+ src/core/lib/iomgr/timer_heap.cc
+ src/core/lib/iomgr/timer_manager.cc
+ src/core/lib/iomgr/timer_uv.cc
+ src/core/lib/iomgr/udp_server.cc
+ src/core/lib/iomgr/unix_sockets_posix.cc
+ src/core/lib/iomgr/unix_sockets_posix_noop.cc
+ src/core/lib/iomgr/wakeup_fd_cv.cc
+ src/core/lib/iomgr/wakeup_fd_eventfd.cc
+ src/core/lib/iomgr/wakeup_fd_nospecial.cc
+ src/core/lib/iomgr/wakeup_fd_pipe.cc
+ src/core/lib/iomgr/wakeup_fd_posix.cc
+ src/core/lib/json/json.cc
+ src/core/lib/json/json_reader.cc
+ src/core/lib/json/json_string.cc
+ src/core/lib/json/json_writer.cc
+ src/core/lib/slice/b64.cc
+ src/core/lib/slice/percent_encoding.cc
+ src/core/lib/slice/slice.cc
+ src/core/lib/slice/slice_buffer.cc
+ src/core/lib/slice/slice_hash_table.cc
+ src/core/lib/slice/slice_intern.cc
+ src/core/lib/slice/slice_string_helpers.cc
+ src/core/lib/surface/alarm.cc
+ src/core/lib/surface/api_trace.cc
+ src/core/lib/surface/byte_buffer.cc
+ src/core/lib/surface/byte_buffer_reader.cc
+ src/core/lib/surface/call.cc
+ src/core/lib/surface/call_details.cc
+ src/core/lib/surface/call_log_batch.cc
+ src/core/lib/surface/channel.cc
+ src/core/lib/surface/channel_init.cc
+ src/core/lib/surface/channel_ping.cc
+ src/core/lib/surface/channel_stack_type.cc
+ src/core/lib/surface/completion_queue.cc
+ src/core/lib/surface/completion_queue_factory.cc
+ src/core/lib/surface/event_string.cc
src/core/lib/surface/lame_client.cc
- src/core/lib/surface/metadata_array.c
- src/core/lib/surface/server.c
- src/core/lib/surface/validate_metadata.c
- src/core/lib/surface/version.c
- src/core/lib/transport/bdp_estimator.c
- src/core/lib/transport/byte_stream.c
- src/core/lib/transport/connectivity_state.c
- src/core/lib/transport/error_utils.c
- src/core/lib/transport/metadata.c
- src/core/lib/transport/metadata_batch.c
- src/core/lib/transport/pid_controller.c
- src/core/lib/transport/service_config.c
- src/core/lib/transport/static_metadata.c
- src/core/lib/transport/status_conversion.c
- src/core/lib/transport/timeout_encoding.c
- src/core/lib/transport/transport.c
- src/core/lib/transport/transport_op_string.c
- src/core/lib/debug/trace.c
- src/core/ext/transport/chttp2/alpn/alpn.c
- src/core/ext/filters/http/client/http_client_filter.c
- src/core/ext/filters/http/http_filters_plugin.c
- src/core/ext/filters/http/message_compress/message_compress_filter.c
- src/core/ext/filters/http/server/http_server_filter.c
- src/core/ext/filters/client_channel/channel_connectivity.c
- src/core/ext/filters/client_channel/client_channel.c
- src/core/ext/filters/client_channel/client_channel_factory.c
- src/core/ext/filters/client_channel/client_channel_plugin.c
- src/core/ext/filters/client_channel/connector.c
- src/core/ext/filters/client_channel/http_connect_handshaker.c
- src/core/ext/filters/client_channel/http_proxy.c
- src/core/ext/filters/client_channel/lb_policy.c
- src/core/ext/filters/client_channel/lb_policy_factory.c
- src/core/ext/filters/client_channel/lb_policy_registry.c
- src/core/ext/filters/client_channel/parse_address.c
- src/core/ext/filters/client_channel/proxy_mapper.c
- src/core/ext/filters/client_channel/proxy_mapper_registry.c
- src/core/ext/filters/client_channel/resolver.c
- src/core/ext/filters/client_channel/resolver_factory.c
- src/core/ext/filters/client_channel/resolver_registry.c
- src/core/ext/filters/client_channel/retry_throttle.c
- src/core/ext/filters/client_channel/subchannel.c
- src/core/ext/filters/client_channel/subchannel_index.c
- src/core/ext/filters/client_channel/uri_parser.c
- src/core/ext/filters/deadline/deadline_filter.c
- src/core/ext/transport/chttp2/server/insecure/server_chttp2.c
- src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c
- src/core/ext/transport/chttp2/server/chttp2_server.c
- src/core/ext/census/base_resources.c
- src/core/ext/census/context.c
+ src/core/lib/surface/metadata_array.cc
+ src/core/lib/surface/server.cc
+ src/core/lib/surface/validate_metadata.cc
+ src/core/lib/surface/version.cc
+ src/core/lib/transport/bdp_estimator.cc
+ src/core/lib/transport/byte_stream.cc
+ src/core/lib/transport/connectivity_state.cc
+ src/core/lib/transport/error_utils.cc
+ src/core/lib/transport/metadata.cc
+ src/core/lib/transport/metadata_batch.cc
+ src/core/lib/transport/pid_controller.cc
+ src/core/lib/transport/service_config.cc
+ src/core/lib/transport/static_metadata.cc
+ src/core/lib/transport/status_conversion.cc
+ src/core/lib/transport/timeout_encoding.cc
+ src/core/lib/transport/transport.cc
+ src/core/lib/transport/transport_op_string.cc
+ src/core/lib/debug/trace.cc
+ src/core/ext/transport/chttp2/alpn/alpn.cc
+ src/core/ext/filters/http/client/http_client_filter.cc
+ src/core/ext/filters/http/http_filters_plugin.cc
+ src/core/ext/filters/http/message_compress/message_compress_filter.cc
+ src/core/ext/filters/http/server/http_server_filter.cc
+ src/core/ext/filters/client_channel/channel_connectivity.cc
+ src/core/ext/filters/client_channel/client_channel.cc
+ src/core/ext/filters/client_channel/client_channel_factory.cc
+ src/core/ext/filters/client_channel/client_channel_plugin.cc
+ src/core/ext/filters/client_channel/connector.cc
+ src/core/ext/filters/client_channel/http_connect_handshaker.cc
+ src/core/ext/filters/client_channel/http_proxy.cc
+ src/core/ext/filters/client_channel/lb_policy.cc
+ src/core/ext/filters/client_channel/lb_policy_factory.cc
+ src/core/ext/filters/client_channel/lb_policy_registry.cc
+ src/core/ext/filters/client_channel/parse_address.cc
+ src/core/ext/filters/client_channel/proxy_mapper.cc
+ src/core/ext/filters/client_channel/proxy_mapper_registry.cc
+ src/core/ext/filters/client_channel/resolver.cc
+ src/core/ext/filters/client_channel/resolver_factory.cc
+ src/core/ext/filters/client_channel/resolver_registry.cc
+ src/core/ext/filters/client_channel/retry_throttle.cc
+ src/core/ext/filters/client_channel/subchannel.cc
+ src/core/ext/filters/client_channel/subchannel_index.cc
+ src/core/ext/filters/client_channel/uri_parser.cc
+ src/core/ext/filters/deadline/deadline_filter.cc
+ src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc
+ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc
+ src/core/ext/transport/chttp2/server/chttp2_server.cc
+ src/core/ext/census/base_resources.cc
+ src/core/ext/census/context.cc
src/core/ext/census/gen/census.pb.c
src/core/ext/census/gen/trace_context.pb.c
- src/core/ext/census/grpc_context.c
- src/core/ext/census/grpc_filter.c
- src/core/ext/census/grpc_plugin.c
- src/core/ext/census/initialize.c
- src/core/ext/census/intrusive_hash_map.c
- src/core/ext/census/mlog.c
- src/core/ext/census/operation.c
- src/core/ext/census/placeholders.c
- src/core/ext/census/resource.c
- src/core/ext/census/trace_context.c
- src/core/ext/census/tracing.c
+ src/core/ext/census/grpc_context.cc
+ src/core/ext/census/grpc_filter.cc
+ src/core/ext/census/grpc_plugin.cc
+ src/core/ext/census/initialize.cc
+ src/core/ext/census/intrusive_hash_map.cc
+ src/core/ext/census/mlog.cc
+ src/core/ext/census/operation.cc
+ src/core/ext/census/placeholders.cc
+ src/core/ext/census/resource.cc
+ src/core/ext/census/trace_context.cc
+ src/core/ext/census/tracing.cc
third_party/nanopb/pb_common.c
third_party/nanopb/pb_decode.c
third_party/nanopb/pb_encode.c
@@ -5201,6 +5206,35 @@ target_link_libraries(arena_test
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
+add_executable(backoff_test
+ test/core/backoff/backoff_test.c
+)
+
+
+target_include_directories(backoff_test
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
+ PRIVATE ${BORINGSSL_ROOT_DIR}/include
+ PRIVATE ${PROTOBUF_ROOT_DIR}/src
+ PRIVATE ${BENCHMARK_ROOT_DIR}/include
+ PRIVATE ${ZLIB_ROOT_DIR}
+ PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
+ PRIVATE ${CARES_INCLUDE_DIR}
+ PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/cares/cares
+ PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/gflags/include
+)
+
+target_link_libraries(backoff_test
+ ${_gRPC_ALLTARGETS_LIBRARIES}
+ grpc_test_util
+ grpc
+ gpr_test_util
+ gpr
+)
+
+endif (gRPC_BUILD_TESTS)
+if (gRPC_BUILD_TESTS)
+
add_executable(bad_server_response_test
test/core/end2end/bad_server_response_test.c
)
@@ -6301,33 +6335,6 @@ target_link_libraries(gpr_avl_test
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
-add_executable(gpr_backoff_test
- test/core/support/backoff_test.c
-)
-
-
-target_include_directories(gpr_backoff_test
- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
- PRIVATE ${BORINGSSL_ROOT_DIR}/include
- PRIVATE ${PROTOBUF_ROOT_DIR}/src
- PRIVATE ${BENCHMARK_ROOT_DIR}/include
- PRIVATE ${ZLIB_ROOT_DIR}
- PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib
- PRIVATE ${CARES_INCLUDE_DIR}
- PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/cares/cares
- PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/gflags/include
-)
-
-target_link_libraries(gpr_backoff_test
- ${_gRPC_ALLTARGETS_LIBRARIES}
- gpr_test_util
- gpr
-)
-
-endif (gRPC_BUILD_TESTS)
-if (gRPC_BUILD_TESTS)
-
add_executable(gpr_cmdline_test
test/core/support/cmdline_test.c
)
diff --git a/Makefile b/Makefile
index ec1786a583..ffd0818cec 100644
--- a/Makefile
+++ b/Makefile
@@ -187,7 +187,7 @@ CXX_gcov = g++
LD_gcov = gcc
LDXX_gcov = g++
CPPFLAGS_gcov = -O0 -fprofile-arcs -ftest-coverage -Wno-return-type
-LDFLAGS_gcov = -fprofile-arcs -ftest-coverage -rdynamic
+LDFLAGS_gcov = -fprofile-arcs -ftest-coverage -rdynamic -lstdc++
DEFINES_gcov = _DEBUG DEBUG GPR_GCOV
VALID_CONFIG_memcheck = 1
@@ -411,8 +411,8 @@ Q = @
endif
CORE_VERSION = 5.0.0-dev
-CPP_VERSION = 1.7.0-dev
-CSHARP_VERSION = 1.7.0-dev
+CPP_VERSION = 1.8.0-dev
+CSHARP_VERSION = 1.8.0-dev
CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES))
CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
@@ -950,6 +950,7 @@ alloc_test: $(BINDIR)/$(CONFIG)/alloc_test
alpn_test: $(BINDIR)/$(CONFIG)/alpn_test
api_fuzzer: $(BINDIR)/$(CONFIG)/api_fuzzer
arena_test: $(BINDIR)/$(CONFIG)/arena_test
+backoff_test: $(BINDIR)/$(CONFIG)/backoff_test
bad_server_response_test: $(BINDIR)/$(CONFIG)/bad_server_response_test
bdp_estimator_test: $(BINDIR)/$(CONFIG)/bdp_estimator_test
bin_decoder_test: $(BINDIR)/$(CONFIG)/bin_decoder_test
@@ -988,7 +989,6 @@ gen_legal_metadata_characters: $(BINDIR)/$(CONFIG)/gen_legal_metadata_characters
gen_percent_encoding_tables: $(BINDIR)/$(CONFIG)/gen_percent_encoding_tables
goaway_server_test: $(BINDIR)/$(CONFIG)/goaway_server_test
gpr_avl_test: $(BINDIR)/$(CONFIG)/gpr_avl_test
-gpr_backoff_test: $(BINDIR)/$(CONFIG)/gpr_backoff_test
gpr_cmdline_test: $(BINDIR)/$(CONFIG)/gpr_cmdline_test
gpr_cpu_test: $(BINDIR)/$(CONFIG)/gpr_cpu_test
gpr_env_test: $(BINDIR)/$(CONFIG)/gpr_env_test
@@ -1350,6 +1350,7 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/alloc_test \
$(BINDIR)/$(CONFIG)/alpn_test \
$(BINDIR)/$(CONFIG)/arena_test \
+ $(BINDIR)/$(CONFIG)/backoff_test \
$(BINDIR)/$(CONFIG)/bad_server_response_test \
$(BINDIR)/$(CONFIG)/bdp_estimator_test \
$(BINDIR)/$(CONFIG)/bin_decoder_test \
@@ -1383,7 +1384,6 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/fling_test \
$(BINDIR)/$(CONFIG)/goaway_server_test \
$(BINDIR)/$(CONFIG)/gpr_avl_test \
- $(BINDIR)/$(CONFIG)/gpr_backoff_test \
$(BINDIR)/$(CONFIG)/gpr_cmdline_test \
$(BINDIR)/$(CONFIG)/gpr_cpu_test \
$(BINDIR)/$(CONFIG)/gpr_env_test \
@@ -1761,6 +1761,8 @@ test_c: buildtests_c
$(Q) $(BINDIR)/$(CONFIG)/alpn_test || ( echo test alpn_test failed ; exit 1 )
$(E) "[RUN] Testing arena_test"
$(Q) $(BINDIR)/$(CONFIG)/arena_test || ( echo test arena_test failed ; exit 1 )
+ $(E) "[RUN] Testing backoff_test"
+ $(Q) $(BINDIR)/$(CONFIG)/backoff_test || ( echo test backoff_test failed ; exit 1 )
$(E) "[RUN] Testing bad_server_response_test"
$(Q) $(BINDIR)/$(CONFIG)/bad_server_response_test || ( echo test bad_server_response_test failed ; exit 1 )
$(E) "[RUN] Testing bdp_estimator_test"
@@ -1823,8 +1825,6 @@ test_c: buildtests_c
$(Q) $(BINDIR)/$(CONFIG)/goaway_server_test || ( echo test goaway_server_test failed ; exit 1 )
$(E) "[RUN] Testing gpr_avl_test"
$(Q) $(BINDIR)/$(CONFIG)/gpr_avl_test || ( echo test gpr_avl_test failed ; exit 1 )
- $(E) "[RUN] Testing gpr_backoff_test"
- $(Q) $(BINDIR)/$(CONFIG)/gpr_backoff_test || ( echo test gpr_backoff_test failed ; exit 1 )
$(E) "[RUN] Testing gpr_cmdline_test"
$(Q) $(BINDIR)/$(CONFIG)/gpr_cmdline_test || ( echo test gpr_cmdline_test failed ; exit 1 )
$(E) "[RUN] Testing gpr_cpu_test"
@@ -2794,52 +2794,51 @@ clean:
LIBGPR_SRC = \
- src/core/lib/profiling/basic_timers.c \
- src/core/lib/profiling/stap_timers.c \
- src/core/lib/support/alloc.c \
- src/core/lib/support/arena.c \
- src/core/lib/support/atm.c \
- src/core/lib/support/avl.c \
- src/core/lib/support/backoff.c \
- src/core/lib/support/cmdline.c \
- src/core/lib/support/cpu_iphone.c \
- src/core/lib/support/cpu_linux.c \
- src/core/lib/support/cpu_posix.c \
- src/core/lib/support/cpu_windows.c \
- src/core/lib/support/env_linux.c \
- src/core/lib/support/env_posix.c \
- src/core/lib/support/env_windows.c \
- src/core/lib/support/histogram.c \
- src/core/lib/support/host_port.c \
- src/core/lib/support/log.c \
- src/core/lib/support/log_android.c \
- src/core/lib/support/log_linux.c \
- src/core/lib/support/log_posix.c \
- src/core/lib/support/log_windows.c \
- src/core/lib/support/mpscq.c \
- src/core/lib/support/murmur_hash.c \
- src/core/lib/support/stack_lockfree.c \
- src/core/lib/support/string.c \
- src/core/lib/support/string_posix.c \
- src/core/lib/support/string_util_windows.c \
- src/core/lib/support/string_windows.c \
- src/core/lib/support/subprocess_posix.c \
- src/core/lib/support/subprocess_windows.c \
- src/core/lib/support/sync.c \
- src/core/lib/support/sync_posix.c \
- src/core/lib/support/sync_windows.c \
- src/core/lib/support/thd.c \
- src/core/lib/support/thd_posix.c \
- src/core/lib/support/thd_windows.c \
- src/core/lib/support/time.c \
- src/core/lib/support/time_posix.c \
- src/core/lib/support/time_precise.c \
- src/core/lib/support/time_windows.c \
- src/core/lib/support/tls_pthread.c \
- src/core/lib/support/tmpfile_msys.c \
- src/core/lib/support/tmpfile_posix.c \
- src/core/lib/support/tmpfile_windows.c \
- src/core/lib/support/wrap_memcpy.c \
+ src/core/lib/profiling/basic_timers.cc \
+ src/core/lib/profiling/stap_timers.cc \
+ src/core/lib/support/alloc.cc \
+ src/core/lib/support/arena.cc \
+ src/core/lib/support/atm.cc \
+ src/core/lib/support/avl.cc \
+ src/core/lib/support/cmdline.cc \
+ src/core/lib/support/cpu_iphone.cc \
+ src/core/lib/support/cpu_linux.cc \
+ src/core/lib/support/cpu_posix.cc \
+ src/core/lib/support/cpu_windows.cc \
+ src/core/lib/support/env_linux.cc \
+ src/core/lib/support/env_posix.cc \
+ src/core/lib/support/env_windows.cc \
+ src/core/lib/support/histogram.cc \
+ src/core/lib/support/host_port.cc \
+ src/core/lib/support/log.cc \
+ src/core/lib/support/log_android.cc \
+ src/core/lib/support/log_linux.cc \
+ src/core/lib/support/log_posix.cc \
+ src/core/lib/support/log_windows.cc \
+ src/core/lib/support/mpscq.cc \
+ src/core/lib/support/murmur_hash.cc \
+ src/core/lib/support/stack_lockfree.cc \
+ src/core/lib/support/string.cc \
+ src/core/lib/support/string_posix.cc \
+ src/core/lib/support/string_util_windows.cc \
+ src/core/lib/support/string_windows.cc \
+ src/core/lib/support/subprocess_posix.cc \
+ src/core/lib/support/subprocess_windows.cc \
+ src/core/lib/support/sync.cc \
+ src/core/lib/support/sync_posix.cc \
+ src/core/lib/support/sync_windows.cc \
+ src/core/lib/support/thd.cc \
+ src/core/lib/support/thd_posix.cc \
+ src/core/lib/support/thd_windows.cc \
+ src/core/lib/support/time.cc \
+ src/core/lib/support/time_posix.cc \
+ src/core/lib/support/time_precise.cc \
+ src/core/lib/support/time_windows.cc \
+ src/core/lib/support/tls_pthread.cc \
+ src/core/lib/support/tmpfile_msys.cc \
+ src/core/lib/support/tmpfile_posix.cc \
+ src/core/lib/support/tmpfile_windows.cc \
+ src/core/lib/support/wrap_memcpy.cc \
PUBLIC_HEADERS_C += \
include/grpc/support/alloc.h \
@@ -2945,268 +2944,269 @@ endif
LIBGRPC_SRC = \
- src/core/lib/surface/init.c \
- src/core/lib/channel/channel_args.c \
- src/core/lib/channel/channel_stack.c \
- src/core/lib/channel/channel_stack_builder.c \
- src/core/lib/channel/connected_channel.c \
- src/core/lib/channel/handshaker.c \
- src/core/lib/channel/handshaker_factory.c \
- src/core/lib/channel/handshaker_registry.c \
- src/core/lib/compression/compression.c \
- src/core/lib/compression/compression_internal.c \
- src/core/lib/compression/message_compress.c \
- src/core/lib/compression/stream_compression.c \
- src/core/lib/compression/stream_compression_gzip.c \
- src/core/lib/compression/stream_compression_identity.c \
- src/core/lib/debug/stats.c \
- src/core/lib/debug/stats_data.c \
- src/core/lib/http/format_request.c \
- src/core/lib/http/httpcli.c \
- src/core/lib/http/parser.c \
- src/core/lib/iomgr/call_combiner.c \
- src/core/lib/iomgr/closure.c \
- src/core/lib/iomgr/combiner.c \
- src/core/lib/iomgr/endpoint.c \
- src/core/lib/iomgr/endpoint_pair_posix.c \
- src/core/lib/iomgr/endpoint_pair_uv.c \
- src/core/lib/iomgr/endpoint_pair_windows.c \
- src/core/lib/iomgr/error.c \
- src/core/lib/iomgr/ev_epoll1_linux.c \
- src/core/lib/iomgr/ev_epollex_linux.c \
- src/core/lib/iomgr/ev_epollsig_linux.c \
- src/core/lib/iomgr/ev_poll_posix.c \
- src/core/lib/iomgr/ev_posix.c \
- src/core/lib/iomgr/ev_windows.c \
- src/core/lib/iomgr/exec_ctx.c \
- src/core/lib/iomgr/executor.c \
- src/core/lib/iomgr/gethostname_fallback.c \
- src/core/lib/iomgr/gethostname_host_name_max.c \
- src/core/lib/iomgr/gethostname_sysconf.c \
- src/core/lib/iomgr/iocp_windows.c \
- src/core/lib/iomgr/iomgr.c \
- src/core/lib/iomgr/iomgr_posix.c \
- src/core/lib/iomgr/iomgr_uv.c \
- src/core/lib/iomgr/iomgr_windows.c \
- src/core/lib/iomgr/is_epollexclusive_available.c \
- src/core/lib/iomgr/load_file.c \
- src/core/lib/iomgr/lockfree_event.c \
- src/core/lib/iomgr/network_status_tracker.c \
- src/core/lib/iomgr/polling_entity.c \
- src/core/lib/iomgr/pollset_set_uv.c \
- src/core/lib/iomgr/pollset_set_windows.c \
- src/core/lib/iomgr/pollset_uv.c \
- src/core/lib/iomgr/pollset_windows.c \
- src/core/lib/iomgr/resolve_address_posix.c \
- src/core/lib/iomgr/resolve_address_uv.c \
- src/core/lib/iomgr/resolve_address_windows.c \
- src/core/lib/iomgr/resource_quota.c \
- src/core/lib/iomgr/sockaddr_utils.c \
- src/core/lib/iomgr/socket_factory_posix.c \
- src/core/lib/iomgr/socket_mutator.c \
- src/core/lib/iomgr/socket_utils_common_posix.c \
- src/core/lib/iomgr/socket_utils_linux.c \
- src/core/lib/iomgr/socket_utils_posix.c \
- src/core/lib/iomgr/socket_utils_uv.c \
- src/core/lib/iomgr/socket_utils_windows.c \
- src/core/lib/iomgr/socket_windows.c \
- src/core/lib/iomgr/tcp_client_posix.c \
- src/core/lib/iomgr/tcp_client_uv.c \
- src/core/lib/iomgr/tcp_client_windows.c \
- src/core/lib/iomgr/tcp_posix.c \
- src/core/lib/iomgr/tcp_server_posix.c \
- src/core/lib/iomgr/tcp_server_utils_posix_common.c \
- src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c \
- src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c \
- src/core/lib/iomgr/tcp_server_uv.c \
- src/core/lib/iomgr/tcp_server_windows.c \
- src/core/lib/iomgr/tcp_uv.c \
- src/core/lib/iomgr/tcp_windows.c \
- src/core/lib/iomgr/time_averaged_stats.c \
- src/core/lib/iomgr/timer_generic.c \
- src/core/lib/iomgr/timer_heap.c \
- src/core/lib/iomgr/timer_manager.c \
- src/core/lib/iomgr/timer_uv.c \
- src/core/lib/iomgr/udp_server.c \
- src/core/lib/iomgr/unix_sockets_posix.c \
- src/core/lib/iomgr/unix_sockets_posix_noop.c \
- src/core/lib/iomgr/wakeup_fd_cv.c \
- src/core/lib/iomgr/wakeup_fd_eventfd.c \
- src/core/lib/iomgr/wakeup_fd_nospecial.c \
- src/core/lib/iomgr/wakeup_fd_pipe.c \
- src/core/lib/iomgr/wakeup_fd_posix.c \
- src/core/lib/json/json.c \
- src/core/lib/json/json_reader.c \
- src/core/lib/json/json_string.c \
- src/core/lib/json/json_writer.c \
- src/core/lib/slice/b64.c \
- src/core/lib/slice/percent_encoding.c \
- src/core/lib/slice/slice.c \
- src/core/lib/slice/slice_buffer.c \
- src/core/lib/slice/slice_hash_table.c \
- src/core/lib/slice/slice_intern.c \
- src/core/lib/slice/slice_string_helpers.c \
- src/core/lib/surface/alarm.c \
- src/core/lib/surface/api_trace.c \
- src/core/lib/surface/byte_buffer.c \
- src/core/lib/surface/byte_buffer_reader.c \
- src/core/lib/surface/call.c \
- src/core/lib/surface/call_details.c \
- src/core/lib/surface/call_log_batch.c \
- src/core/lib/surface/channel.c \
- src/core/lib/surface/channel_init.c \
- src/core/lib/surface/channel_ping.c \
- src/core/lib/surface/channel_stack_type.c \
- src/core/lib/surface/completion_queue.c \
- src/core/lib/surface/completion_queue_factory.c \
- src/core/lib/surface/event_string.c \
+ src/core/lib/surface/init.cc \
+ src/core/lib/backoff/backoff.cc \
+ src/core/lib/channel/channel_args.cc \
+ src/core/lib/channel/channel_stack.cc \
+ src/core/lib/channel/channel_stack_builder.cc \
+ src/core/lib/channel/connected_channel.cc \
+ src/core/lib/channel/handshaker.cc \
+ 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/message_compress.cc \
+ src/core/lib/compression/stream_compression.cc \
+ src/core/lib/compression/stream_compression_gzip.cc \
+ src/core/lib/compression/stream_compression_identity.cc \
+ src/core/lib/debug/stats.cc \
+ src/core/lib/debug/stats_data.cc \
+ src/core/lib/http/format_request.cc \
+ src/core/lib/http/httpcli.cc \
+ src/core/lib/http/parser.cc \
+ src/core/lib/iomgr/call_combiner.cc \
+ src/core/lib/iomgr/closure.cc \
+ src/core/lib/iomgr/combiner.cc \
+ src/core/lib/iomgr/endpoint.cc \
+ src/core/lib/iomgr/endpoint_pair_posix.cc \
+ src/core/lib/iomgr/endpoint_pair_uv.cc \
+ src/core/lib/iomgr/endpoint_pair_windows.cc \
+ src/core/lib/iomgr/error.cc \
+ src/core/lib/iomgr/ev_epoll1_linux.cc \
+ src/core/lib/iomgr/ev_epollex_linux.cc \
+ src/core/lib/iomgr/ev_epollsig_linux.cc \
+ src/core/lib/iomgr/ev_poll_posix.cc \
+ src/core/lib/iomgr/ev_posix.cc \
+ src/core/lib/iomgr/ev_windows.cc \
+ src/core/lib/iomgr/exec_ctx.cc \
+ src/core/lib/iomgr/executor.cc \
+ src/core/lib/iomgr/gethostname_fallback.cc \
+ src/core/lib/iomgr/gethostname_host_name_max.cc \
+ src/core/lib/iomgr/gethostname_sysconf.cc \
+ src/core/lib/iomgr/iocp_windows.cc \
+ src/core/lib/iomgr/iomgr.cc \
+ src/core/lib/iomgr/iomgr_posix.cc \
+ src/core/lib/iomgr/iomgr_uv.cc \
+ src/core/lib/iomgr/iomgr_windows.cc \
+ src/core/lib/iomgr/is_epollexclusive_available.cc \
+ src/core/lib/iomgr/load_file.cc \
+ src/core/lib/iomgr/lockfree_event.cc \
+ src/core/lib/iomgr/network_status_tracker.cc \
+ src/core/lib/iomgr/polling_entity.cc \
+ src/core/lib/iomgr/pollset_set_uv.cc \
+ src/core/lib/iomgr/pollset_set_windows.cc \
+ src/core/lib/iomgr/pollset_uv.cc \
+ src/core/lib/iomgr/pollset_windows.cc \
+ src/core/lib/iomgr/resolve_address_posix.cc \
+ src/core/lib/iomgr/resolve_address_uv.cc \
+ src/core/lib/iomgr/resolve_address_windows.cc \
+ src/core/lib/iomgr/resource_quota.cc \
+ src/core/lib/iomgr/sockaddr_utils.cc \
+ src/core/lib/iomgr/socket_factory_posix.cc \
+ src/core/lib/iomgr/socket_mutator.cc \
+ src/core/lib/iomgr/socket_utils_common_posix.cc \
+ src/core/lib/iomgr/socket_utils_linux.cc \
+ src/core/lib/iomgr/socket_utils_posix.cc \
+ src/core/lib/iomgr/socket_utils_uv.cc \
+ src/core/lib/iomgr/socket_utils_windows.cc \
+ src/core/lib/iomgr/socket_windows.cc \
+ src/core/lib/iomgr/tcp_client_posix.cc \
+ src/core/lib/iomgr/tcp_client_uv.cc \
+ src/core/lib/iomgr/tcp_client_windows.cc \
+ src/core/lib/iomgr/tcp_posix.cc \
+ src/core/lib/iomgr/tcp_server_posix.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_common.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
+ src/core/lib/iomgr/tcp_server_uv.cc \
+ src/core/lib/iomgr/tcp_server_windows.cc \
+ src/core/lib/iomgr/tcp_uv.cc \
+ src/core/lib/iomgr/tcp_windows.cc \
+ src/core/lib/iomgr/time_averaged_stats.cc \
+ src/core/lib/iomgr/timer_generic.cc \
+ src/core/lib/iomgr/timer_heap.cc \
+ src/core/lib/iomgr/timer_manager.cc \
+ src/core/lib/iomgr/timer_uv.cc \
+ src/core/lib/iomgr/udp_server.cc \
+ src/core/lib/iomgr/unix_sockets_posix.cc \
+ src/core/lib/iomgr/unix_sockets_posix_noop.cc \
+ src/core/lib/iomgr/wakeup_fd_cv.cc \
+ src/core/lib/iomgr/wakeup_fd_eventfd.cc \
+ src/core/lib/iomgr/wakeup_fd_nospecial.cc \
+ src/core/lib/iomgr/wakeup_fd_pipe.cc \
+ src/core/lib/iomgr/wakeup_fd_posix.cc \
+ src/core/lib/json/json.cc \
+ src/core/lib/json/json_reader.cc \
+ src/core/lib/json/json_string.cc \
+ src/core/lib/json/json_writer.cc \
+ src/core/lib/slice/b64.cc \
+ src/core/lib/slice/percent_encoding.cc \
+ src/core/lib/slice/slice.cc \
+ src/core/lib/slice/slice_buffer.cc \
+ src/core/lib/slice/slice_hash_table.cc \
+ src/core/lib/slice/slice_intern.cc \
+ src/core/lib/slice/slice_string_helpers.cc \
+ src/core/lib/surface/alarm.cc \
+ src/core/lib/surface/api_trace.cc \
+ src/core/lib/surface/byte_buffer.cc \
+ src/core/lib/surface/byte_buffer_reader.cc \
+ src/core/lib/surface/call.cc \
+ src/core/lib/surface/call_details.cc \
+ src/core/lib/surface/call_log_batch.cc \
+ src/core/lib/surface/channel.cc \
+ src/core/lib/surface/channel_init.cc \
+ src/core/lib/surface/channel_ping.cc \
+ src/core/lib/surface/channel_stack_type.cc \
+ src/core/lib/surface/completion_queue.cc \
+ src/core/lib/surface/completion_queue_factory.cc \
+ src/core/lib/surface/event_string.cc \
src/core/lib/surface/lame_client.cc \
- src/core/lib/surface/metadata_array.c \
- src/core/lib/surface/server.c \
- src/core/lib/surface/validate_metadata.c \
- src/core/lib/surface/version.c \
- src/core/lib/transport/bdp_estimator.c \
- src/core/lib/transport/byte_stream.c \
- src/core/lib/transport/connectivity_state.c \
- src/core/lib/transport/error_utils.c \
- src/core/lib/transport/metadata.c \
- src/core/lib/transport/metadata_batch.c \
- src/core/lib/transport/pid_controller.c \
- src/core/lib/transport/service_config.c \
- src/core/lib/transport/static_metadata.c \
- src/core/lib/transport/status_conversion.c \
- src/core/lib/transport/timeout_encoding.c \
- src/core/lib/transport/transport.c \
- src/core/lib/transport/transport_op_string.c \
- src/core/lib/debug/trace.c \
- src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c \
- src/core/ext/transport/chttp2/transport/bin_decoder.c \
- src/core/ext/transport/chttp2/transport/bin_encoder.c \
- src/core/ext/transport/chttp2/transport/chttp2_plugin.c \
- src/core/ext/transport/chttp2/transport/chttp2_transport.c \
- src/core/ext/transport/chttp2/transport/flow_control.c \
- src/core/ext/transport/chttp2/transport/frame_data.c \
- src/core/ext/transport/chttp2/transport/frame_goaway.c \
- src/core/ext/transport/chttp2/transport/frame_ping.c \
- src/core/ext/transport/chttp2/transport/frame_rst_stream.c \
- src/core/ext/transport/chttp2/transport/frame_settings.c \
- src/core/ext/transport/chttp2/transport/frame_window_update.c \
- src/core/ext/transport/chttp2/transport/hpack_encoder.c \
- src/core/ext/transport/chttp2/transport/hpack_parser.c \
- src/core/ext/transport/chttp2/transport/hpack_table.c \
- src/core/ext/transport/chttp2/transport/http2_settings.c \
- src/core/ext/transport/chttp2/transport/huffsyms.c \
- src/core/ext/transport/chttp2/transport/incoming_metadata.c \
- src/core/ext/transport/chttp2/transport/parsing.c \
- src/core/ext/transport/chttp2/transport/stream_lists.c \
- src/core/ext/transport/chttp2/transport/stream_map.c \
- src/core/ext/transport/chttp2/transport/varint.c \
- src/core/ext/transport/chttp2/transport/writing.c \
- src/core/ext/transport/chttp2/alpn/alpn.c \
- src/core/ext/filters/http/client/http_client_filter.c \
- src/core/ext/filters/http/http_filters_plugin.c \
- src/core/ext/filters/http/message_compress/message_compress_filter.c \
- src/core/ext/filters/http/server/http_server_filter.c \
- src/core/lib/http/httpcli_security_connector.c \
- src/core/lib/security/context/security_context.c \
- src/core/lib/security/credentials/composite/composite_credentials.c \
- src/core/lib/security/credentials/credentials.c \
- src/core/lib/security/credentials/credentials_metadata.c \
- src/core/lib/security/credentials/fake/fake_credentials.c \
- src/core/lib/security/credentials/google_default/credentials_generic.c \
- src/core/lib/security/credentials/google_default/google_default_credentials.c \
- src/core/lib/security/credentials/iam/iam_credentials.c \
- src/core/lib/security/credentials/jwt/json_token.c \
- src/core/lib/security/credentials/jwt/jwt_credentials.c \
- src/core/lib/security/credentials/jwt/jwt_verifier.c \
- src/core/lib/security/credentials/oauth2/oauth2_credentials.c \
- src/core/lib/security/credentials/plugin/plugin_credentials.c \
- src/core/lib/security/credentials/ssl/ssl_credentials.c \
- src/core/lib/security/transport/client_auth_filter.c \
- src/core/lib/security/transport/lb_targets_info.c \
- src/core/lib/security/transport/secure_endpoint.c \
- src/core/lib/security/transport/security_connector.c \
- src/core/lib/security/transport/security_handshaker.c \
- src/core/lib/security/transport/server_auth_filter.c \
- src/core/lib/security/transport/tsi_error.c \
- src/core/lib/security/util/json_util.c \
- src/core/lib/surface/init_secure.c \
- src/core/tsi/fake_transport_security.c \
- src/core/tsi/gts_transport_security.c \
- src/core/tsi/ssl_transport_security.c \
- src/core/tsi/transport_security_grpc.c \
- src/core/tsi/transport_security.c \
- src/core/tsi/transport_security_adapter.c \
- src/core/ext/transport/chttp2/server/chttp2_server.c \
- src/core/ext/transport/chttp2/client/secure/secure_channel_create.c \
- src/core/ext/filters/client_channel/channel_connectivity.c \
- src/core/ext/filters/client_channel/client_channel.c \
- src/core/ext/filters/client_channel/client_channel_factory.c \
- src/core/ext/filters/client_channel/client_channel_plugin.c \
- src/core/ext/filters/client_channel/connector.c \
- src/core/ext/filters/client_channel/http_connect_handshaker.c \
- src/core/ext/filters/client_channel/http_proxy.c \
- src/core/ext/filters/client_channel/lb_policy.c \
- src/core/ext/filters/client_channel/lb_policy_factory.c \
- src/core/ext/filters/client_channel/lb_policy_registry.c \
- src/core/ext/filters/client_channel/parse_address.c \
- src/core/ext/filters/client_channel/proxy_mapper.c \
- src/core/ext/filters/client_channel/proxy_mapper_registry.c \
- src/core/ext/filters/client_channel/resolver.c \
- src/core/ext/filters/client_channel/resolver_factory.c \
- src/core/ext/filters/client_channel/resolver_registry.c \
- src/core/ext/filters/client_channel/retry_throttle.c \
- src/core/ext/filters/client_channel/subchannel.c \
- src/core/ext/filters/client_channel/subchannel_index.c \
- src/core/ext/filters/client_channel/uri_parser.c \
- src/core/ext/filters/deadline/deadline_filter.c \
- src/core/ext/transport/chttp2/client/chttp2_connector.c \
- src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \
- src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \
- src/core/ext/transport/chttp2/client/insecure/channel_create.c \
- src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \
- src/core/ext/transport/inproc/inproc_plugin.c \
- src/core/ext/transport/inproc/inproc_transport.c \
- src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c \
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c \
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c \
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c \
- src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c \
+ src/core/lib/surface/metadata_array.cc \
+ src/core/lib/surface/server.cc \
+ src/core/lib/surface/validate_metadata.cc \
+ src/core/lib/surface/version.cc \
+ src/core/lib/transport/bdp_estimator.cc \
+ src/core/lib/transport/byte_stream.cc \
+ src/core/lib/transport/connectivity_state.cc \
+ src/core/lib/transport/error_utils.cc \
+ src/core/lib/transport/metadata.cc \
+ src/core/lib/transport/metadata_batch.cc \
+ src/core/lib/transport/pid_controller.cc \
+ src/core/lib/transport/service_config.cc \
+ src/core/lib/transport/static_metadata.cc \
+ src/core/lib/transport/status_conversion.cc \
+ src/core/lib/transport/timeout_encoding.cc \
+ src/core/lib/transport/transport.cc \
+ src/core/lib/transport/transport_op_string.cc \
+ src/core/lib/debug/trace.cc \
+ src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc \
+ src/core/ext/transport/chttp2/transport/bin_decoder.cc \
+ src/core/ext/transport/chttp2/transport/bin_encoder.cc \
+ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc \
+ src/core/ext/transport/chttp2/transport/chttp2_transport.cc \
+ src/core/ext/transport/chttp2/transport/flow_control.cc \
+ src/core/ext/transport/chttp2/transport/frame_data.cc \
+ src/core/ext/transport/chttp2/transport/frame_goaway.cc \
+ src/core/ext/transport/chttp2/transport/frame_ping.cc \
+ src/core/ext/transport/chttp2/transport/frame_rst_stream.cc \
+ src/core/ext/transport/chttp2/transport/frame_settings.cc \
+ src/core/ext/transport/chttp2/transport/frame_window_update.cc \
+ src/core/ext/transport/chttp2/transport/hpack_encoder.cc \
+ src/core/ext/transport/chttp2/transport/hpack_parser.cc \
+ src/core/ext/transport/chttp2/transport/hpack_table.cc \
+ src/core/ext/transport/chttp2/transport/http2_settings.cc \
+ src/core/ext/transport/chttp2/transport/huffsyms.cc \
+ src/core/ext/transport/chttp2/transport/incoming_metadata.cc \
+ src/core/ext/transport/chttp2/transport/parsing.cc \
+ src/core/ext/transport/chttp2/transport/stream_lists.cc \
+ src/core/ext/transport/chttp2/transport/stream_map.cc \
+ src/core/ext/transport/chttp2/transport/varint.cc \
+ src/core/ext/transport/chttp2/transport/writing.cc \
+ src/core/ext/transport/chttp2/alpn/alpn.cc \
+ src/core/ext/filters/http/client/http_client_filter.cc \
+ src/core/ext/filters/http/http_filters_plugin.cc \
+ src/core/ext/filters/http/message_compress/message_compress_filter.cc \
+ src/core/ext/filters/http/server/http_server_filter.cc \
+ src/core/lib/http/httpcli_security_connector.cc \
+ src/core/lib/security/context/security_context.cc \
+ src/core/lib/security/credentials/composite/composite_credentials.cc \
+ src/core/lib/security/credentials/credentials.cc \
+ src/core/lib/security/credentials/credentials_metadata.cc \
+ src/core/lib/security/credentials/fake/fake_credentials.cc \
+ src/core/lib/security/credentials/google_default/credentials_generic.cc \
+ src/core/lib/security/credentials/google_default/google_default_credentials.cc \
+ src/core/lib/security/credentials/iam/iam_credentials.cc \
+ src/core/lib/security/credentials/jwt/json_token.cc \
+ src/core/lib/security/credentials/jwt/jwt_credentials.cc \
+ src/core/lib/security/credentials/jwt/jwt_verifier.cc \
+ src/core/lib/security/credentials/oauth2/oauth2_credentials.cc \
+ src/core/lib/security/credentials/plugin/plugin_credentials.cc \
+ src/core/lib/security/credentials/ssl/ssl_credentials.cc \
+ src/core/lib/security/transport/client_auth_filter.cc \
+ src/core/lib/security/transport/lb_targets_info.cc \
+ src/core/lib/security/transport/secure_endpoint.cc \
+ src/core/lib/security/transport/security_connector.cc \
+ src/core/lib/security/transport/security_handshaker.cc \
+ src/core/lib/security/transport/server_auth_filter.cc \
+ 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/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 \
+ src/core/tsi/transport_security_adapter.cc \
+ src/core/ext/transport/chttp2/server/chttp2_server.cc \
+ src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc \
+ src/core/ext/filters/client_channel/channel_connectivity.cc \
+ src/core/ext/filters/client_channel/client_channel.cc \
+ src/core/ext/filters/client_channel/client_channel_factory.cc \
+ src/core/ext/filters/client_channel/client_channel_plugin.cc \
+ src/core/ext/filters/client_channel/connector.cc \
+ src/core/ext/filters/client_channel/http_connect_handshaker.cc \
+ src/core/ext/filters/client_channel/http_proxy.cc \
+ src/core/ext/filters/client_channel/lb_policy.cc \
+ src/core/ext/filters/client_channel/lb_policy_factory.cc \
+ src/core/ext/filters/client_channel/lb_policy_registry.cc \
+ src/core/ext/filters/client_channel/parse_address.cc \
+ src/core/ext/filters/client_channel/proxy_mapper.cc \
+ src/core/ext/filters/client_channel/proxy_mapper_registry.cc \
+ src/core/ext/filters/client_channel/resolver.cc \
+ src/core/ext/filters/client_channel/resolver_factory.cc \
+ src/core/ext/filters/client_channel/resolver_registry.cc \
+ src/core/ext/filters/client_channel/retry_throttle.cc \
+ src/core/ext/filters/client_channel/subchannel.cc \
+ src/core/ext/filters/client_channel/subchannel_index.cc \
+ src/core/ext/filters/client_channel/uri_parser.cc \
+ src/core/ext/filters/deadline/deadline_filter.cc \
+ src/core/ext/transport/chttp2/client/chttp2_connector.cc \
+ src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc \
+ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc \
+ src/core/ext/transport/chttp2/client/insecure/channel_create.cc \
+ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc \
+ src/core/ext/transport/inproc/inproc_plugin.cc \
+ src/core/ext/transport/inproc/inproc_transport.cc \
+ src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc \
+ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc \
+ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc \
+ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc \
+ src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc \
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \
third_party/nanopb/pb_common.c \
third_party/nanopb/pb_decode.c \
third_party/nanopb/pb_encode.c \
- src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c \
- src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c \
- src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c \
- src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c \
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c \
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c \
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c \
- src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c \
- src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c \
- src/core/ext/filters/load_reporting/server_load_reporting_filter.c \
- src/core/ext/filters/load_reporting/server_load_reporting_plugin.c \
- src/core/ext/census/base_resources.c \
- src/core/ext/census/context.c \
+ src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc \
+ src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc \
+ src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc \
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc \
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc \
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc \
+ src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc \
+ src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc \
+ src/core/ext/filters/load_reporting/server_load_reporting_filter.cc \
+ src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc \
+ src/core/ext/census/base_resources.cc \
+ src/core/ext/census/context.cc \
src/core/ext/census/gen/census.pb.c \
src/core/ext/census/gen/trace_context.pb.c \
- src/core/ext/census/grpc_context.c \
- src/core/ext/census/grpc_filter.c \
- src/core/ext/census/grpc_plugin.c \
- src/core/ext/census/initialize.c \
- src/core/ext/census/intrusive_hash_map.c \
- src/core/ext/census/mlog.c \
- src/core/ext/census/operation.c \
- src/core/ext/census/placeholders.c \
- src/core/ext/census/resource.c \
- src/core/ext/census/trace_context.c \
- src/core/ext/census/tracing.c \
- src/core/ext/filters/max_age/max_age_filter.c \
- src/core/ext/filters/message_size/message_size_filter.c \
- src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c \
- src/core/ext/filters/workarounds/workaround_utils.c \
- src/core/plugin_registry/grpc_plugin_registry.c \
+ src/core/ext/census/grpc_context.cc \
+ src/core/ext/census/grpc_filter.cc \
+ src/core/ext/census/grpc_plugin.cc \
+ src/core/ext/census/initialize.cc \
+ src/core/ext/census/intrusive_hash_map.cc \
+ src/core/ext/census/mlog.cc \
+ src/core/ext/census/operation.cc \
+ src/core/ext/census/placeholders.cc \
+ src/core/ext/census/resource.cc \
+ src/core/ext/census/trace_context.cc \
+ src/core/ext/census/tracing.cc \
+ src/core/ext/filters/max_age/max_age_filter.cc \
+ src/core/ext/filters/message_size/message_size_filter.cc \
+ src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc \
+ src/core/ext/filters/workarounds/workaround_utils.cc \
+ src/core/plugin_registry/grpc_plugin_registry.cc \
PUBLIC_HEADERS_C += \
include/grpc/impl/codegen/byte_buffer.h \
@@ -3297,226 +3297,227 @@ endif
LIBGRPC_CRONET_SRC = \
- src/core/lib/surface/init.c \
- src/core/lib/channel/channel_args.c \
- src/core/lib/channel/channel_stack.c \
- src/core/lib/channel/channel_stack_builder.c \
- src/core/lib/channel/connected_channel.c \
- src/core/lib/channel/handshaker.c \
- src/core/lib/channel/handshaker_factory.c \
- src/core/lib/channel/handshaker_registry.c \
- src/core/lib/compression/compression.c \
- src/core/lib/compression/compression_internal.c \
- src/core/lib/compression/message_compress.c \
- src/core/lib/compression/stream_compression.c \
- src/core/lib/compression/stream_compression_gzip.c \
- src/core/lib/compression/stream_compression_identity.c \
- src/core/lib/debug/stats.c \
- src/core/lib/debug/stats_data.c \
- src/core/lib/http/format_request.c \
- src/core/lib/http/httpcli.c \
- src/core/lib/http/parser.c \
- src/core/lib/iomgr/call_combiner.c \
- src/core/lib/iomgr/closure.c \
- src/core/lib/iomgr/combiner.c \
- src/core/lib/iomgr/endpoint.c \
- src/core/lib/iomgr/endpoint_pair_posix.c \
- src/core/lib/iomgr/endpoint_pair_uv.c \
- src/core/lib/iomgr/endpoint_pair_windows.c \
- src/core/lib/iomgr/error.c \
- src/core/lib/iomgr/ev_epoll1_linux.c \
- src/core/lib/iomgr/ev_epollex_linux.c \
- src/core/lib/iomgr/ev_epollsig_linux.c \
- src/core/lib/iomgr/ev_poll_posix.c \
- src/core/lib/iomgr/ev_posix.c \
- src/core/lib/iomgr/ev_windows.c \
- src/core/lib/iomgr/exec_ctx.c \
- src/core/lib/iomgr/executor.c \
- src/core/lib/iomgr/gethostname_fallback.c \
- src/core/lib/iomgr/gethostname_host_name_max.c \
- src/core/lib/iomgr/gethostname_sysconf.c \
- src/core/lib/iomgr/iocp_windows.c \
- src/core/lib/iomgr/iomgr.c \
- src/core/lib/iomgr/iomgr_posix.c \
- src/core/lib/iomgr/iomgr_uv.c \
- src/core/lib/iomgr/iomgr_windows.c \
- src/core/lib/iomgr/is_epollexclusive_available.c \
- src/core/lib/iomgr/load_file.c \
- src/core/lib/iomgr/lockfree_event.c \
- src/core/lib/iomgr/network_status_tracker.c \
- src/core/lib/iomgr/polling_entity.c \
- src/core/lib/iomgr/pollset_set_uv.c \
- src/core/lib/iomgr/pollset_set_windows.c \
- src/core/lib/iomgr/pollset_uv.c \
- src/core/lib/iomgr/pollset_windows.c \
- src/core/lib/iomgr/resolve_address_posix.c \
- src/core/lib/iomgr/resolve_address_uv.c \
- src/core/lib/iomgr/resolve_address_windows.c \
- src/core/lib/iomgr/resource_quota.c \
- src/core/lib/iomgr/sockaddr_utils.c \
- src/core/lib/iomgr/socket_factory_posix.c \
- src/core/lib/iomgr/socket_mutator.c \
- src/core/lib/iomgr/socket_utils_common_posix.c \
- src/core/lib/iomgr/socket_utils_linux.c \
- src/core/lib/iomgr/socket_utils_posix.c \
- src/core/lib/iomgr/socket_utils_uv.c \
- src/core/lib/iomgr/socket_utils_windows.c \
- src/core/lib/iomgr/socket_windows.c \
- src/core/lib/iomgr/tcp_client_posix.c \
- src/core/lib/iomgr/tcp_client_uv.c \
- src/core/lib/iomgr/tcp_client_windows.c \
- src/core/lib/iomgr/tcp_posix.c \
- src/core/lib/iomgr/tcp_server_posix.c \
- src/core/lib/iomgr/tcp_server_utils_posix_common.c \
- src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c \
- src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c \
- src/core/lib/iomgr/tcp_server_uv.c \
- src/core/lib/iomgr/tcp_server_windows.c \
- src/core/lib/iomgr/tcp_uv.c \
- src/core/lib/iomgr/tcp_windows.c \
- src/core/lib/iomgr/time_averaged_stats.c \
- src/core/lib/iomgr/timer_generic.c \
- src/core/lib/iomgr/timer_heap.c \
- src/core/lib/iomgr/timer_manager.c \
- src/core/lib/iomgr/timer_uv.c \
- src/core/lib/iomgr/udp_server.c \
- src/core/lib/iomgr/unix_sockets_posix.c \
- src/core/lib/iomgr/unix_sockets_posix_noop.c \
- src/core/lib/iomgr/wakeup_fd_cv.c \
- src/core/lib/iomgr/wakeup_fd_eventfd.c \
- src/core/lib/iomgr/wakeup_fd_nospecial.c \
- src/core/lib/iomgr/wakeup_fd_pipe.c \
- src/core/lib/iomgr/wakeup_fd_posix.c \
- src/core/lib/json/json.c \
- src/core/lib/json/json_reader.c \
- src/core/lib/json/json_string.c \
- src/core/lib/json/json_writer.c \
- src/core/lib/slice/b64.c \
- src/core/lib/slice/percent_encoding.c \
- src/core/lib/slice/slice.c \
- src/core/lib/slice/slice_buffer.c \
- src/core/lib/slice/slice_hash_table.c \
- src/core/lib/slice/slice_intern.c \
- src/core/lib/slice/slice_string_helpers.c \
- src/core/lib/surface/alarm.c \
- src/core/lib/surface/api_trace.c \
- src/core/lib/surface/byte_buffer.c \
- src/core/lib/surface/byte_buffer_reader.c \
- src/core/lib/surface/call.c \
- src/core/lib/surface/call_details.c \
- src/core/lib/surface/call_log_batch.c \
- src/core/lib/surface/channel.c \
- src/core/lib/surface/channel_init.c \
- src/core/lib/surface/channel_ping.c \
- src/core/lib/surface/channel_stack_type.c \
- src/core/lib/surface/completion_queue.c \
- src/core/lib/surface/completion_queue_factory.c \
- src/core/lib/surface/event_string.c \
+ src/core/lib/surface/init.cc \
+ src/core/lib/backoff/backoff.cc \
+ src/core/lib/channel/channel_args.cc \
+ src/core/lib/channel/channel_stack.cc \
+ src/core/lib/channel/channel_stack_builder.cc \
+ src/core/lib/channel/connected_channel.cc \
+ src/core/lib/channel/handshaker.cc \
+ 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/message_compress.cc \
+ src/core/lib/compression/stream_compression.cc \
+ src/core/lib/compression/stream_compression_gzip.cc \
+ src/core/lib/compression/stream_compression_identity.cc \
+ src/core/lib/debug/stats.cc \
+ src/core/lib/debug/stats_data.cc \
+ src/core/lib/http/format_request.cc \
+ src/core/lib/http/httpcli.cc \
+ src/core/lib/http/parser.cc \
+ src/core/lib/iomgr/call_combiner.cc \
+ src/core/lib/iomgr/closure.cc \
+ src/core/lib/iomgr/combiner.cc \
+ src/core/lib/iomgr/endpoint.cc \
+ src/core/lib/iomgr/endpoint_pair_posix.cc \
+ src/core/lib/iomgr/endpoint_pair_uv.cc \
+ src/core/lib/iomgr/endpoint_pair_windows.cc \
+ src/core/lib/iomgr/error.cc \
+ src/core/lib/iomgr/ev_epoll1_linux.cc \
+ src/core/lib/iomgr/ev_epollex_linux.cc \
+ src/core/lib/iomgr/ev_epollsig_linux.cc \
+ src/core/lib/iomgr/ev_poll_posix.cc \
+ src/core/lib/iomgr/ev_posix.cc \
+ src/core/lib/iomgr/ev_windows.cc \
+ src/core/lib/iomgr/exec_ctx.cc \
+ src/core/lib/iomgr/executor.cc \
+ src/core/lib/iomgr/gethostname_fallback.cc \
+ src/core/lib/iomgr/gethostname_host_name_max.cc \
+ src/core/lib/iomgr/gethostname_sysconf.cc \
+ src/core/lib/iomgr/iocp_windows.cc \
+ src/core/lib/iomgr/iomgr.cc \
+ src/core/lib/iomgr/iomgr_posix.cc \
+ src/core/lib/iomgr/iomgr_uv.cc \
+ src/core/lib/iomgr/iomgr_windows.cc \
+ src/core/lib/iomgr/is_epollexclusive_available.cc \
+ src/core/lib/iomgr/load_file.cc \
+ src/core/lib/iomgr/lockfree_event.cc \
+ src/core/lib/iomgr/network_status_tracker.cc \
+ src/core/lib/iomgr/polling_entity.cc \
+ src/core/lib/iomgr/pollset_set_uv.cc \
+ src/core/lib/iomgr/pollset_set_windows.cc \
+ src/core/lib/iomgr/pollset_uv.cc \
+ src/core/lib/iomgr/pollset_windows.cc \
+ src/core/lib/iomgr/resolve_address_posix.cc \
+ src/core/lib/iomgr/resolve_address_uv.cc \
+ src/core/lib/iomgr/resolve_address_windows.cc \
+ src/core/lib/iomgr/resource_quota.cc \
+ src/core/lib/iomgr/sockaddr_utils.cc \
+ src/core/lib/iomgr/socket_factory_posix.cc \
+ src/core/lib/iomgr/socket_mutator.cc \
+ src/core/lib/iomgr/socket_utils_common_posix.cc \
+ src/core/lib/iomgr/socket_utils_linux.cc \
+ src/core/lib/iomgr/socket_utils_posix.cc \
+ src/core/lib/iomgr/socket_utils_uv.cc \
+ src/core/lib/iomgr/socket_utils_windows.cc \
+ src/core/lib/iomgr/socket_windows.cc \
+ src/core/lib/iomgr/tcp_client_posix.cc \
+ src/core/lib/iomgr/tcp_client_uv.cc \
+ src/core/lib/iomgr/tcp_client_windows.cc \
+ src/core/lib/iomgr/tcp_posix.cc \
+ src/core/lib/iomgr/tcp_server_posix.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_common.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
+ src/core/lib/iomgr/tcp_server_uv.cc \
+ src/core/lib/iomgr/tcp_server_windows.cc \
+ src/core/lib/iomgr/tcp_uv.cc \
+ src/core/lib/iomgr/tcp_windows.cc \
+ src/core/lib/iomgr/time_averaged_stats.cc \
+ src/core/lib/iomgr/timer_generic.cc \
+ src/core/lib/iomgr/timer_heap.cc \
+ src/core/lib/iomgr/timer_manager.cc \
+ src/core/lib/iomgr/timer_uv.cc \
+ src/core/lib/iomgr/udp_server.cc \
+ src/core/lib/iomgr/unix_sockets_posix.cc \
+ src/core/lib/iomgr/unix_sockets_posix_noop.cc \
+ src/core/lib/iomgr/wakeup_fd_cv.cc \
+ src/core/lib/iomgr/wakeup_fd_eventfd.cc \
+ src/core/lib/iomgr/wakeup_fd_nospecial.cc \
+ src/core/lib/iomgr/wakeup_fd_pipe.cc \
+ src/core/lib/iomgr/wakeup_fd_posix.cc \
+ src/core/lib/json/json.cc \
+ src/core/lib/json/json_reader.cc \
+ src/core/lib/json/json_string.cc \
+ src/core/lib/json/json_writer.cc \
+ src/core/lib/slice/b64.cc \
+ src/core/lib/slice/percent_encoding.cc \
+ src/core/lib/slice/slice.cc \
+ src/core/lib/slice/slice_buffer.cc \
+ src/core/lib/slice/slice_hash_table.cc \
+ src/core/lib/slice/slice_intern.cc \
+ src/core/lib/slice/slice_string_helpers.cc \
+ src/core/lib/surface/alarm.cc \
+ src/core/lib/surface/api_trace.cc \
+ src/core/lib/surface/byte_buffer.cc \
+ src/core/lib/surface/byte_buffer_reader.cc \
+ src/core/lib/surface/call.cc \
+ src/core/lib/surface/call_details.cc \
+ src/core/lib/surface/call_log_batch.cc \
+ src/core/lib/surface/channel.cc \
+ src/core/lib/surface/channel_init.cc \
+ src/core/lib/surface/channel_ping.cc \
+ src/core/lib/surface/channel_stack_type.cc \
+ src/core/lib/surface/completion_queue.cc \
+ src/core/lib/surface/completion_queue_factory.cc \
+ src/core/lib/surface/event_string.cc \
src/core/lib/surface/lame_client.cc \
- src/core/lib/surface/metadata_array.c \
- src/core/lib/surface/server.c \
- src/core/lib/surface/validate_metadata.c \
- src/core/lib/surface/version.c \
- src/core/lib/transport/bdp_estimator.c \
- src/core/lib/transport/byte_stream.c \
- src/core/lib/transport/connectivity_state.c \
- src/core/lib/transport/error_utils.c \
- src/core/lib/transport/metadata.c \
- src/core/lib/transport/metadata_batch.c \
- src/core/lib/transport/pid_controller.c \
- src/core/lib/transport/service_config.c \
- src/core/lib/transport/static_metadata.c \
- src/core/lib/transport/status_conversion.c \
- src/core/lib/transport/timeout_encoding.c \
- src/core/lib/transport/transport.c \
- src/core/lib/transport/transport_op_string.c \
- src/core/lib/debug/trace.c \
- src/core/ext/transport/cronet/client/secure/cronet_channel_create.c \
- src/core/ext/transport/cronet/transport/cronet_api_dummy.c \
- src/core/ext/transport/cronet/transport/cronet_transport.c \
- src/core/ext/transport/chttp2/client/secure/secure_channel_create.c \
- src/core/ext/transport/chttp2/transport/bin_decoder.c \
- src/core/ext/transport/chttp2/transport/bin_encoder.c \
- src/core/ext/transport/chttp2/transport/chttp2_plugin.c \
- src/core/ext/transport/chttp2/transport/chttp2_transport.c \
- src/core/ext/transport/chttp2/transport/flow_control.c \
- src/core/ext/transport/chttp2/transport/frame_data.c \
- src/core/ext/transport/chttp2/transport/frame_goaway.c \
- src/core/ext/transport/chttp2/transport/frame_ping.c \
- src/core/ext/transport/chttp2/transport/frame_rst_stream.c \
- src/core/ext/transport/chttp2/transport/frame_settings.c \
- src/core/ext/transport/chttp2/transport/frame_window_update.c \
- src/core/ext/transport/chttp2/transport/hpack_encoder.c \
- src/core/ext/transport/chttp2/transport/hpack_parser.c \
- src/core/ext/transport/chttp2/transport/hpack_table.c \
- src/core/ext/transport/chttp2/transport/http2_settings.c \
- src/core/ext/transport/chttp2/transport/huffsyms.c \
- src/core/ext/transport/chttp2/transport/incoming_metadata.c \
- src/core/ext/transport/chttp2/transport/parsing.c \
- src/core/ext/transport/chttp2/transport/stream_lists.c \
- src/core/ext/transport/chttp2/transport/stream_map.c \
- src/core/ext/transport/chttp2/transport/varint.c \
- src/core/ext/transport/chttp2/transport/writing.c \
- src/core/ext/transport/chttp2/alpn/alpn.c \
- src/core/ext/filters/http/client/http_client_filter.c \
- src/core/ext/filters/http/http_filters_plugin.c \
- src/core/ext/filters/http/message_compress/message_compress_filter.c \
- src/core/ext/filters/http/server/http_server_filter.c \
- src/core/ext/filters/client_channel/channel_connectivity.c \
- src/core/ext/filters/client_channel/client_channel.c \
- src/core/ext/filters/client_channel/client_channel_factory.c \
- src/core/ext/filters/client_channel/client_channel_plugin.c \
- src/core/ext/filters/client_channel/connector.c \
- src/core/ext/filters/client_channel/http_connect_handshaker.c \
- src/core/ext/filters/client_channel/http_proxy.c \
- src/core/ext/filters/client_channel/lb_policy.c \
- src/core/ext/filters/client_channel/lb_policy_factory.c \
- src/core/ext/filters/client_channel/lb_policy_registry.c \
- src/core/ext/filters/client_channel/parse_address.c \
- src/core/ext/filters/client_channel/proxy_mapper.c \
- src/core/ext/filters/client_channel/proxy_mapper_registry.c \
- src/core/ext/filters/client_channel/resolver.c \
- src/core/ext/filters/client_channel/resolver_factory.c \
- src/core/ext/filters/client_channel/resolver_registry.c \
- src/core/ext/filters/client_channel/retry_throttle.c \
- src/core/ext/filters/client_channel/subchannel.c \
- src/core/ext/filters/client_channel/subchannel_index.c \
- src/core/ext/filters/client_channel/uri_parser.c \
- src/core/ext/filters/deadline/deadline_filter.c \
- src/core/lib/http/httpcli_security_connector.c \
- src/core/lib/security/context/security_context.c \
- src/core/lib/security/credentials/composite/composite_credentials.c \
- src/core/lib/security/credentials/credentials.c \
- src/core/lib/security/credentials/credentials_metadata.c \
- src/core/lib/security/credentials/fake/fake_credentials.c \
- src/core/lib/security/credentials/google_default/credentials_generic.c \
- src/core/lib/security/credentials/google_default/google_default_credentials.c \
- src/core/lib/security/credentials/iam/iam_credentials.c \
- src/core/lib/security/credentials/jwt/json_token.c \
- src/core/lib/security/credentials/jwt/jwt_credentials.c \
- src/core/lib/security/credentials/jwt/jwt_verifier.c \
- src/core/lib/security/credentials/oauth2/oauth2_credentials.c \
- src/core/lib/security/credentials/plugin/plugin_credentials.c \
- src/core/lib/security/credentials/ssl/ssl_credentials.c \
- src/core/lib/security/transport/client_auth_filter.c \
- src/core/lib/security/transport/lb_targets_info.c \
- src/core/lib/security/transport/secure_endpoint.c \
- src/core/lib/security/transport/security_connector.c \
- src/core/lib/security/transport/security_handshaker.c \
- src/core/lib/security/transport/server_auth_filter.c \
- src/core/lib/security/transport/tsi_error.c \
- src/core/lib/security/util/json_util.c \
- src/core/lib/surface/init_secure.c \
- src/core/tsi/fake_transport_security.c \
- src/core/tsi/gts_transport_security.c \
- src/core/tsi/ssl_transport_security.c \
- src/core/tsi/transport_security_grpc.c \
- src/core/tsi/transport_security.c \
- src/core/tsi/transport_security_adapter.c \
- src/core/ext/transport/chttp2/client/chttp2_connector.c \
- src/core/ext/filters/load_reporting/server_load_reporting_filter.c \
- src/core/ext/filters/load_reporting/server_load_reporting_plugin.c \
- src/core/plugin_registry/grpc_cronet_plugin_registry.c \
+ src/core/lib/surface/metadata_array.cc \
+ src/core/lib/surface/server.cc \
+ src/core/lib/surface/validate_metadata.cc \
+ src/core/lib/surface/version.cc \
+ src/core/lib/transport/bdp_estimator.cc \
+ src/core/lib/transport/byte_stream.cc \
+ src/core/lib/transport/connectivity_state.cc \
+ src/core/lib/transport/error_utils.cc \
+ src/core/lib/transport/metadata.cc \
+ src/core/lib/transport/metadata_batch.cc \
+ src/core/lib/transport/pid_controller.cc \
+ src/core/lib/transport/service_config.cc \
+ src/core/lib/transport/static_metadata.cc \
+ src/core/lib/transport/status_conversion.cc \
+ src/core/lib/transport/timeout_encoding.cc \
+ src/core/lib/transport/transport.cc \
+ src/core/lib/transport/transport_op_string.cc \
+ src/core/lib/debug/trace.cc \
+ src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc \
+ src/core/ext/transport/cronet/transport/cronet_api_dummy.cc \
+ src/core/ext/transport/cronet/transport/cronet_transport.cc \
+ src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc \
+ src/core/ext/transport/chttp2/transport/bin_decoder.cc \
+ src/core/ext/transport/chttp2/transport/bin_encoder.cc \
+ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc \
+ src/core/ext/transport/chttp2/transport/chttp2_transport.cc \
+ src/core/ext/transport/chttp2/transport/flow_control.cc \
+ src/core/ext/transport/chttp2/transport/frame_data.cc \
+ src/core/ext/transport/chttp2/transport/frame_goaway.cc \
+ src/core/ext/transport/chttp2/transport/frame_ping.cc \
+ src/core/ext/transport/chttp2/transport/frame_rst_stream.cc \
+ src/core/ext/transport/chttp2/transport/frame_settings.cc \
+ src/core/ext/transport/chttp2/transport/frame_window_update.cc \
+ src/core/ext/transport/chttp2/transport/hpack_encoder.cc \
+ src/core/ext/transport/chttp2/transport/hpack_parser.cc \
+ src/core/ext/transport/chttp2/transport/hpack_table.cc \
+ src/core/ext/transport/chttp2/transport/http2_settings.cc \
+ src/core/ext/transport/chttp2/transport/huffsyms.cc \
+ src/core/ext/transport/chttp2/transport/incoming_metadata.cc \
+ src/core/ext/transport/chttp2/transport/parsing.cc \
+ src/core/ext/transport/chttp2/transport/stream_lists.cc \
+ src/core/ext/transport/chttp2/transport/stream_map.cc \
+ src/core/ext/transport/chttp2/transport/varint.cc \
+ src/core/ext/transport/chttp2/transport/writing.cc \
+ src/core/ext/transport/chttp2/alpn/alpn.cc \
+ src/core/ext/filters/http/client/http_client_filter.cc \
+ src/core/ext/filters/http/http_filters_plugin.cc \
+ src/core/ext/filters/http/message_compress/message_compress_filter.cc \
+ src/core/ext/filters/http/server/http_server_filter.cc \
+ src/core/ext/filters/client_channel/channel_connectivity.cc \
+ src/core/ext/filters/client_channel/client_channel.cc \
+ src/core/ext/filters/client_channel/client_channel_factory.cc \
+ src/core/ext/filters/client_channel/client_channel_plugin.cc \
+ src/core/ext/filters/client_channel/connector.cc \
+ src/core/ext/filters/client_channel/http_connect_handshaker.cc \
+ src/core/ext/filters/client_channel/http_proxy.cc \
+ src/core/ext/filters/client_channel/lb_policy.cc \
+ src/core/ext/filters/client_channel/lb_policy_factory.cc \
+ src/core/ext/filters/client_channel/lb_policy_registry.cc \
+ src/core/ext/filters/client_channel/parse_address.cc \
+ src/core/ext/filters/client_channel/proxy_mapper.cc \
+ src/core/ext/filters/client_channel/proxy_mapper_registry.cc \
+ src/core/ext/filters/client_channel/resolver.cc \
+ src/core/ext/filters/client_channel/resolver_factory.cc \
+ src/core/ext/filters/client_channel/resolver_registry.cc \
+ src/core/ext/filters/client_channel/retry_throttle.cc \
+ src/core/ext/filters/client_channel/subchannel.cc \
+ src/core/ext/filters/client_channel/subchannel_index.cc \
+ src/core/ext/filters/client_channel/uri_parser.cc \
+ src/core/ext/filters/deadline/deadline_filter.cc \
+ src/core/lib/http/httpcli_security_connector.cc \
+ src/core/lib/security/context/security_context.cc \
+ src/core/lib/security/credentials/composite/composite_credentials.cc \
+ src/core/lib/security/credentials/credentials.cc \
+ src/core/lib/security/credentials/credentials_metadata.cc \
+ src/core/lib/security/credentials/fake/fake_credentials.cc \
+ src/core/lib/security/credentials/google_default/credentials_generic.cc \
+ src/core/lib/security/credentials/google_default/google_default_credentials.cc \
+ src/core/lib/security/credentials/iam/iam_credentials.cc \
+ src/core/lib/security/credentials/jwt/json_token.cc \
+ src/core/lib/security/credentials/jwt/jwt_credentials.cc \
+ src/core/lib/security/credentials/jwt/jwt_verifier.cc \
+ src/core/lib/security/credentials/oauth2/oauth2_credentials.cc \
+ src/core/lib/security/credentials/plugin/plugin_credentials.cc \
+ src/core/lib/security/credentials/ssl/ssl_credentials.cc \
+ src/core/lib/security/transport/client_auth_filter.cc \
+ src/core/lib/security/transport/lb_targets_info.cc \
+ src/core/lib/security/transport/secure_endpoint.cc \
+ src/core/lib/security/transport/security_connector.cc \
+ src/core/lib/security/transport/security_handshaker.cc \
+ src/core/lib/security/transport/server_auth_filter.cc \
+ 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/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 \
+ src/core/tsi/transport_security_adapter.cc \
+ src/core/ext/transport/chttp2/client/chttp2_connector.cc \
+ src/core/ext/filters/load_reporting/server_load_reporting_filter.cc \
+ src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc \
+ src/core/plugin_registry/grpc_cronet_plugin_registry.cc \
PUBLIC_HEADERS_C += \
include/grpc/impl/codegen/byte_buffer.h \
@@ -3602,7 +3603,7 @@ LIBGRPC_TEST_UTIL_SRC = \
test/core/end2end/data/server1_key.c \
test/core/end2end/data/test_root_cert.c \
test/core/security/oauth2_utils.c \
- src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c \
+ src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc \
test/core/end2end/cq_verifier.c \
test/core/end2end/fixtures/http_proxy_fixture.c \
test/core/end2end/fixtures/proxy.c \
@@ -3617,187 +3618,188 @@ LIBGRPC_TEST_UTIL_SRC = \
test/core/util/port_server_client.c \
test/core/util/slice_splitter.c \
test/core/util/trickle_endpoint.c \
- src/core/lib/channel/channel_args.c \
- src/core/lib/channel/channel_stack.c \
- src/core/lib/channel/channel_stack_builder.c \
- src/core/lib/channel/connected_channel.c \
- src/core/lib/channel/handshaker.c \
- src/core/lib/channel/handshaker_factory.c \
- src/core/lib/channel/handshaker_registry.c \
- src/core/lib/compression/compression.c \
- src/core/lib/compression/compression_internal.c \
- src/core/lib/compression/message_compress.c \
- src/core/lib/compression/stream_compression.c \
- src/core/lib/compression/stream_compression_gzip.c \
- src/core/lib/compression/stream_compression_identity.c \
- src/core/lib/debug/stats.c \
- src/core/lib/debug/stats_data.c \
- src/core/lib/http/format_request.c \
- src/core/lib/http/httpcli.c \
- src/core/lib/http/parser.c \
- src/core/lib/iomgr/call_combiner.c \
- src/core/lib/iomgr/closure.c \
- src/core/lib/iomgr/combiner.c \
- src/core/lib/iomgr/endpoint.c \
- src/core/lib/iomgr/endpoint_pair_posix.c \
- src/core/lib/iomgr/endpoint_pair_uv.c \
- src/core/lib/iomgr/endpoint_pair_windows.c \
- src/core/lib/iomgr/error.c \
- src/core/lib/iomgr/ev_epoll1_linux.c \
- src/core/lib/iomgr/ev_epollex_linux.c \
- src/core/lib/iomgr/ev_epollsig_linux.c \
- src/core/lib/iomgr/ev_poll_posix.c \
- src/core/lib/iomgr/ev_posix.c \
- src/core/lib/iomgr/ev_windows.c \
- src/core/lib/iomgr/exec_ctx.c \
- src/core/lib/iomgr/executor.c \
- src/core/lib/iomgr/gethostname_fallback.c \
- src/core/lib/iomgr/gethostname_host_name_max.c \
- src/core/lib/iomgr/gethostname_sysconf.c \
- src/core/lib/iomgr/iocp_windows.c \
- src/core/lib/iomgr/iomgr.c \
- src/core/lib/iomgr/iomgr_posix.c \
- src/core/lib/iomgr/iomgr_uv.c \
- src/core/lib/iomgr/iomgr_windows.c \
- src/core/lib/iomgr/is_epollexclusive_available.c \
- src/core/lib/iomgr/load_file.c \
- src/core/lib/iomgr/lockfree_event.c \
- src/core/lib/iomgr/network_status_tracker.c \
- src/core/lib/iomgr/polling_entity.c \
- src/core/lib/iomgr/pollset_set_uv.c \
- src/core/lib/iomgr/pollset_set_windows.c \
- src/core/lib/iomgr/pollset_uv.c \
- src/core/lib/iomgr/pollset_windows.c \
- src/core/lib/iomgr/resolve_address_posix.c \
- src/core/lib/iomgr/resolve_address_uv.c \
- src/core/lib/iomgr/resolve_address_windows.c \
- src/core/lib/iomgr/resource_quota.c \
- src/core/lib/iomgr/sockaddr_utils.c \
- src/core/lib/iomgr/socket_factory_posix.c \
- src/core/lib/iomgr/socket_mutator.c \
- src/core/lib/iomgr/socket_utils_common_posix.c \
- src/core/lib/iomgr/socket_utils_linux.c \
- src/core/lib/iomgr/socket_utils_posix.c \
- src/core/lib/iomgr/socket_utils_uv.c \
- src/core/lib/iomgr/socket_utils_windows.c \
- src/core/lib/iomgr/socket_windows.c \
- src/core/lib/iomgr/tcp_client_posix.c \
- src/core/lib/iomgr/tcp_client_uv.c \
- src/core/lib/iomgr/tcp_client_windows.c \
- src/core/lib/iomgr/tcp_posix.c \
- src/core/lib/iomgr/tcp_server_posix.c \
- src/core/lib/iomgr/tcp_server_utils_posix_common.c \
- src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c \
- src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c \
- src/core/lib/iomgr/tcp_server_uv.c \
- src/core/lib/iomgr/tcp_server_windows.c \
- src/core/lib/iomgr/tcp_uv.c \
- src/core/lib/iomgr/tcp_windows.c \
- src/core/lib/iomgr/time_averaged_stats.c \
- src/core/lib/iomgr/timer_generic.c \
- src/core/lib/iomgr/timer_heap.c \
- src/core/lib/iomgr/timer_manager.c \
- src/core/lib/iomgr/timer_uv.c \
- src/core/lib/iomgr/udp_server.c \
- src/core/lib/iomgr/unix_sockets_posix.c \
- src/core/lib/iomgr/unix_sockets_posix_noop.c \
- src/core/lib/iomgr/wakeup_fd_cv.c \
- src/core/lib/iomgr/wakeup_fd_eventfd.c \
- src/core/lib/iomgr/wakeup_fd_nospecial.c \
- src/core/lib/iomgr/wakeup_fd_pipe.c \
- src/core/lib/iomgr/wakeup_fd_posix.c \
- src/core/lib/json/json.c \
- src/core/lib/json/json_reader.c \
- src/core/lib/json/json_string.c \
- src/core/lib/json/json_writer.c \
- src/core/lib/slice/b64.c \
- src/core/lib/slice/percent_encoding.c \
- src/core/lib/slice/slice.c \
- src/core/lib/slice/slice_buffer.c \
- src/core/lib/slice/slice_hash_table.c \
- src/core/lib/slice/slice_intern.c \
- src/core/lib/slice/slice_string_helpers.c \
- src/core/lib/surface/alarm.c \
- src/core/lib/surface/api_trace.c \
- src/core/lib/surface/byte_buffer.c \
- src/core/lib/surface/byte_buffer_reader.c \
- src/core/lib/surface/call.c \
- src/core/lib/surface/call_details.c \
- src/core/lib/surface/call_log_batch.c \
- src/core/lib/surface/channel.c \
- src/core/lib/surface/channel_init.c \
- src/core/lib/surface/channel_ping.c \
- src/core/lib/surface/channel_stack_type.c \
- src/core/lib/surface/completion_queue.c \
- src/core/lib/surface/completion_queue_factory.c \
- src/core/lib/surface/event_string.c \
+ src/core/lib/backoff/backoff.cc \
+ src/core/lib/channel/channel_args.cc \
+ src/core/lib/channel/channel_stack.cc \
+ src/core/lib/channel/channel_stack_builder.cc \
+ src/core/lib/channel/connected_channel.cc \
+ src/core/lib/channel/handshaker.cc \
+ 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/message_compress.cc \
+ src/core/lib/compression/stream_compression.cc \
+ src/core/lib/compression/stream_compression_gzip.cc \
+ src/core/lib/compression/stream_compression_identity.cc \
+ src/core/lib/debug/stats.cc \
+ src/core/lib/debug/stats_data.cc \
+ src/core/lib/http/format_request.cc \
+ src/core/lib/http/httpcli.cc \
+ src/core/lib/http/parser.cc \
+ src/core/lib/iomgr/call_combiner.cc \
+ src/core/lib/iomgr/closure.cc \
+ src/core/lib/iomgr/combiner.cc \
+ src/core/lib/iomgr/endpoint.cc \
+ src/core/lib/iomgr/endpoint_pair_posix.cc \
+ src/core/lib/iomgr/endpoint_pair_uv.cc \
+ src/core/lib/iomgr/endpoint_pair_windows.cc \
+ src/core/lib/iomgr/error.cc \
+ src/core/lib/iomgr/ev_epoll1_linux.cc \
+ src/core/lib/iomgr/ev_epollex_linux.cc \
+ src/core/lib/iomgr/ev_epollsig_linux.cc \
+ src/core/lib/iomgr/ev_poll_posix.cc \
+ src/core/lib/iomgr/ev_posix.cc \
+ src/core/lib/iomgr/ev_windows.cc \
+ src/core/lib/iomgr/exec_ctx.cc \
+ src/core/lib/iomgr/executor.cc \
+ src/core/lib/iomgr/gethostname_fallback.cc \
+ src/core/lib/iomgr/gethostname_host_name_max.cc \
+ src/core/lib/iomgr/gethostname_sysconf.cc \
+ src/core/lib/iomgr/iocp_windows.cc \
+ src/core/lib/iomgr/iomgr.cc \
+ src/core/lib/iomgr/iomgr_posix.cc \
+ src/core/lib/iomgr/iomgr_uv.cc \
+ src/core/lib/iomgr/iomgr_windows.cc \
+ src/core/lib/iomgr/is_epollexclusive_available.cc \
+ src/core/lib/iomgr/load_file.cc \
+ src/core/lib/iomgr/lockfree_event.cc \
+ src/core/lib/iomgr/network_status_tracker.cc \
+ src/core/lib/iomgr/polling_entity.cc \
+ src/core/lib/iomgr/pollset_set_uv.cc \
+ src/core/lib/iomgr/pollset_set_windows.cc \
+ src/core/lib/iomgr/pollset_uv.cc \
+ src/core/lib/iomgr/pollset_windows.cc \
+ src/core/lib/iomgr/resolve_address_posix.cc \
+ src/core/lib/iomgr/resolve_address_uv.cc \
+ src/core/lib/iomgr/resolve_address_windows.cc \
+ src/core/lib/iomgr/resource_quota.cc \
+ src/core/lib/iomgr/sockaddr_utils.cc \
+ src/core/lib/iomgr/socket_factory_posix.cc \
+ src/core/lib/iomgr/socket_mutator.cc \
+ src/core/lib/iomgr/socket_utils_common_posix.cc \
+ src/core/lib/iomgr/socket_utils_linux.cc \
+ src/core/lib/iomgr/socket_utils_posix.cc \
+ src/core/lib/iomgr/socket_utils_uv.cc \
+ src/core/lib/iomgr/socket_utils_windows.cc \
+ src/core/lib/iomgr/socket_windows.cc \
+ src/core/lib/iomgr/tcp_client_posix.cc \
+ src/core/lib/iomgr/tcp_client_uv.cc \
+ src/core/lib/iomgr/tcp_client_windows.cc \
+ src/core/lib/iomgr/tcp_posix.cc \
+ src/core/lib/iomgr/tcp_server_posix.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_common.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
+ src/core/lib/iomgr/tcp_server_uv.cc \
+ src/core/lib/iomgr/tcp_server_windows.cc \
+ src/core/lib/iomgr/tcp_uv.cc \
+ src/core/lib/iomgr/tcp_windows.cc \
+ src/core/lib/iomgr/time_averaged_stats.cc \
+ src/core/lib/iomgr/timer_generic.cc \
+ src/core/lib/iomgr/timer_heap.cc \
+ src/core/lib/iomgr/timer_manager.cc \
+ src/core/lib/iomgr/timer_uv.cc \
+ src/core/lib/iomgr/udp_server.cc \
+ src/core/lib/iomgr/unix_sockets_posix.cc \
+ src/core/lib/iomgr/unix_sockets_posix_noop.cc \
+ src/core/lib/iomgr/wakeup_fd_cv.cc \
+ src/core/lib/iomgr/wakeup_fd_eventfd.cc \
+ src/core/lib/iomgr/wakeup_fd_nospecial.cc \
+ src/core/lib/iomgr/wakeup_fd_pipe.cc \
+ src/core/lib/iomgr/wakeup_fd_posix.cc \
+ src/core/lib/json/json.cc \
+ src/core/lib/json/json_reader.cc \
+ src/core/lib/json/json_string.cc \
+ src/core/lib/json/json_writer.cc \
+ src/core/lib/slice/b64.cc \
+ src/core/lib/slice/percent_encoding.cc \
+ src/core/lib/slice/slice.cc \
+ src/core/lib/slice/slice_buffer.cc \
+ src/core/lib/slice/slice_hash_table.cc \
+ src/core/lib/slice/slice_intern.cc \
+ src/core/lib/slice/slice_string_helpers.cc \
+ src/core/lib/surface/alarm.cc \
+ src/core/lib/surface/api_trace.cc \
+ src/core/lib/surface/byte_buffer.cc \
+ src/core/lib/surface/byte_buffer_reader.cc \
+ src/core/lib/surface/call.cc \
+ src/core/lib/surface/call_details.cc \
+ src/core/lib/surface/call_log_batch.cc \
+ src/core/lib/surface/channel.cc \
+ src/core/lib/surface/channel_init.cc \
+ src/core/lib/surface/channel_ping.cc \
+ src/core/lib/surface/channel_stack_type.cc \
+ src/core/lib/surface/completion_queue.cc \
+ src/core/lib/surface/completion_queue_factory.cc \
+ src/core/lib/surface/event_string.cc \
src/core/lib/surface/lame_client.cc \
- src/core/lib/surface/metadata_array.c \
- src/core/lib/surface/server.c \
- src/core/lib/surface/validate_metadata.c \
- src/core/lib/surface/version.c \
- src/core/lib/transport/bdp_estimator.c \
- src/core/lib/transport/byte_stream.c \
- src/core/lib/transport/connectivity_state.c \
- src/core/lib/transport/error_utils.c \
- src/core/lib/transport/metadata.c \
- src/core/lib/transport/metadata_batch.c \
- src/core/lib/transport/pid_controller.c \
- src/core/lib/transport/service_config.c \
- src/core/lib/transport/static_metadata.c \
- src/core/lib/transport/status_conversion.c \
- src/core/lib/transport/timeout_encoding.c \
- src/core/lib/transport/transport.c \
- src/core/lib/transport/transport_op_string.c \
- src/core/lib/debug/trace.c \
- src/core/ext/filters/client_channel/channel_connectivity.c \
- src/core/ext/filters/client_channel/client_channel.c \
- src/core/ext/filters/client_channel/client_channel_factory.c \
- src/core/ext/filters/client_channel/client_channel_plugin.c \
- src/core/ext/filters/client_channel/connector.c \
- src/core/ext/filters/client_channel/http_connect_handshaker.c \
- src/core/ext/filters/client_channel/http_proxy.c \
- src/core/ext/filters/client_channel/lb_policy.c \
- src/core/ext/filters/client_channel/lb_policy_factory.c \
- src/core/ext/filters/client_channel/lb_policy_registry.c \
- src/core/ext/filters/client_channel/parse_address.c \
- src/core/ext/filters/client_channel/proxy_mapper.c \
- src/core/ext/filters/client_channel/proxy_mapper_registry.c \
- src/core/ext/filters/client_channel/resolver.c \
- src/core/ext/filters/client_channel/resolver_factory.c \
- src/core/ext/filters/client_channel/resolver_registry.c \
- src/core/ext/filters/client_channel/retry_throttle.c \
- src/core/ext/filters/client_channel/subchannel.c \
- src/core/ext/filters/client_channel/subchannel_index.c \
- src/core/ext/filters/client_channel/uri_parser.c \
- src/core/ext/filters/deadline/deadline_filter.c \
- src/core/ext/transport/chttp2/transport/bin_decoder.c \
- src/core/ext/transport/chttp2/transport/bin_encoder.c \
- src/core/ext/transport/chttp2/transport/chttp2_plugin.c \
- src/core/ext/transport/chttp2/transport/chttp2_transport.c \
- src/core/ext/transport/chttp2/transport/flow_control.c \
- src/core/ext/transport/chttp2/transport/frame_data.c \
- src/core/ext/transport/chttp2/transport/frame_goaway.c \
- src/core/ext/transport/chttp2/transport/frame_ping.c \
- src/core/ext/transport/chttp2/transport/frame_rst_stream.c \
- src/core/ext/transport/chttp2/transport/frame_settings.c \
- src/core/ext/transport/chttp2/transport/frame_window_update.c \
- src/core/ext/transport/chttp2/transport/hpack_encoder.c \
- src/core/ext/transport/chttp2/transport/hpack_parser.c \
- src/core/ext/transport/chttp2/transport/hpack_table.c \
- src/core/ext/transport/chttp2/transport/http2_settings.c \
- src/core/ext/transport/chttp2/transport/huffsyms.c \
- src/core/ext/transport/chttp2/transport/incoming_metadata.c \
- src/core/ext/transport/chttp2/transport/parsing.c \
- src/core/ext/transport/chttp2/transport/stream_lists.c \
- src/core/ext/transport/chttp2/transport/stream_map.c \
- src/core/ext/transport/chttp2/transport/varint.c \
- src/core/ext/transport/chttp2/transport/writing.c \
- src/core/ext/transport/chttp2/alpn/alpn.c \
- src/core/ext/filters/http/client/http_client_filter.c \
- src/core/ext/filters/http/http_filters_plugin.c \
- src/core/ext/filters/http/message_compress/message_compress_filter.c \
- src/core/ext/filters/http/server/http_server_filter.c \
+ src/core/lib/surface/metadata_array.cc \
+ src/core/lib/surface/server.cc \
+ src/core/lib/surface/validate_metadata.cc \
+ src/core/lib/surface/version.cc \
+ src/core/lib/transport/bdp_estimator.cc \
+ src/core/lib/transport/byte_stream.cc \
+ src/core/lib/transport/connectivity_state.cc \
+ src/core/lib/transport/error_utils.cc \
+ src/core/lib/transport/metadata.cc \
+ src/core/lib/transport/metadata_batch.cc \
+ src/core/lib/transport/pid_controller.cc \
+ src/core/lib/transport/service_config.cc \
+ src/core/lib/transport/static_metadata.cc \
+ src/core/lib/transport/status_conversion.cc \
+ src/core/lib/transport/timeout_encoding.cc \
+ src/core/lib/transport/transport.cc \
+ src/core/lib/transport/transport_op_string.cc \
+ src/core/lib/debug/trace.cc \
+ src/core/ext/filters/client_channel/channel_connectivity.cc \
+ src/core/ext/filters/client_channel/client_channel.cc \
+ src/core/ext/filters/client_channel/client_channel_factory.cc \
+ src/core/ext/filters/client_channel/client_channel_plugin.cc \
+ src/core/ext/filters/client_channel/connector.cc \
+ src/core/ext/filters/client_channel/http_connect_handshaker.cc \
+ src/core/ext/filters/client_channel/http_proxy.cc \
+ src/core/ext/filters/client_channel/lb_policy.cc \
+ src/core/ext/filters/client_channel/lb_policy_factory.cc \
+ src/core/ext/filters/client_channel/lb_policy_registry.cc \
+ src/core/ext/filters/client_channel/parse_address.cc \
+ src/core/ext/filters/client_channel/proxy_mapper.cc \
+ src/core/ext/filters/client_channel/proxy_mapper_registry.cc \
+ src/core/ext/filters/client_channel/resolver.cc \
+ src/core/ext/filters/client_channel/resolver_factory.cc \
+ src/core/ext/filters/client_channel/resolver_registry.cc \
+ src/core/ext/filters/client_channel/retry_throttle.cc \
+ src/core/ext/filters/client_channel/subchannel.cc \
+ src/core/ext/filters/client_channel/subchannel_index.cc \
+ src/core/ext/filters/client_channel/uri_parser.cc \
+ src/core/ext/filters/deadline/deadline_filter.cc \
+ src/core/ext/transport/chttp2/transport/bin_decoder.cc \
+ src/core/ext/transport/chttp2/transport/bin_encoder.cc \
+ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc \
+ src/core/ext/transport/chttp2/transport/chttp2_transport.cc \
+ src/core/ext/transport/chttp2/transport/flow_control.cc \
+ src/core/ext/transport/chttp2/transport/frame_data.cc \
+ src/core/ext/transport/chttp2/transport/frame_goaway.cc \
+ src/core/ext/transport/chttp2/transport/frame_ping.cc \
+ src/core/ext/transport/chttp2/transport/frame_rst_stream.cc \
+ src/core/ext/transport/chttp2/transport/frame_settings.cc \
+ src/core/ext/transport/chttp2/transport/frame_window_update.cc \
+ src/core/ext/transport/chttp2/transport/hpack_encoder.cc \
+ src/core/ext/transport/chttp2/transport/hpack_parser.cc \
+ src/core/ext/transport/chttp2/transport/hpack_table.cc \
+ src/core/ext/transport/chttp2/transport/http2_settings.cc \
+ src/core/ext/transport/chttp2/transport/huffsyms.cc \
+ src/core/ext/transport/chttp2/transport/incoming_metadata.cc \
+ src/core/ext/transport/chttp2/transport/parsing.cc \
+ src/core/ext/transport/chttp2/transport/stream_lists.cc \
+ src/core/ext/transport/chttp2/transport/stream_map.cc \
+ src/core/ext/transport/chttp2/transport/varint.cc \
+ src/core/ext/transport/chttp2/transport/writing.cc \
+ src/core/ext/transport/chttp2/alpn/alpn.cc \
+ src/core/ext/filters/http/client/http_client_filter.cc \
+ src/core/ext/filters/http/http_filters_plugin.cc \
+ src/core/ext/filters/http/message_compress/message_compress_filter.cc \
+ src/core/ext/filters/http/server/http_server_filter.cc \
PUBLIC_HEADERS_C += \
include/grpc/impl/codegen/byte_buffer.h \
@@ -3857,7 +3859,7 @@ endif
LIBGRPC_TEST_UTIL_UNSECURE_SRC = \
- src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c \
+ src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc \
test/core/end2end/cq_verifier.c \
test/core/end2end/fixtures/http_proxy_fixture.c \
test/core/end2end/fixtures/proxy.c \
@@ -3872,187 +3874,188 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \
test/core/util/port_server_client.c \
test/core/util/slice_splitter.c \
test/core/util/trickle_endpoint.c \
- src/core/lib/channel/channel_args.c \
- src/core/lib/channel/channel_stack.c \
- src/core/lib/channel/channel_stack_builder.c \
- src/core/lib/channel/connected_channel.c \
- src/core/lib/channel/handshaker.c \
- src/core/lib/channel/handshaker_factory.c \
- src/core/lib/channel/handshaker_registry.c \
- src/core/lib/compression/compression.c \
- src/core/lib/compression/compression_internal.c \
- src/core/lib/compression/message_compress.c \
- src/core/lib/compression/stream_compression.c \
- src/core/lib/compression/stream_compression_gzip.c \
- src/core/lib/compression/stream_compression_identity.c \
- src/core/lib/debug/stats.c \
- src/core/lib/debug/stats_data.c \
- src/core/lib/http/format_request.c \
- src/core/lib/http/httpcli.c \
- src/core/lib/http/parser.c \
- src/core/lib/iomgr/call_combiner.c \
- src/core/lib/iomgr/closure.c \
- src/core/lib/iomgr/combiner.c \
- src/core/lib/iomgr/endpoint.c \
- src/core/lib/iomgr/endpoint_pair_posix.c \
- src/core/lib/iomgr/endpoint_pair_uv.c \
- src/core/lib/iomgr/endpoint_pair_windows.c \
- src/core/lib/iomgr/error.c \
- src/core/lib/iomgr/ev_epoll1_linux.c \
- src/core/lib/iomgr/ev_epollex_linux.c \
- src/core/lib/iomgr/ev_epollsig_linux.c \
- src/core/lib/iomgr/ev_poll_posix.c \
- src/core/lib/iomgr/ev_posix.c \
- src/core/lib/iomgr/ev_windows.c \
- src/core/lib/iomgr/exec_ctx.c \
- src/core/lib/iomgr/executor.c \
- src/core/lib/iomgr/gethostname_fallback.c \
- src/core/lib/iomgr/gethostname_host_name_max.c \
- src/core/lib/iomgr/gethostname_sysconf.c \
- src/core/lib/iomgr/iocp_windows.c \
- src/core/lib/iomgr/iomgr.c \
- src/core/lib/iomgr/iomgr_posix.c \
- src/core/lib/iomgr/iomgr_uv.c \
- src/core/lib/iomgr/iomgr_windows.c \
- src/core/lib/iomgr/is_epollexclusive_available.c \
- src/core/lib/iomgr/load_file.c \
- src/core/lib/iomgr/lockfree_event.c \
- src/core/lib/iomgr/network_status_tracker.c \
- src/core/lib/iomgr/polling_entity.c \
- src/core/lib/iomgr/pollset_set_uv.c \
- src/core/lib/iomgr/pollset_set_windows.c \
- src/core/lib/iomgr/pollset_uv.c \
- src/core/lib/iomgr/pollset_windows.c \
- src/core/lib/iomgr/resolve_address_posix.c \
- src/core/lib/iomgr/resolve_address_uv.c \
- src/core/lib/iomgr/resolve_address_windows.c \
- src/core/lib/iomgr/resource_quota.c \
- src/core/lib/iomgr/sockaddr_utils.c \
- src/core/lib/iomgr/socket_factory_posix.c \
- src/core/lib/iomgr/socket_mutator.c \
- src/core/lib/iomgr/socket_utils_common_posix.c \
- src/core/lib/iomgr/socket_utils_linux.c \
- src/core/lib/iomgr/socket_utils_posix.c \
- src/core/lib/iomgr/socket_utils_uv.c \
- src/core/lib/iomgr/socket_utils_windows.c \
- src/core/lib/iomgr/socket_windows.c \
- src/core/lib/iomgr/tcp_client_posix.c \
- src/core/lib/iomgr/tcp_client_uv.c \
- src/core/lib/iomgr/tcp_client_windows.c \
- src/core/lib/iomgr/tcp_posix.c \
- src/core/lib/iomgr/tcp_server_posix.c \
- src/core/lib/iomgr/tcp_server_utils_posix_common.c \
- src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c \
- src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c \
- src/core/lib/iomgr/tcp_server_uv.c \
- src/core/lib/iomgr/tcp_server_windows.c \
- src/core/lib/iomgr/tcp_uv.c \
- src/core/lib/iomgr/tcp_windows.c \
- src/core/lib/iomgr/time_averaged_stats.c \
- src/core/lib/iomgr/timer_generic.c \
- src/core/lib/iomgr/timer_heap.c \
- src/core/lib/iomgr/timer_manager.c \
- src/core/lib/iomgr/timer_uv.c \
- src/core/lib/iomgr/udp_server.c \
- src/core/lib/iomgr/unix_sockets_posix.c \
- src/core/lib/iomgr/unix_sockets_posix_noop.c \
- src/core/lib/iomgr/wakeup_fd_cv.c \
- src/core/lib/iomgr/wakeup_fd_eventfd.c \
- src/core/lib/iomgr/wakeup_fd_nospecial.c \
- src/core/lib/iomgr/wakeup_fd_pipe.c \
- src/core/lib/iomgr/wakeup_fd_posix.c \
- src/core/lib/json/json.c \
- src/core/lib/json/json_reader.c \
- src/core/lib/json/json_string.c \
- src/core/lib/json/json_writer.c \
- src/core/lib/slice/b64.c \
- src/core/lib/slice/percent_encoding.c \
- src/core/lib/slice/slice.c \
- src/core/lib/slice/slice_buffer.c \
- src/core/lib/slice/slice_hash_table.c \
- src/core/lib/slice/slice_intern.c \
- src/core/lib/slice/slice_string_helpers.c \
- src/core/lib/surface/alarm.c \
- src/core/lib/surface/api_trace.c \
- src/core/lib/surface/byte_buffer.c \
- src/core/lib/surface/byte_buffer_reader.c \
- src/core/lib/surface/call.c \
- src/core/lib/surface/call_details.c \
- src/core/lib/surface/call_log_batch.c \
- src/core/lib/surface/channel.c \
- src/core/lib/surface/channel_init.c \
- src/core/lib/surface/channel_ping.c \
- src/core/lib/surface/channel_stack_type.c \
- src/core/lib/surface/completion_queue.c \
- src/core/lib/surface/completion_queue_factory.c \
- src/core/lib/surface/event_string.c \
+ src/core/lib/backoff/backoff.cc \
+ src/core/lib/channel/channel_args.cc \
+ src/core/lib/channel/channel_stack.cc \
+ src/core/lib/channel/channel_stack_builder.cc \
+ src/core/lib/channel/connected_channel.cc \
+ src/core/lib/channel/handshaker.cc \
+ 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/message_compress.cc \
+ src/core/lib/compression/stream_compression.cc \
+ src/core/lib/compression/stream_compression_gzip.cc \
+ src/core/lib/compression/stream_compression_identity.cc \
+ src/core/lib/debug/stats.cc \
+ src/core/lib/debug/stats_data.cc \
+ src/core/lib/http/format_request.cc \
+ src/core/lib/http/httpcli.cc \
+ src/core/lib/http/parser.cc \
+ src/core/lib/iomgr/call_combiner.cc \
+ src/core/lib/iomgr/closure.cc \
+ src/core/lib/iomgr/combiner.cc \
+ src/core/lib/iomgr/endpoint.cc \
+ src/core/lib/iomgr/endpoint_pair_posix.cc \
+ src/core/lib/iomgr/endpoint_pair_uv.cc \
+ src/core/lib/iomgr/endpoint_pair_windows.cc \
+ src/core/lib/iomgr/error.cc \
+ src/core/lib/iomgr/ev_epoll1_linux.cc \
+ src/core/lib/iomgr/ev_epollex_linux.cc \
+ src/core/lib/iomgr/ev_epollsig_linux.cc \
+ src/core/lib/iomgr/ev_poll_posix.cc \
+ src/core/lib/iomgr/ev_posix.cc \
+ src/core/lib/iomgr/ev_windows.cc \
+ src/core/lib/iomgr/exec_ctx.cc \
+ src/core/lib/iomgr/executor.cc \
+ src/core/lib/iomgr/gethostname_fallback.cc \
+ src/core/lib/iomgr/gethostname_host_name_max.cc \
+ src/core/lib/iomgr/gethostname_sysconf.cc \
+ src/core/lib/iomgr/iocp_windows.cc \
+ src/core/lib/iomgr/iomgr.cc \
+ src/core/lib/iomgr/iomgr_posix.cc \
+ src/core/lib/iomgr/iomgr_uv.cc \
+ src/core/lib/iomgr/iomgr_windows.cc \
+ src/core/lib/iomgr/is_epollexclusive_available.cc \
+ src/core/lib/iomgr/load_file.cc \
+ src/core/lib/iomgr/lockfree_event.cc \
+ src/core/lib/iomgr/network_status_tracker.cc \
+ src/core/lib/iomgr/polling_entity.cc \
+ src/core/lib/iomgr/pollset_set_uv.cc \
+ src/core/lib/iomgr/pollset_set_windows.cc \
+ src/core/lib/iomgr/pollset_uv.cc \
+ src/core/lib/iomgr/pollset_windows.cc \
+ src/core/lib/iomgr/resolve_address_posix.cc \
+ src/core/lib/iomgr/resolve_address_uv.cc \
+ src/core/lib/iomgr/resolve_address_windows.cc \
+ src/core/lib/iomgr/resource_quota.cc \
+ src/core/lib/iomgr/sockaddr_utils.cc \
+ src/core/lib/iomgr/socket_factory_posix.cc \
+ src/core/lib/iomgr/socket_mutator.cc \
+ src/core/lib/iomgr/socket_utils_common_posix.cc \
+ src/core/lib/iomgr/socket_utils_linux.cc \
+ src/core/lib/iomgr/socket_utils_posix.cc \
+ src/core/lib/iomgr/socket_utils_uv.cc \
+ src/core/lib/iomgr/socket_utils_windows.cc \
+ src/core/lib/iomgr/socket_windows.cc \
+ src/core/lib/iomgr/tcp_client_posix.cc \
+ src/core/lib/iomgr/tcp_client_uv.cc \
+ src/core/lib/iomgr/tcp_client_windows.cc \
+ src/core/lib/iomgr/tcp_posix.cc \
+ src/core/lib/iomgr/tcp_server_posix.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_common.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
+ src/core/lib/iomgr/tcp_server_uv.cc \
+ src/core/lib/iomgr/tcp_server_windows.cc \
+ src/core/lib/iomgr/tcp_uv.cc \
+ src/core/lib/iomgr/tcp_windows.cc \
+ src/core/lib/iomgr/time_averaged_stats.cc \
+ src/core/lib/iomgr/timer_generic.cc \
+ src/core/lib/iomgr/timer_heap.cc \
+ src/core/lib/iomgr/timer_manager.cc \
+ src/core/lib/iomgr/timer_uv.cc \
+ src/core/lib/iomgr/udp_server.cc \
+ src/core/lib/iomgr/unix_sockets_posix.cc \
+ src/core/lib/iomgr/unix_sockets_posix_noop.cc \
+ src/core/lib/iomgr/wakeup_fd_cv.cc \
+ src/core/lib/iomgr/wakeup_fd_eventfd.cc \
+ src/core/lib/iomgr/wakeup_fd_nospecial.cc \
+ src/core/lib/iomgr/wakeup_fd_pipe.cc \
+ src/core/lib/iomgr/wakeup_fd_posix.cc \
+ src/core/lib/json/json.cc \
+ src/core/lib/json/json_reader.cc \
+ src/core/lib/json/json_string.cc \
+ src/core/lib/json/json_writer.cc \
+ src/core/lib/slice/b64.cc \
+ src/core/lib/slice/percent_encoding.cc \
+ src/core/lib/slice/slice.cc \
+ src/core/lib/slice/slice_buffer.cc \
+ src/core/lib/slice/slice_hash_table.cc \
+ src/core/lib/slice/slice_intern.cc \
+ src/core/lib/slice/slice_string_helpers.cc \
+ src/core/lib/surface/alarm.cc \
+ src/core/lib/surface/api_trace.cc \
+ src/core/lib/surface/byte_buffer.cc \
+ src/core/lib/surface/byte_buffer_reader.cc \
+ src/core/lib/surface/call.cc \
+ src/core/lib/surface/call_details.cc \
+ src/core/lib/surface/call_log_batch.cc \
+ src/core/lib/surface/channel.cc \
+ src/core/lib/surface/channel_init.cc \
+ src/core/lib/surface/channel_ping.cc \
+ src/core/lib/surface/channel_stack_type.cc \
+ src/core/lib/surface/completion_queue.cc \
+ src/core/lib/surface/completion_queue_factory.cc \
+ src/core/lib/surface/event_string.cc \
src/core/lib/surface/lame_client.cc \
- src/core/lib/surface/metadata_array.c \
- src/core/lib/surface/server.c \
- src/core/lib/surface/validate_metadata.c \
- src/core/lib/surface/version.c \
- src/core/lib/transport/bdp_estimator.c \
- src/core/lib/transport/byte_stream.c \
- src/core/lib/transport/connectivity_state.c \
- src/core/lib/transport/error_utils.c \
- src/core/lib/transport/metadata.c \
- src/core/lib/transport/metadata_batch.c \
- src/core/lib/transport/pid_controller.c \
- src/core/lib/transport/service_config.c \
- src/core/lib/transport/static_metadata.c \
- src/core/lib/transport/status_conversion.c \
- src/core/lib/transport/timeout_encoding.c \
- src/core/lib/transport/transport.c \
- src/core/lib/transport/transport_op_string.c \
- src/core/lib/debug/trace.c \
- src/core/ext/filters/client_channel/channel_connectivity.c \
- src/core/ext/filters/client_channel/client_channel.c \
- src/core/ext/filters/client_channel/client_channel_factory.c \
- src/core/ext/filters/client_channel/client_channel_plugin.c \
- src/core/ext/filters/client_channel/connector.c \
- src/core/ext/filters/client_channel/http_connect_handshaker.c \
- src/core/ext/filters/client_channel/http_proxy.c \
- src/core/ext/filters/client_channel/lb_policy.c \
- src/core/ext/filters/client_channel/lb_policy_factory.c \
- src/core/ext/filters/client_channel/lb_policy_registry.c \
- src/core/ext/filters/client_channel/parse_address.c \
- src/core/ext/filters/client_channel/proxy_mapper.c \
- src/core/ext/filters/client_channel/proxy_mapper_registry.c \
- src/core/ext/filters/client_channel/resolver.c \
- src/core/ext/filters/client_channel/resolver_factory.c \
- src/core/ext/filters/client_channel/resolver_registry.c \
- src/core/ext/filters/client_channel/retry_throttle.c \
- src/core/ext/filters/client_channel/subchannel.c \
- src/core/ext/filters/client_channel/subchannel_index.c \
- src/core/ext/filters/client_channel/uri_parser.c \
- src/core/ext/filters/deadline/deadline_filter.c \
- src/core/ext/transport/chttp2/transport/bin_decoder.c \
- src/core/ext/transport/chttp2/transport/bin_encoder.c \
- src/core/ext/transport/chttp2/transport/chttp2_plugin.c \
- src/core/ext/transport/chttp2/transport/chttp2_transport.c \
- src/core/ext/transport/chttp2/transport/flow_control.c \
- src/core/ext/transport/chttp2/transport/frame_data.c \
- src/core/ext/transport/chttp2/transport/frame_goaway.c \
- src/core/ext/transport/chttp2/transport/frame_ping.c \
- src/core/ext/transport/chttp2/transport/frame_rst_stream.c \
- src/core/ext/transport/chttp2/transport/frame_settings.c \
- src/core/ext/transport/chttp2/transport/frame_window_update.c \
- src/core/ext/transport/chttp2/transport/hpack_encoder.c \
- src/core/ext/transport/chttp2/transport/hpack_parser.c \
- src/core/ext/transport/chttp2/transport/hpack_table.c \
- src/core/ext/transport/chttp2/transport/http2_settings.c \
- src/core/ext/transport/chttp2/transport/huffsyms.c \
- src/core/ext/transport/chttp2/transport/incoming_metadata.c \
- src/core/ext/transport/chttp2/transport/parsing.c \
- src/core/ext/transport/chttp2/transport/stream_lists.c \
- src/core/ext/transport/chttp2/transport/stream_map.c \
- src/core/ext/transport/chttp2/transport/varint.c \
- src/core/ext/transport/chttp2/transport/writing.c \
- src/core/ext/transport/chttp2/alpn/alpn.c \
- src/core/ext/filters/http/client/http_client_filter.c \
- src/core/ext/filters/http/http_filters_plugin.c \
- src/core/ext/filters/http/message_compress/message_compress_filter.c \
- src/core/ext/filters/http/server/http_server_filter.c \
+ src/core/lib/surface/metadata_array.cc \
+ src/core/lib/surface/server.cc \
+ src/core/lib/surface/validate_metadata.cc \
+ src/core/lib/surface/version.cc \
+ src/core/lib/transport/bdp_estimator.cc \
+ src/core/lib/transport/byte_stream.cc \
+ src/core/lib/transport/connectivity_state.cc \
+ src/core/lib/transport/error_utils.cc \
+ src/core/lib/transport/metadata.cc \
+ src/core/lib/transport/metadata_batch.cc \
+ src/core/lib/transport/pid_controller.cc \
+ src/core/lib/transport/service_config.cc \
+ src/core/lib/transport/static_metadata.cc \
+ src/core/lib/transport/status_conversion.cc \
+ src/core/lib/transport/timeout_encoding.cc \
+ src/core/lib/transport/transport.cc \
+ src/core/lib/transport/transport_op_string.cc \
+ src/core/lib/debug/trace.cc \
+ src/core/ext/filters/client_channel/channel_connectivity.cc \
+ src/core/ext/filters/client_channel/client_channel.cc \
+ src/core/ext/filters/client_channel/client_channel_factory.cc \
+ src/core/ext/filters/client_channel/client_channel_plugin.cc \
+ src/core/ext/filters/client_channel/connector.cc \
+ src/core/ext/filters/client_channel/http_connect_handshaker.cc \
+ src/core/ext/filters/client_channel/http_proxy.cc \
+ src/core/ext/filters/client_channel/lb_policy.cc \
+ src/core/ext/filters/client_channel/lb_policy_factory.cc \
+ src/core/ext/filters/client_channel/lb_policy_registry.cc \
+ src/core/ext/filters/client_channel/parse_address.cc \
+ src/core/ext/filters/client_channel/proxy_mapper.cc \
+ src/core/ext/filters/client_channel/proxy_mapper_registry.cc \
+ src/core/ext/filters/client_channel/resolver.cc \
+ src/core/ext/filters/client_channel/resolver_factory.cc \
+ src/core/ext/filters/client_channel/resolver_registry.cc \
+ src/core/ext/filters/client_channel/retry_throttle.cc \
+ src/core/ext/filters/client_channel/subchannel.cc \
+ src/core/ext/filters/client_channel/subchannel_index.cc \
+ src/core/ext/filters/client_channel/uri_parser.cc \
+ src/core/ext/filters/deadline/deadline_filter.cc \
+ src/core/ext/transport/chttp2/transport/bin_decoder.cc \
+ src/core/ext/transport/chttp2/transport/bin_encoder.cc \
+ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc \
+ src/core/ext/transport/chttp2/transport/chttp2_transport.cc \
+ src/core/ext/transport/chttp2/transport/flow_control.cc \
+ src/core/ext/transport/chttp2/transport/frame_data.cc \
+ src/core/ext/transport/chttp2/transport/frame_goaway.cc \
+ src/core/ext/transport/chttp2/transport/frame_ping.cc \
+ src/core/ext/transport/chttp2/transport/frame_rst_stream.cc \
+ src/core/ext/transport/chttp2/transport/frame_settings.cc \
+ src/core/ext/transport/chttp2/transport/frame_window_update.cc \
+ src/core/ext/transport/chttp2/transport/hpack_encoder.cc \
+ src/core/ext/transport/chttp2/transport/hpack_parser.cc \
+ src/core/ext/transport/chttp2/transport/hpack_table.cc \
+ src/core/ext/transport/chttp2/transport/http2_settings.cc \
+ src/core/ext/transport/chttp2/transport/huffsyms.cc \
+ src/core/ext/transport/chttp2/transport/incoming_metadata.cc \
+ src/core/ext/transport/chttp2/transport/parsing.cc \
+ src/core/ext/transport/chttp2/transport/stream_lists.cc \
+ src/core/ext/transport/chttp2/transport/stream_map.cc \
+ src/core/ext/transport/chttp2/transport/varint.cc \
+ src/core/ext/transport/chttp2/transport/writing.cc \
+ src/core/ext/transport/chttp2/alpn/alpn.cc \
+ src/core/ext/filters/http/client/http_client_filter.cc \
+ src/core/ext/filters/http/http_filters_plugin.cc \
+ src/core/ext/filters/http/message_compress/message_compress_filter.cc \
+ src/core/ext/filters/http/server/http_server_filter.cc \
PUBLIC_HEADERS_C += \
include/grpc/impl/codegen/byte_buffer.h \
@@ -4098,237 +4101,238 @@ endif
LIBGRPC_UNSECURE_SRC = \
- src/core/lib/surface/init.c \
- src/core/lib/surface/init_unsecure.c \
- src/core/lib/channel/channel_args.c \
- src/core/lib/channel/channel_stack.c \
- src/core/lib/channel/channel_stack_builder.c \
- src/core/lib/channel/connected_channel.c \
- src/core/lib/channel/handshaker.c \
- src/core/lib/channel/handshaker_factory.c \
- src/core/lib/channel/handshaker_registry.c \
- src/core/lib/compression/compression.c \
- src/core/lib/compression/compression_internal.c \
- src/core/lib/compression/message_compress.c \
- src/core/lib/compression/stream_compression.c \
- src/core/lib/compression/stream_compression_gzip.c \
- src/core/lib/compression/stream_compression_identity.c \
- src/core/lib/debug/stats.c \
- src/core/lib/debug/stats_data.c \
- src/core/lib/http/format_request.c \
- src/core/lib/http/httpcli.c \
- src/core/lib/http/parser.c \
- src/core/lib/iomgr/call_combiner.c \
- src/core/lib/iomgr/closure.c \
- src/core/lib/iomgr/combiner.c \
- src/core/lib/iomgr/endpoint.c \
- src/core/lib/iomgr/endpoint_pair_posix.c \
- src/core/lib/iomgr/endpoint_pair_uv.c \
- src/core/lib/iomgr/endpoint_pair_windows.c \
- src/core/lib/iomgr/error.c \
- src/core/lib/iomgr/ev_epoll1_linux.c \
- src/core/lib/iomgr/ev_epollex_linux.c \
- src/core/lib/iomgr/ev_epollsig_linux.c \
- src/core/lib/iomgr/ev_poll_posix.c \
- src/core/lib/iomgr/ev_posix.c \
- src/core/lib/iomgr/ev_windows.c \
- src/core/lib/iomgr/exec_ctx.c \
- src/core/lib/iomgr/executor.c \
- src/core/lib/iomgr/gethostname_fallback.c \
- src/core/lib/iomgr/gethostname_host_name_max.c \
- src/core/lib/iomgr/gethostname_sysconf.c \
- src/core/lib/iomgr/iocp_windows.c \
- src/core/lib/iomgr/iomgr.c \
- src/core/lib/iomgr/iomgr_posix.c \
- src/core/lib/iomgr/iomgr_uv.c \
- src/core/lib/iomgr/iomgr_windows.c \
- src/core/lib/iomgr/is_epollexclusive_available.c \
- src/core/lib/iomgr/load_file.c \
- src/core/lib/iomgr/lockfree_event.c \
- src/core/lib/iomgr/network_status_tracker.c \
- src/core/lib/iomgr/polling_entity.c \
- src/core/lib/iomgr/pollset_set_uv.c \
- src/core/lib/iomgr/pollset_set_windows.c \
- src/core/lib/iomgr/pollset_uv.c \
- src/core/lib/iomgr/pollset_windows.c \
- src/core/lib/iomgr/resolve_address_posix.c \
- src/core/lib/iomgr/resolve_address_uv.c \
- src/core/lib/iomgr/resolve_address_windows.c \
- src/core/lib/iomgr/resource_quota.c \
- src/core/lib/iomgr/sockaddr_utils.c \
- src/core/lib/iomgr/socket_factory_posix.c \
- src/core/lib/iomgr/socket_mutator.c \
- src/core/lib/iomgr/socket_utils_common_posix.c \
- src/core/lib/iomgr/socket_utils_linux.c \
- src/core/lib/iomgr/socket_utils_posix.c \
- src/core/lib/iomgr/socket_utils_uv.c \
- src/core/lib/iomgr/socket_utils_windows.c \
- src/core/lib/iomgr/socket_windows.c \
- src/core/lib/iomgr/tcp_client_posix.c \
- src/core/lib/iomgr/tcp_client_uv.c \
- src/core/lib/iomgr/tcp_client_windows.c \
- src/core/lib/iomgr/tcp_posix.c \
- src/core/lib/iomgr/tcp_server_posix.c \
- src/core/lib/iomgr/tcp_server_utils_posix_common.c \
- src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c \
- src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c \
- src/core/lib/iomgr/tcp_server_uv.c \
- src/core/lib/iomgr/tcp_server_windows.c \
- src/core/lib/iomgr/tcp_uv.c \
- src/core/lib/iomgr/tcp_windows.c \
- src/core/lib/iomgr/time_averaged_stats.c \
- src/core/lib/iomgr/timer_generic.c \
- src/core/lib/iomgr/timer_heap.c \
- src/core/lib/iomgr/timer_manager.c \
- src/core/lib/iomgr/timer_uv.c \
- src/core/lib/iomgr/udp_server.c \
- src/core/lib/iomgr/unix_sockets_posix.c \
- src/core/lib/iomgr/unix_sockets_posix_noop.c \
- src/core/lib/iomgr/wakeup_fd_cv.c \
- src/core/lib/iomgr/wakeup_fd_eventfd.c \
- src/core/lib/iomgr/wakeup_fd_nospecial.c \
- src/core/lib/iomgr/wakeup_fd_pipe.c \
- src/core/lib/iomgr/wakeup_fd_posix.c \
- src/core/lib/json/json.c \
- src/core/lib/json/json_reader.c \
- src/core/lib/json/json_string.c \
- src/core/lib/json/json_writer.c \
- src/core/lib/slice/b64.c \
- src/core/lib/slice/percent_encoding.c \
- src/core/lib/slice/slice.c \
- src/core/lib/slice/slice_buffer.c \
- src/core/lib/slice/slice_hash_table.c \
- src/core/lib/slice/slice_intern.c \
- src/core/lib/slice/slice_string_helpers.c \
- src/core/lib/surface/alarm.c \
- src/core/lib/surface/api_trace.c \
- src/core/lib/surface/byte_buffer.c \
- src/core/lib/surface/byte_buffer_reader.c \
- src/core/lib/surface/call.c \
- src/core/lib/surface/call_details.c \
- src/core/lib/surface/call_log_batch.c \
- src/core/lib/surface/channel.c \
- src/core/lib/surface/channel_init.c \
- src/core/lib/surface/channel_ping.c \
- src/core/lib/surface/channel_stack_type.c \
- src/core/lib/surface/completion_queue.c \
- src/core/lib/surface/completion_queue_factory.c \
- src/core/lib/surface/event_string.c \
+ src/core/lib/surface/init.cc \
+ src/core/lib/surface/init_unsecure.cc \
+ src/core/lib/backoff/backoff.cc \
+ src/core/lib/channel/channel_args.cc \
+ src/core/lib/channel/channel_stack.cc \
+ src/core/lib/channel/channel_stack_builder.cc \
+ src/core/lib/channel/connected_channel.cc \
+ src/core/lib/channel/handshaker.cc \
+ 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/message_compress.cc \
+ src/core/lib/compression/stream_compression.cc \
+ src/core/lib/compression/stream_compression_gzip.cc \
+ src/core/lib/compression/stream_compression_identity.cc \
+ src/core/lib/debug/stats.cc \
+ src/core/lib/debug/stats_data.cc \
+ src/core/lib/http/format_request.cc \
+ src/core/lib/http/httpcli.cc \
+ src/core/lib/http/parser.cc \
+ src/core/lib/iomgr/call_combiner.cc \
+ src/core/lib/iomgr/closure.cc \
+ src/core/lib/iomgr/combiner.cc \
+ src/core/lib/iomgr/endpoint.cc \
+ src/core/lib/iomgr/endpoint_pair_posix.cc \
+ src/core/lib/iomgr/endpoint_pair_uv.cc \
+ src/core/lib/iomgr/endpoint_pair_windows.cc \
+ src/core/lib/iomgr/error.cc \
+ src/core/lib/iomgr/ev_epoll1_linux.cc \
+ src/core/lib/iomgr/ev_epollex_linux.cc \
+ src/core/lib/iomgr/ev_epollsig_linux.cc \
+ src/core/lib/iomgr/ev_poll_posix.cc \
+ src/core/lib/iomgr/ev_posix.cc \
+ src/core/lib/iomgr/ev_windows.cc \
+ src/core/lib/iomgr/exec_ctx.cc \
+ src/core/lib/iomgr/executor.cc \
+ src/core/lib/iomgr/gethostname_fallback.cc \
+ src/core/lib/iomgr/gethostname_host_name_max.cc \
+ src/core/lib/iomgr/gethostname_sysconf.cc \
+ src/core/lib/iomgr/iocp_windows.cc \
+ src/core/lib/iomgr/iomgr.cc \
+ src/core/lib/iomgr/iomgr_posix.cc \
+ src/core/lib/iomgr/iomgr_uv.cc \
+ src/core/lib/iomgr/iomgr_windows.cc \
+ src/core/lib/iomgr/is_epollexclusive_available.cc \
+ src/core/lib/iomgr/load_file.cc \
+ src/core/lib/iomgr/lockfree_event.cc \
+ src/core/lib/iomgr/network_status_tracker.cc \
+ src/core/lib/iomgr/polling_entity.cc \
+ src/core/lib/iomgr/pollset_set_uv.cc \
+ src/core/lib/iomgr/pollset_set_windows.cc \
+ src/core/lib/iomgr/pollset_uv.cc \
+ src/core/lib/iomgr/pollset_windows.cc \
+ src/core/lib/iomgr/resolve_address_posix.cc \
+ src/core/lib/iomgr/resolve_address_uv.cc \
+ src/core/lib/iomgr/resolve_address_windows.cc \
+ src/core/lib/iomgr/resource_quota.cc \
+ src/core/lib/iomgr/sockaddr_utils.cc \
+ src/core/lib/iomgr/socket_factory_posix.cc \
+ src/core/lib/iomgr/socket_mutator.cc \
+ src/core/lib/iomgr/socket_utils_common_posix.cc \
+ src/core/lib/iomgr/socket_utils_linux.cc \
+ src/core/lib/iomgr/socket_utils_posix.cc \
+ src/core/lib/iomgr/socket_utils_uv.cc \
+ src/core/lib/iomgr/socket_utils_windows.cc \
+ src/core/lib/iomgr/socket_windows.cc \
+ src/core/lib/iomgr/tcp_client_posix.cc \
+ src/core/lib/iomgr/tcp_client_uv.cc \
+ src/core/lib/iomgr/tcp_client_windows.cc \
+ src/core/lib/iomgr/tcp_posix.cc \
+ src/core/lib/iomgr/tcp_server_posix.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_common.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
+ src/core/lib/iomgr/tcp_server_uv.cc \
+ src/core/lib/iomgr/tcp_server_windows.cc \
+ src/core/lib/iomgr/tcp_uv.cc \
+ src/core/lib/iomgr/tcp_windows.cc \
+ src/core/lib/iomgr/time_averaged_stats.cc \
+ src/core/lib/iomgr/timer_generic.cc \
+ src/core/lib/iomgr/timer_heap.cc \
+ src/core/lib/iomgr/timer_manager.cc \
+ src/core/lib/iomgr/timer_uv.cc \
+ src/core/lib/iomgr/udp_server.cc \
+ src/core/lib/iomgr/unix_sockets_posix.cc \
+ src/core/lib/iomgr/unix_sockets_posix_noop.cc \
+ src/core/lib/iomgr/wakeup_fd_cv.cc \
+ src/core/lib/iomgr/wakeup_fd_eventfd.cc \
+ src/core/lib/iomgr/wakeup_fd_nospecial.cc \
+ src/core/lib/iomgr/wakeup_fd_pipe.cc \
+ src/core/lib/iomgr/wakeup_fd_posix.cc \
+ src/core/lib/json/json.cc \
+ src/core/lib/json/json_reader.cc \
+ src/core/lib/json/json_string.cc \
+ src/core/lib/json/json_writer.cc \
+ src/core/lib/slice/b64.cc \
+ src/core/lib/slice/percent_encoding.cc \
+ src/core/lib/slice/slice.cc \
+ src/core/lib/slice/slice_buffer.cc \
+ src/core/lib/slice/slice_hash_table.cc \
+ src/core/lib/slice/slice_intern.cc \
+ src/core/lib/slice/slice_string_helpers.cc \
+ src/core/lib/surface/alarm.cc \
+ src/core/lib/surface/api_trace.cc \
+ src/core/lib/surface/byte_buffer.cc \
+ src/core/lib/surface/byte_buffer_reader.cc \
+ src/core/lib/surface/call.cc \
+ src/core/lib/surface/call_details.cc \
+ src/core/lib/surface/call_log_batch.cc \
+ src/core/lib/surface/channel.cc \
+ src/core/lib/surface/channel_init.cc \
+ src/core/lib/surface/channel_ping.cc \
+ src/core/lib/surface/channel_stack_type.cc \
+ src/core/lib/surface/completion_queue.cc \
+ src/core/lib/surface/completion_queue_factory.cc \
+ src/core/lib/surface/event_string.cc \
src/core/lib/surface/lame_client.cc \
- src/core/lib/surface/metadata_array.c \
- src/core/lib/surface/server.c \
- src/core/lib/surface/validate_metadata.c \
- src/core/lib/surface/version.c \
- src/core/lib/transport/bdp_estimator.c \
- src/core/lib/transport/byte_stream.c \
- src/core/lib/transport/connectivity_state.c \
- src/core/lib/transport/error_utils.c \
- src/core/lib/transport/metadata.c \
- src/core/lib/transport/metadata_batch.c \
- src/core/lib/transport/pid_controller.c \
- src/core/lib/transport/service_config.c \
- src/core/lib/transport/static_metadata.c \
- src/core/lib/transport/status_conversion.c \
- src/core/lib/transport/timeout_encoding.c \
- src/core/lib/transport/transport.c \
- src/core/lib/transport/transport_op_string.c \
- src/core/lib/debug/trace.c \
- src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \
- src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \
- src/core/ext/transport/chttp2/transport/bin_decoder.c \
- src/core/ext/transport/chttp2/transport/bin_encoder.c \
- src/core/ext/transport/chttp2/transport/chttp2_plugin.c \
- src/core/ext/transport/chttp2/transport/chttp2_transport.c \
- src/core/ext/transport/chttp2/transport/flow_control.c \
- src/core/ext/transport/chttp2/transport/frame_data.c \
- src/core/ext/transport/chttp2/transport/frame_goaway.c \
- src/core/ext/transport/chttp2/transport/frame_ping.c \
- src/core/ext/transport/chttp2/transport/frame_rst_stream.c \
- src/core/ext/transport/chttp2/transport/frame_settings.c \
- src/core/ext/transport/chttp2/transport/frame_window_update.c \
- src/core/ext/transport/chttp2/transport/hpack_encoder.c \
- src/core/ext/transport/chttp2/transport/hpack_parser.c \
- src/core/ext/transport/chttp2/transport/hpack_table.c \
- src/core/ext/transport/chttp2/transport/http2_settings.c \
- src/core/ext/transport/chttp2/transport/huffsyms.c \
- src/core/ext/transport/chttp2/transport/incoming_metadata.c \
- src/core/ext/transport/chttp2/transport/parsing.c \
- src/core/ext/transport/chttp2/transport/stream_lists.c \
- src/core/ext/transport/chttp2/transport/stream_map.c \
- src/core/ext/transport/chttp2/transport/varint.c \
- src/core/ext/transport/chttp2/transport/writing.c \
- src/core/ext/transport/chttp2/alpn/alpn.c \
- src/core/ext/filters/http/client/http_client_filter.c \
- src/core/ext/filters/http/http_filters_plugin.c \
- src/core/ext/filters/http/message_compress/message_compress_filter.c \
- src/core/ext/filters/http/server/http_server_filter.c \
- src/core/ext/transport/chttp2/server/chttp2_server.c \
- src/core/ext/transport/chttp2/client/insecure/channel_create.c \
- src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \
- src/core/ext/transport/chttp2/client/chttp2_connector.c \
- src/core/ext/filters/client_channel/channel_connectivity.c \
- src/core/ext/filters/client_channel/client_channel.c \
- src/core/ext/filters/client_channel/client_channel_factory.c \
- src/core/ext/filters/client_channel/client_channel_plugin.c \
- src/core/ext/filters/client_channel/connector.c \
- src/core/ext/filters/client_channel/http_connect_handshaker.c \
- src/core/ext/filters/client_channel/http_proxy.c \
- src/core/ext/filters/client_channel/lb_policy.c \
- src/core/ext/filters/client_channel/lb_policy_factory.c \
- src/core/ext/filters/client_channel/lb_policy_registry.c \
- src/core/ext/filters/client_channel/parse_address.c \
- src/core/ext/filters/client_channel/proxy_mapper.c \
- src/core/ext/filters/client_channel/proxy_mapper_registry.c \
- src/core/ext/filters/client_channel/resolver.c \
- src/core/ext/filters/client_channel/resolver_factory.c \
- src/core/ext/filters/client_channel/resolver_registry.c \
- src/core/ext/filters/client_channel/retry_throttle.c \
- src/core/ext/filters/client_channel/subchannel.c \
- src/core/ext/filters/client_channel/subchannel_index.c \
- src/core/ext/filters/client_channel/uri_parser.c \
- src/core/ext/filters/deadline/deadline_filter.c \
- src/core/ext/transport/inproc/inproc_plugin.c \
- src/core/ext/transport/inproc/inproc_transport.c \
- src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c \
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c \
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c \
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c \
- src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c \
- src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c \
- src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c \
- src/core/ext/filters/load_reporting/server_load_reporting_filter.c \
- src/core/ext/filters/load_reporting/server_load_reporting_plugin.c \
- src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c \
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c \
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.c \
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c \
- src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c \
+ src/core/lib/surface/metadata_array.cc \
+ src/core/lib/surface/server.cc \
+ src/core/lib/surface/validate_metadata.cc \
+ src/core/lib/surface/version.cc \
+ src/core/lib/transport/bdp_estimator.cc \
+ src/core/lib/transport/byte_stream.cc \
+ src/core/lib/transport/connectivity_state.cc \
+ src/core/lib/transport/error_utils.cc \
+ src/core/lib/transport/metadata.cc \
+ src/core/lib/transport/metadata_batch.cc \
+ src/core/lib/transport/pid_controller.cc \
+ src/core/lib/transport/service_config.cc \
+ src/core/lib/transport/static_metadata.cc \
+ src/core/lib/transport/status_conversion.cc \
+ src/core/lib/transport/timeout_encoding.cc \
+ src/core/lib/transport/transport.cc \
+ src/core/lib/transport/transport_op_string.cc \
+ src/core/lib/debug/trace.cc \
+ src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc \
+ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc \
+ src/core/ext/transport/chttp2/transport/bin_decoder.cc \
+ src/core/ext/transport/chttp2/transport/bin_encoder.cc \
+ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc \
+ src/core/ext/transport/chttp2/transport/chttp2_transport.cc \
+ src/core/ext/transport/chttp2/transport/flow_control.cc \
+ src/core/ext/transport/chttp2/transport/frame_data.cc \
+ src/core/ext/transport/chttp2/transport/frame_goaway.cc \
+ src/core/ext/transport/chttp2/transport/frame_ping.cc \
+ src/core/ext/transport/chttp2/transport/frame_rst_stream.cc \
+ src/core/ext/transport/chttp2/transport/frame_settings.cc \
+ src/core/ext/transport/chttp2/transport/frame_window_update.cc \
+ src/core/ext/transport/chttp2/transport/hpack_encoder.cc \
+ src/core/ext/transport/chttp2/transport/hpack_parser.cc \
+ src/core/ext/transport/chttp2/transport/hpack_table.cc \
+ src/core/ext/transport/chttp2/transport/http2_settings.cc \
+ src/core/ext/transport/chttp2/transport/huffsyms.cc \
+ src/core/ext/transport/chttp2/transport/incoming_metadata.cc \
+ src/core/ext/transport/chttp2/transport/parsing.cc \
+ src/core/ext/transport/chttp2/transport/stream_lists.cc \
+ src/core/ext/transport/chttp2/transport/stream_map.cc \
+ src/core/ext/transport/chttp2/transport/varint.cc \
+ src/core/ext/transport/chttp2/transport/writing.cc \
+ src/core/ext/transport/chttp2/alpn/alpn.cc \
+ src/core/ext/filters/http/client/http_client_filter.cc \
+ src/core/ext/filters/http/http_filters_plugin.cc \
+ src/core/ext/filters/http/message_compress/message_compress_filter.cc \
+ src/core/ext/filters/http/server/http_server_filter.cc \
+ src/core/ext/transport/chttp2/server/chttp2_server.cc \
+ src/core/ext/transport/chttp2/client/insecure/channel_create.cc \
+ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc \
+ src/core/ext/transport/chttp2/client/chttp2_connector.cc \
+ src/core/ext/filters/client_channel/channel_connectivity.cc \
+ src/core/ext/filters/client_channel/client_channel.cc \
+ src/core/ext/filters/client_channel/client_channel_factory.cc \
+ src/core/ext/filters/client_channel/client_channel_plugin.cc \
+ src/core/ext/filters/client_channel/connector.cc \
+ src/core/ext/filters/client_channel/http_connect_handshaker.cc \
+ src/core/ext/filters/client_channel/http_proxy.cc \
+ src/core/ext/filters/client_channel/lb_policy.cc \
+ src/core/ext/filters/client_channel/lb_policy_factory.cc \
+ src/core/ext/filters/client_channel/lb_policy_registry.cc \
+ src/core/ext/filters/client_channel/parse_address.cc \
+ src/core/ext/filters/client_channel/proxy_mapper.cc \
+ src/core/ext/filters/client_channel/proxy_mapper_registry.cc \
+ src/core/ext/filters/client_channel/resolver.cc \
+ src/core/ext/filters/client_channel/resolver_factory.cc \
+ src/core/ext/filters/client_channel/resolver_registry.cc \
+ src/core/ext/filters/client_channel/retry_throttle.cc \
+ src/core/ext/filters/client_channel/subchannel.cc \
+ src/core/ext/filters/client_channel/subchannel_index.cc \
+ src/core/ext/filters/client_channel/uri_parser.cc \
+ src/core/ext/filters/deadline/deadline_filter.cc \
+ src/core/ext/transport/inproc/inproc_plugin.cc \
+ src/core/ext/transport/inproc/inproc_transport.cc \
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc \
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc \
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc \
+ src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc \
+ src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc \
+ src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc \
+ src/core/ext/filters/load_reporting/server_load_reporting_filter.cc \
+ src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc \
+ src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc \
+ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc \
+ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc \
+ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc \
+ src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc \
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \
third_party/nanopb/pb_common.c \
third_party/nanopb/pb_decode.c \
third_party/nanopb/pb_encode.c \
- src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c \
- src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c \
- src/core/ext/census/base_resources.c \
- src/core/ext/census/context.c \
+ src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc \
+ src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc \
+ src/core/ext/census/base_resources.cc \
+ src/core/ext/census/context.cc \
src/core/ext/census/gen/census.pb.c \
src/core/ext/census/gen/trace_context.pb.c \
- src/core/ext/census/grpc_context.c \
- src/core/ext/census/grpc_filter.c \
- src/core/ext/census/grpc_plugin.c \
- src/core/ext/census/initialize.c \
- src/core/ext/census/intrusive_hash_map.c \
- src/core/ext/census/mlog.c \
- src/core/ext/census/operation.c \
- src/core/ext/census/placeholders.c \
- src/core/ext/census/resource.c \
- src/core/ext/census/trace_context.c \
- src/core/ext/census/tracing.c \
- src/core/ext/filters/max_age/max_age_filter.c \
- src/core/ext/filters/message_size/message_size_filter.c \
- src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c \
- src/core/ext/filters/workarounds/workaround_utils.c \
- src/core/plugin_registry/grpc_unsecure_plugin_registry.c \
+ src/core/ext/census/grpc_context.cc \
+ src/core/ext/census/grpc_filter.cc \
+ src/core/ext/census/grpc_plugin.cc \
+ src/core/ext/census/initialize.cc \
+ src/core/ext/census/intrusive_hash_map.cc \
+ src/core/ext/census/mlog.cc \
+ src/core/ext/census/operation.cc \
+ src/core/ext/census/placeholders.cc \
+ src/core/ext/census/resource.cc \
+ src/core/ext/census/trace_context.cc \
+ src/core/ext/census/tracing.cc \
+ src/core/ext/filters/max_age/max_age_filter.cc \
+ src/core/ext/filters/message_size/message_size_filter.cc \
+ src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc \
+ src/core/ext/filters/workarounds/workaround_utils.cc \
+ src/core/plugin_registry/grpc_unsecure_plugin_registry.cc \
PUBLIC_HEADERS_C += \
include/grpc/impl/codegen/byte_buffer.h \
@@ -4816,208 +4820,209 @@ LIBGRPC++_CRONET_SRC = \
src/cpp/util/string_ref.cc \
src/cpp/util/time_cc.cc \
src/cpp/codegen/codegen_init.cc \
- src/core/ext/transport/chttp2/client/insecure/channel_create.c \
- src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \
- src/core/ext/transport/chttp2/client/chttp2_connector.c \
- src/core/ext/transport/chttp2/transport/bin_decoder.c \
- src/core/ext/transport/chttp2/transport/bin_encoder.c \
- src/core/ext/transport/chttp2/transport/chttp2_plugin.c \
- src/core/ext/transport/chttp2/transport/chttp2_transport.c \
- src/core/ext/transport/chttp2/transport/flow_control.c \
- src/core/ext/transport/chttp2/transport/frame_data.c \
- src/core/ext/transport/chttp2/transport/frame_goaway.c \
- src/core/ext/transport/chttp2/transport/frame_ping.c \
- src/core/ext/transport/chttp2/transport/frame_rst_stream.c \
- src/core/ext/transport/chttp2/transport/frame_settings.c \
- src/core/ext/transport/chttp2/transport/frame_window_update.c \
- src/core/ext/transport/chttp2/transport/hpack_encoder.c \
- src/core/ext/transport/chttp2/transport/hpack_parser.c \
- src/core/ext/transport/chttp2/transport/hpack_table.c \
- src/core/ext/transport/chttp2/transport/http2_settings.c \
- src/core/ext/transport/chttp2/transport/huffsyms.c \
- src/core/ext/transport/chttp2/transport/incoming_metadata.c \
- src/core/ext/transport/chttp2/transport/parsing.c \
- src/core/ext/transport/chttp2/transport/stream_lists.c \
- src/core/ext/transport/chttp2/transport/stream_map.c \
- src/core/ext/transport/chttp2/transport/varint.c \
- src/core/ext/transport/chttp2/transport/writing.c \
- src/core/lib/channel/channel_args.c \
- src/core/lib/channel/channel_stack.c \
- src/core/lib/channel/channel_stack_builder.c \
- src/core/lib/channel/connected_channel.c \
- src/core/lib/channel/handshaker.c \
- src/core/lib/channel/handshaker_factory.c \
- src/core/lib/channel/handshaker_registry.c \
- src/core/lib/compression/compression.c \
- src/core/lib/compression/compression_internal.c \
- src/core/lib/compression/message_compress.c \
- src/core/lib/compression/stream_compression.c \
- src/core/lib/compression/stream_compression_gzip.c \
- src/core/lib/compression/stream_compression_identity.c \
- src/core/lib/debug/stats.c \
- src/core/lib/debug/stats_data.c \
- src/core/lib/http/format_request.c \
- src/core/lib/http/httpcli.c \
- src/core/lib/http/parser.c \
- src/core/lib/iomgr/call_combiner.c \
- src/core/lib/iomgr/closure.c \
- src/core/lib/iomgr/combiner.c \
- src/core/lib/iomgr/endpoint.c \
- src/core/lib/iomgr/endpoint_pair_posix.c \
- src/core/lib/iomgr/endpoint_pair_uv.c \
- src/core/lib/iomgr/endpoint_pair_windows.c \
- src/core/lib/iomgr/error.c \
- src/core/lib/iomgr/ev_epoll1_linux.c \
- src/core/lib/iomgr/ev_epollex_linux.c \
- src/core/lib/iomgr/ev_epollsig_linux.c \
- src/core/lib/iomgr/ev_poll_posix.c \
- src/core/lib/iomgr/ev_posix.c \
- src/core/lib/iomgr/ev_windows.c \
- src/core/lib/iomgr/exec_ctx.c \
- src/core/lib/iomgr/executor.c \
- src/core/lib/iomgr/gethostname_fallback.c \
- src/core/lib/iomgr/gethostname_host_name_max.c \
- src/core/lib/iomgr/gethostname_sysconf.c \
- src/core/lib/iomgr/iocp_windows.c \
- src/core/lib/iomgr/iomgr.c \
- src/core/lib/iomgr/iomgr_posix.c \
- src/core/lib/iomgr/iomgr_uv.c \
- src/core/lib/iomgr/iomgr_windows.c \
- src/core/lib/iomgr/is_epollexclusive_available.c \
- src/core/lib/iomgr/load_file.c \
- src/core/lib/iomgr/lockfree_event.c \
- src/core/lib/iomgr/network_status_tracker.c \
- src/core/lib/iomgr/polling_entity.c \
- src/core/lib/iomgr/pollset_set_uv.c \
- src/core/lib/iomgr/pollset_set_windows.c \
- src/core/lib/iomgr/pollset_uv.c \
- src/core/lib/iomgr/pollset_windows.c \
- src/core/lib/iomgr/resolve_address_posix.c \
- src/core/lib/iomgr/resolve_address_uv.c \
- src/core/lib/iomgr/resolve_address_windows.c \
- src/core/lib/iomgr/resource_quota.c \
- src/core/lib/iomgr/sockaddr_utils.c \
- src/core/lib/iomgr/socket_factory_posix.c \
- src/core/lib/iomgr/socket_mutator.c \
- src/core/lib/iomgr/socket_utils_common_posix.c \
- src/core/lib/iomgr/socket_utils_linux.c \
- src/core/lib/iomgr/socket_utils_posix.c \
- src/core/lib/iomgr/socket_utils_uv.c \
- src/core/lib/iomgr/socket_utils_windows.c \
- src/core/lib/iomgr/socket_windows.c \
- src/core/lib/iomgr/tcp_client_posix.c \
- src/core/lib/iomgr/tcp_client_uv.c \
- src/core/lib/iomgr/tcp_client_windows.c \
- src/core/lib/iomgr/tcp_posix.c \
- src/core/lib/iomgr/tcp_server_posix.c \
- src/core/lib/iomgr/tcp_server_utils_posix_common.c \
- src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c \
- src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c \
- src/core/lib/iomgr/tcp_server_uv.c \
- src/core/lib/iomgr/tcp_server_windows.c \
- src/core/lib/iomgr/tcp_uv.c \
- src/core/lib/iomgr/tcp_windows.c \
- src/core/lib/iomgr/time_averaged_stats.c \
- src/core/lib/iomgr/timer_generic.c \
- src/core/lib/iomgr/timer_heap.c \
- src/core/lib/iomgr/timer_manager.c \
- src/core/lib/iomgr/timer_uv.c \
- src/core/lib/iomgr/udp_server.c \
- src/core/lib/iomgr/unix_sockets_posix.c \
- src/core/lib/iomgr/unix_sockets_posix_noop.c \
- src/core/lib/iomgr/wakeup_fd_cv.c \
- src/core/lib/iomgr/wakeup_fd_eventfd.c \
- src/core/lib/iomgr/wakeup_fd_nospecial.c \
- src/core/lib/iomgr/wakeup_fd_pipe.c \
- src/core/lib/iomgr/wakeup_fd_posix.c \
- src/core/lib/json/json.c \
- src/core/lib/json/json_reader.c \
- src/core/lib/json/json_string.c \
- src/core/lib/json/json_writer.c \
- src/core/lib/slice/b64.c \
- src/core/lib/slice/percent_encoding.c \
- src/core/lib/slice/slice.c \
- src/core/lib/slice/slice_buffer.c \
- src/core/lib/slice/slice_hash_table.c \
- src/core/lib/slice/slice_intern.c \
- src/core/lib/slice/slice_string_helpers.c \
- src/core/lib/surface/alarm.c \
- src/core/lib/surface/api_trace.c \
- src/core/lib/surface/byte_buffer.c \
- src/core/lib/surface/byte_buffer_reader.c \
- src/core/lib/surface/call.c \
- src/core/lib/surface/call_details.c \
- src/core/lib/surface/call_log_batch.c \
- src/core/lib/surface/channel.c \
- src/core/lib/surface/channel_init.c \
- src/core/lib/surface/channel_ping.c \
- src/core/lib/surface/channel_stack_type.c \
- src/core/lib/surface/completion_queue.c \
- src/core/lib/surface/completion_queue_factory.c \
- src/core/lib/surface/event_string.c \
+ src/core/ext/transport/chttp2/client/insecure/channel_create.cc \
+ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc \
+ src/core/ext/transport/chttp2/client/chttp2_connector.cc \
+ src/core/ext/transport/chttp2/transport/bin_decoder.cc \
+ src/core/ext/transport/chttp2/transport/bin_encoder.cc \
+ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc \
+ src/core/ext/transport/chttp2/transport/chttp2_transport.cc \
+ src/core/ext/transport/chttp2/transport/flow_control.cc \
+ src/core/ext/transport/chttp2/transport/frame_data.cc \
+ src/core/ext/transport/chttp2/transport/frame_goaway.cc \
+ src/core/ext/transport/chttp2/transport/frame_ping.cc \
+ src/core/ext/transport/chttp2/transport/frame_rst_stream.cc \
+ src/core/ext/transport/chttp2/transport/frame_settings.cc \
+ src/core/ext/transport/chttp2/transport/frame_window_update.cc \
+ src/core/ext/transport/chttp2/transport/hpack_encoder.cc \
+ src/core/ext/transport/chttp2/transport/hpack_parser.cc \
+ src/core/ext/transport/chttp2/transport/hpack_table.cc \
+ src/core/ext/transport/chttp2/transport/http2_settings.cc \
+ src/core/ext/transport/chttp2/transport/huffsyms.cc \
+ src/core/ext/transport/chttp2/transport/incoming_metadata.cc \
+ src/core/ext/transport/chttp2/transport/parsing.cc \
+ src/core/ext/transport/chttp2/transport/stream_lists.cc \
+ src/core/ext/transport/chttp2/transport/stream_map.cc \
+ src/core/ext/transport/chttp2/transport/varint.cc \
+ src/core/ext/transport/chttp2/transport/writing.cc \
+ src/core/lib/backoff/backoff.cc \
+ src/core/lib/channel/channel_args.cc \
+ src/core/lib/channel/channel_stack.cc \
+ src/core/lib/channel/channel_stack_builder.cc \
+ src/core/lib/channel/connected_channel.cc \
+ src/core/lib/channel/handshaker.cc \
+ 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/message_compress.cc \
+ src/core/lib/compression/stream_compression.cc \
+ src/core/lib/compression/stream_compression_gzip.cc \
+ src/core/lib/compression/stream_compression_identity.cc \
+ src/core/lib/debug/stats.cc \
+ src/core/lib/debug/stats_data.cc \
+ src/core/lib/http/format_request.cc \
+ src/core/lib/http/httpcli.cc \
+ src/core/lib/http/parser.cc \
+ src/core/lib/iomgr/call_combiner.cc \
+ src/core/lib/iomgr/closure.cc \
+ src/core/lib/iomgr/combiner.cc \
+ src/core/lib/iomgr/endpoint.cc \
+ src/core/lib/iomgr/endpoint_pair_posix.cc \
+ src/core/lib/iomgr/endpoint_pair_uv.cc \
+ src/core/lib/iomgr/endpoint_pair_windows.cc \
+ src/core/lib/iomgr/error.cc \
+ src/core/lib/iomgr/ev_epoll1_linux.cc \
+ src/core/lib/iomgr/ev_epollex_linux.cc \
+ src/core/lib/iomgr/ev_epollsig_linux.cc \
+ src/core/lib/iomgr/ev_poll_posix.cc \
+ src/core/lib/iomgr/ev_posix.cc \
+ src/core/lib/iomgr/ev_windows.cc \
+ src/core/lib/iomgr/exec_ctx.cc \
+ src/core/lib/iomgr/executor.cc \
+ src/core/lib/iomgr/gethostname_fallback.cc \
+ src/core/lib/iomgr/gethostname_host_name_max.cc \
+ src/core/lib/iomgr/gethostname_sysconf.cc \
+ src/core/lib/iomgr/iocp_windows.cc \
+ src/core/lib/iomgr/iomgr.cc \
+ src/core/lib/iomgr/iomgr_posix.cc \
+ src/core/lib/iomgr/iomgr_uv.cc \
+ src/core/lib/iomgr/iomgr_windows.cc \
+ src/core/lib/iomgr/is_epollexclusive_available.cc \
+ src/core/lib/iomgr/load_file.cc \
+ src/core/lib/iomgr/lockfree_event.cc \
+ src/core/lib/iomgr/network_status_tracker.cc \
+ src/core/lib/iomgr/polling_entity.cc \
+ src/core/lib/iomgr/pollset_set_uv.cc \
+ src/core/lib/iomgr/pollset_set_windows.cc \
+ src/core/lib/iomgr/pollset_uv.cc \
+ src/core/lib/iomgr/pollset_windows.cc \
+ src/core/lib/iomgr/resolve_address_posix.cc \
+ src/core/lib/iomgr/resolve_address_uv.cc \
+ src/core/lib/iomgr/resolve_address_windows.cc \
+ src/core/lib/iomgr/resource_quota.cc \
+ src/core/lib/iomgr/sockaddr_utils.cc \
+ src/core/lib/iomgr/socket_factory_posix.cc \
+ src/core/lib/iomgr/socket_mutator.cc \
+ src/core/lib/iomgr/socket_utils_common_posix.cc \
+ src/core/lib/iomgr/socket_utils_linux.cc \
+ src/core/lib/iomgr/socket_utils_posix.cc \
+ src/core/lib/iomgr/socket_utils_uv.cc \
+ src/core/lib/iomgr/socket_utils_windows.cc \
+ src/core/lib/iomgr/socket_windows.cc \
+ src/core/lib/iomgr/tcp_client_posix.cc \
+ src/core/lib/iomgr/tcp_client_uv.cc \
+ src/core/lib/iomgr/tcp_client_windows.cc \
+ src/core/lib/iomgr/tcp_posix.cc \
+ src/core/lib/iomgr/tcp_server_posix.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_common.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
+ src/core/lib/iomgr/tcp_server_uv.cc \
+ src/core/lib/iomgr/tcp_server_windows.cc \
+ src/core/lib/iomgr/tcp_uv.cc \
+ src/core/lib/iomgr/tcp_windows.cc \
+ src/core/lib/iomgr/time_averaged_stats.cc \
+ src/core/lib/iomgr/timer_generic.cc \
+ src/core/lib/iomgr/timer_heap.cc \
+ src/core/lib/iomgr/timer_manager.cc \
+ src/core/lib/iomgr/timer_uv.cc \
+ src/core/lib/iomgr/udp_server.cc \
+ src/core/lib/iomgr/unix_sockets_posix.cc \
+ src/core/lib/iomgr/unix_sockets_posix_noop.cc \
+ src/core/lib/iomgr/wakeup_fd_cv.cc \
+ src/core/lib/iomgr/wakeup_fd_eventfd.cc \
+ src/core/lib/iomgr/wakeup_fd_nospecial.cc \
+ src/core/lib/iomgr/wakeup_fd_pipe.cc \
+ src/core/lib/iomgr/wakeup_fd_posix.cc \
+ src/core/lib/json/json.cc \
+ src/core/lib/json/json_reader.cc \
+ src/core/lib/json/json_string.cc \
+ src/core/lib/json/json_writer.cc \
+ src/core/lib/slice/b64.cc \
+ src/core/lib/slice/percent_encoding.cc \
+ src/core/lib/slice/slice.cc \
+ src/core/lib/slice/slice_buffer.cc \
+ src/core/lib/slice/slice_hash_table.cc \
+ src/core/lib/slice/slice_intern.cc \
+ src/core/lib/slice/slice_string_helpers.cc \
+ src/core/lib/surface/alarm.cc \
+ src/core/lib/surface/api_trace.cc \
+ src/core/lib/surface/byte_buffer.cc \
+ src/core/lib/surface/byte_buffer_reader.cc \
+ src/core/lib/surface/call.cc \
+ src/core/lib/surface/call_details.cc \
+ src/core/lib/surface/call_log_batch.cc \
+ src/core/lib/surface/channel.cc \
+ src/core/lib/surface/channel_init.cc \
+ src/core/lib/surface/channel_ping.cc \
+ src/core/lib/surface/channel_stack_type.cc \
+ src/core/lib/surface/completion_queue.cc \
+ src/core/lib/surface/completion_queue_factory.cc \
+ src/core/lib/surface/event_string.cc \
src/core/lib/surface/lame_client.cc \
- src/core/lib/surface/metadata_array.c \
- src/core/lib/surface/server.c \
- src/core/lib/surface/validate_metadata.c \
- src/core/lib/surface/version.c \
- src/core/lib/transport/bdp_estimator.c \
- src/core/lib/transport/byte_stream.c \
- src/core/lib/transport/connectivity_state.c \
- src/core/lib/transport/error_utils.c \
- src/core/lib/transport/metadata.c \
- src/core/lib/transport/metadata_batch.c \
- src/core/lib/transport/pid_controller.c \
- src/core/lib/transport/service_config.c \
- src/core/lib/transport/static_metadata.c \
- src/core/lib/transport/status_conversion.c \
- src/core/lib/transport/timeout_encoding.c \
- src/core/lib/transport/transport.c \
- src/core/lib/transport/transport_op_string.c \
- src/core/lib/debug/trace.c \
- src/core/ext/transport/chttp2/alpn/alpn.c \
- src/core/ext/filters/http/client/http_client_filter.c \
- src/core/ext/filters/http/http_filters_plugin.c \
- src/core/ext/filters/http/message_compress/message_compress_filter.c \
- src/core/ext/filters/http/server/http_server_filter.c \
- src/core/ext/filters/client_channel/channel_connectivity.c \
- src/core/ext/filters/client_channel/client_channel.c \
- src/core/ext/filters/client_channel/client_channel_factory.c \
- src/core/ext/filters/client_channel/client_channel_plugin.c \
- src/core/ext/filters/client_channel/connector.c \
- src/core/ext/filters/client_channel/http_connect_handshaker.c \
- src/core/ext/filters/client_channel/http_proxy.c \
- src/core/ext/filters/client_channel/lb_policy.c \
- src/core/ext/filters/client_channel/lb_policy_factory.c \
- src/core/ext/filters/client_channel/lb_policy_registry.c \
- src/core/ext/filters/client_channel/parse_address.c \
- src/core/ext/filters/client_channel/proxy_mapper.c \
- src/core/ext/filters/client_channel/proxy_mapper_registry.c \
- src/core/ext/filters/client_channel/resolver.c \
- src/core/ext/filters/client_channel/resolver_factory.c \
- src/core/ext/filters/client_channel/resolver_registry.c \
- src/core/ext/filters/client_channel/retry_throttle.c \
- src/core/ext/filters/client_channel/subchannel.c \
- src/core/ext/filters/client_channel/subchannel_index.c \
- src/core/ext/filters/client_channel/uri_parser.c \
- src/core/ext/filters/deadline/deadline_filter.c \
- src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \
- src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \
- src/core/ext/transport/chttp2/server/chttp2_server.c \
- src/core/ext/census/base_resources.c \
- src/core/ext/census/context.c \
+ src/core/lib/surface/metadata_array.cc \
+ src/core/lib/surface/server.cc \
+ src/core/lib/surface/validate_metadata.cc \
+ src/core/lib/surface/version.cc \
+ src/core/lib/transport/bdp_estimator.cc \
+ src/core/lib/transport/byte_stream.cc \
+ src/core/lib/transport/connectivity_state.cc \
+ src/core/lib/transport/error_utils.cc \
+ src/core/lib/transport/metadata.cc \
+ src/core/lib/transport/metadata_batch.cc \
+ src/core/lib/transport/pid_controller.cc \
+ src/core/lib/transport/service_config.cc \
+ src/core/lib/transport/static_metadata.cc \
+ src/core/lib/transport/status_conversion.cc \
+ src/core/lib/transport/timeout_encoding.cc \
+ src/core/lib/transport/transport.cc \
+ src/core/lib/transport/transport_op_string.cc \
+ src/core/lib/debug/trace.cc \
+ src/core/ext/transport/chttp2/alpn/alpn.cc \
+ src/core/ext/filters/http/client/http_client_filter.cc \
+ src/core/ext/filters/http/http_filters_plugin.cc \
+ src/core/ext/filters/http/message_compress/message_compress_filter.cc \
+ src/core/ext/filters/http/server/http_server_filter.cc \
+ src/core/ext/filters/client_channel/channel_connectivity.cc \
+ src/core/ext/filters/client_channel/client_channel.cc \
+ src/core/ext/filters/client_channel/client_channel_factory.cc \
+ src/core/ext/filters/client_channel/client_channel_plugin.cc \
+ src/core/ext/filters/client_channel/connector.cc \
+ src/core/ext/filters/client_channel/http_connect_handshaker.cc \
+ src/core/ext/filters/client_channel/http_proxy.cc \
+ src/core/ext/filters/client_channel/lb_policy.cc \
+ src/core/ext/filters/client_channel/lb_policy_factory.cc \
+ src/core/ext/filters/client_channel/lb_policy_registry.cc \
+ src/core/ext/filters/client_channel/parse_address.cc \
+ src/core/ext/filters/client_channel/proxy_mapper.cc \
+ src/core/ext/filters/client_channel/proxy_mapper_registry.cc \
+ src/core/ext/filters/client_channel/resolver.cc \
+ src/core/ext/filters/client_channel/resolver_factory.cc \
+ src/core/ext/filters/client_channel/resolver_registry.cc \
+ src/core/ext/filters/client_channel/retry_throttle.cc \
+ src/core/ext/filters/client_channel/subchannel.cc \
+ src/core/ext/filters/client_channel/subchannel_index.cc \
+ src/core/ext/filters/client_channel/uri_parser.cc \
+ src/core/ext/filters/deadline/deadline_filter.cc \
+ src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc \
+ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc \
+ src/core/ext/transport/chttp2/server/chttp2_server.cc \
+ src/core/ext/census/base_resources.cc \
+ src/core/ext/census/context.cc \
src/core/ext/census/gen/census.pb.c \
src/core/ext/census/gen/trace_context.pb.c \
- src/core/ext/census/grpc_context.c \
- src/core/ext/census/grpc_filter.c \
- src/core/ext/census/grpc_plugin.c \
- src/core/ext/census/initialize.c \
- src/core/ext/census/intrusive_hash_map.c \
- src/core/ext/census/mlog.c \
- src/core/ext/census/operation.c \
- src/core/ext/census/placeholders.c \
- src/core/ext/census/resource.c \
- src/core/ext/census/trace_context.c \
- src/core/ext/census/tracing.c \
+ src/core/ext/census/grpc_context.cc \
+ src/core/ext/census/grpc_filter.cc \
+ src/core/ext/census/grpc_plugin.cc \
+ src/core/ext/census/initialize.cc \
+ src/core/ext/census/intrusive_hash_map.cc \
+ src/core/ext/census/mlog.cc \
+ src/core/ext/census/operation.cc \
+ src/core/ext/census/placeholders.cc \
+ src/core/ext/census/resource.cc \
+ src/core/ext/census/trace_context.cc \
+ src/core/ext/census/tracing.cc \
third_party/nanopb/pb_common.c \
third_party/nanopb/pb_decode.c \
third_party/nanopb/pb_encode.c \
@@ -8898,6 +8903,38 @@ endif
endif
+BACKOFF_TEST_SRC = \
+ test/core/backoff/backoff_test.c \
+
+BACKOFF_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(BACKOFF_TEST_SRC))))
+ifeq ($(NO_SECURE),true)
+
+# You can't build secure targets if you don't have OpenSSL.
+
+$(BINDIR)/$(CONFIG)/backoff_test: openssl_dep_error
+
+else
+
+
+
+$(BINDIR)/$(CONFIG)/backoff_test: $(BACKOFF_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+ $(E) "[LD] Linking $@"
+ $(Q) mkdir -p `dirname $@`
+ $(Q) $(LD) $(LDFLAGS) $(BACKOFF_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/backoff_test
+
+endif
+
+$(OBJDIR)/$(CONFIG)/test/core/backoff/backoff_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
+
+deps_backoff_test: $(BACKOFF_TEST_OBJS:.o=.dep)
+
+ifneq ($(NO_SECURE),true)
+ifneq ($(NO_DEPS),true)
+-include $(BACKOFF_TEST_OBJS:.o=.dep)
+endif
+endif
+
+
BAD_SERVER_RESPONSE_TEST_SRC = \
test/core/end2end/bad_server_response_test.c \
@@ -10117,38 +10154,6 @@ endif
endif
-GPR_BACKOFF_TEST_SRC = \
- test/core/support/backoff_test.c \
-
-GPR_BACKOFF_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_BACKOFF_TEST_SRC))))
-ifeq ($(NO_SECURE),true)
-
-# You can't build secure targets if you don't have OpenSSL.
-
-$(BINDIR)/$(CONFIG)/gpr_backoff_test: openssl_dep_error
-
-else
-
-
-
-$(BINDIR)/$(CONFIG)/gpr_backoff_test: $(GPR_BACKOFF_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
- $(E) "[LD] Linking $@"
- $(Q) mkdir -p `dirname $@`
- $(Q) $(LD) $(LDFLAGS) $(GPR_BACKOFF_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_backoff_test
-
-endif
-
-$(OBJDIR)/$(CONFIG)/test/core/support/backoff_test.o: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
-
-deps_gpr_backoff_test: $(GPR_BACKOFF_TEST_OBJS:.o=.dep)
-
-ifneq ($(NO_SECURE),true)
-ifneq ($(NO_DEPS),true)
--include $(GPR_BACKOFF_TEST_OBJS:.o=.dep)
-endif
-endif
-
-
GPR_CMDLINE_TEST_SRC = \
test/core/support/cmdline_test.c \
@@ -20164,44 +20169,44 @@ ifneq ($(OPENSSL_DEP),)
# This is to ensure the embedded OpenSSL is built beforehand, properly
# installing headers to their final destination on the drive. We need this
# otherwise parallel compilation will fail if a source is compiled first.
-src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c: $(OPENSSL_DEP)
-src/core/ext/transport/chttp2/client/secure/secure_channel_create.c: $(OPENSSL_DEP)
-src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c: $(OPENSSL_DEP)
-src/core/ext/transport/cronet/client/secure/cronet_channel_create.c: $(OPENSSL_DEP)
-src/core/ext/transport/cronet/transport/cronet_api_dummy.c: $(OPENSSL_DEP)
-src/core/ext/transport/cronet/transport/cronet_transport.c: $(OPENSSL_DEP)
-src/core/lib/http/httpcli_security_connector.c: $(OPENSSL_DEP)
-src/core/lib/security/context/security_context.c: $(OPENSSL_DEP)
-src/core/lib/security/credentials/composite/composite_credentials.c: $(OPENSSL_DEP)
-src/core/lib/security/credentials/credentials.c: $(OPENSSL_DEP)
-src/core/lib/security/credentials/credentials_metadata.c: $(OPENSSL_DEP)
-src/core/lib/security/credentials/fake/fake_credentials.c: $(OPENSSL_DEP)
-src/core/lib/security/credentials/google_default/credentials_generic.c: $(OPENSSL_DEP)
-src/core/lib/security/credentials/google_default/google_default_credentials.c: $(OPENSSL_DEP)
-src/core/lib/security/credentials/iam/iam_credentials.c: $(OPENSSL_DEP)
-src/core/lib/security/credentials/jwt/json_token.c: $(OPENSSL_DEP)
-src/core/lib/security/credentials/jwt/jwt_credentials.c: $(OPENSSL_DEP)
-src/core/lib/security/credentials/jwt/jwt_verifier.c: $(OPENSSL_DEP)
-src/core/lib/security/credentials/oauth2/oauth2_credentials.c: $(OPENSSL_DEP)
-src/core/lib/security/credentials/plugin/plugin_credentials.c: $(OPENSSL_DEP)
-src/core/lib/security/credentials/ssl/ssl_credentials.c: $(OPENSSL_DEP)
-src/core/lib/security/transport/client_auth_filter.c: $(OPENSSL_DEP)
-src/core/lib/security/transport/lb_targets_info.c: $(OPENSSL_DEP)
-src/core/lib/security/transport/secure_endpoint.c: $(OPENSSL_DEP)
-src/core/lib/security/transport/security_connector.c: $(OPENSSL_DEP)
-src/core/lib/security/transport/security_handshaker.c: $(OPENSSL_DEP)
-src/core/lib/security/transport/server_auth_filter.c: $(OPENSSL_DEP)
-src/core/lib/security/transport/tsi_error.c: $(OPENSSL_DEP)
-src/core/lib/security/util/json_util.c: $(OPENSSL_DEP)
-src/core/lib/surface/init_secure.c: $(OPENSSL_DEP)
-src/core/plugin_registry/grpc_cronet_plugin_registry.c: $(OPENSSL_DEP)
-src/core/plugin_registry/grpc_plugin_registry.c: $(OPENSSL_DEP)
-src/core/tsi/fake_transport_security.c: $(OPENSSL_DEP)
-src/core/tsi/gts_transport_security.c: $(OPENSSL_DEP)
-src/core/tsi/ssl_transport_security.c: $(OPENSSL_DEP)
-src/core/tsi/transport_security.c: $(OPENSSL_DEP)
-src/core/tsi/transport_security_adapter.c: $(OPENSSL_DEP)
-src/core/tsi/transport_security_grpc.c: $(OPENSSL_DEP)
+src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc: $(OPENSSL_DEP)
+src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc: $(OPENSSL_DEP)
+src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc: $(OPENSSL_DEP)
+src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc: $(OPENSSL_DEP)
+src/core/ext/transport/cronet/transport/cronet_api_dummy.cc: $(OPENSSL_DEP)
+src/core/ext/transport/cronet/transport/cronet_transport.cc: $(OPENSSL_DEP)
+src/core/lib/http/httpcli_security_connector.cc: $(OPENSSL_DEP)
+src/core/lib/security/context/security_context.cc: $(OPENSSL_DEP)
+src/core/lib/security/credentials/composite/composite_credentials.cc: $(OPENSSL_DEP)
+src/core/lib/security/credentials/credentials.cc: $(OPENSSL_DEP)
+src/core/lib/security/credentials/credentials_metadata.cc: $(OPENSSL_DEP)
+src/core/lib/security/credentials/fake/fake_credentials.cc: $(OPENSSL_DEP)
+src/core/lib/security/credentials/google_default/credentials_generic.cc: $(OPENSSL_DEP)
+src/core/lib/security/credentials/google_default/google_default_credentials.cc: $(OPENSSL_DEP)
+src/core/lib/security/credentials/iam/iam_credentials.cc: $(OPENSSL_DEP)
+src/core/lib/security/credentials/jwt/json_token.cc: $(OPENSSL_DEP)
+src/core/lib/security/credentials/jwt/jwt_credentials.cc: $(OPENSSL_DEP)
+src/core/lib/security/credentials/jwt/jwt_verifier.cc: $(OPENSSL_DEP)
+src/core/lib/security/credentials/oauth2/oauth2_credentials.cc: $(OPENSSL_DEP)
+src/core/lib/security/credentials/plugin/plugin_credentials.cc: $(OPENSSL_DEP)
+src/core/lib/security/credentials/ssl/ssl_credentials.cc: $(OPENSSL_DEP)
+src/core/lib/security/transport/client_auth_filter.cc: $(OPENSSL_DEP)
+src/core/lib/security/transport/lb_targets_info.cc: $(OPENSSL_DEP)
+src/core/lib/security/transport/secure_endpoint.cc: $(OPENSSL_DEP)
+src/core/lib/security/transport/security_connector.cc: $(OPENSSL_DEP)
+src/core/lib/security/transport/security_handshaker.cc: $(OPENSSL_DEP)
+src/core/lib/security/transport/server_auth_filter.cc: $(OPENSSL_DEP)
+src/core/lib/security/transport/tsi_error.cc: $(OPENSSL_DEP)
+src/core/lib/security/util/json_util.cc: $(OPENSSL_DEP)
+src/core/lib/surface/init_secure.cc: $(OPENSSL_DEP)
+src/core/plugin_registry/grpc_cronet_plugin_registry.cc: $(OPENSSL_DEP)
+src/core/plugin_registry/grpc_plugin_registry.cc: $(OPENSSL_DEP)
+src/core/tsi/fake_transport_security.cc: $(OPENSSL_DEP)
+src/core/tsi/gts_transport_security.cc: $(OPENSSL_DEP)
+src/core/tsi/ssl_transport_security.cc: $(OPENSSL_DEP)
+src/core/tsi/transport_security.cc: $(OPENSSL_DEP)
+src/core/tsi/transport_security_adapter.cc: $(OPENSSL_DEP)
+src/core/tsi/transport_security_grpc.cc: $(OPENSSL_DEP)
src/cpp/client/cronet_credentials.cc: $(OPENSSL_DEP)
src/cpp/client/secure_credentials.cc: $(OPENSSL_DEP)
src/cpp/common/auth_property_iterator.cc: $(OPENSSL_DEP)
diff --git a/Rakefile b/Rakefile
index 1e8960eab8..d76b9ff657 100755
--- a/Rakefile
+++ b/Rakefile
@@ -80,7 +80,9 @@ task 'dlls' do
grpc_config = ENV['GRPC_CONFIG'] || 'opt'
verbose = ENV['V'] || '0'
- env = 'CPPFLAGS="-D_WIN32_WINNT=0x600 -DUNICODE -D_UNICODE -Wno-unused-variable -Wno-unused-result -DCARES_STATICLIB -Wno-error=conversion -Wno-incompatible-pointer-types -Wno-sign-compare -Wno-parentheses" '
+ env = 'CPPFLAGS="-D_WIN32_WINNT=0x600 -DNTDDI_VERSION=0x06000000 -DUNICODE -D_UNICODE -Wno-unused-variable -Wno-unused-result -DCARES_STATICLIB -Wno-error=conversion -Wno-sign-compare -Wno-parentheses -Wno-format -DWIN32_LEAN_AND_MEAN" '
+ env += 'CFLAGS="-Wno-incompatible-pointer-types" '
+ env += 'CXXFLAGS="-std=c++11" '
env += 'LDFLAGS=-static '
env += 'SYSTEM=MINGW32 '
env += 'EMBED_ZLIB=true '
diff --git a/binding.gyp b/binding.gyp
index 7cb65c1d6d..03daaf0966 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -101,6 +101,7 @@
'-fprofile-arcs',
'-ftest-coverage',
'-rdynamic',
+ '-lstdc++',
],
}],
['grpc_alpine=="true"', {
@@ -593,52 +594,51 @@
'dependencies': [
],
'sources': [
- 'src/core/lib/profiling/basic_timers.c',
- 'src/core/lib/profiling/stap_timers.c',
- 'src/core/lib/support/alloc.c',
- 'src/core/lib/support/arena.c',
- 'src/core/lib/support/atm.c',
- 'src/core/lib/support/avl.c',
- 'src/core/lib/support/backoff.c',
- 'src/core/lib/support/cmdline.c',
- 'src/core/lib/support/cpu_iphone.c',
- 'src/core/lib/support/cpu_linux.c',
- 'src/core/lib/support/cpu_posix.c',
- 'src/core/lib/support/cpu_windows.c',
- 'src/core/lib/support/env_linux.c',
- 'src/core/lib/support/env_posix.c',
- 'src/core/lib/support/env_windows.c',
- 'src/core/lib/support/histogram.c',
- 'src/core/lib/support/host_port.c',
- 'src/core/lib/support/log.c',
- 'src/core/lib/support/log_android.c',
- 'src/core/lib/support/log_linux.c',
- 'src/core/lib/support/log_posix.c',
- 'src/core/lib/support/log_windows.c',
- 'src/core/lib/support/mpscq.c',
- 'src/core/lib/support/murmur_hash.c',
- 'src/core/lib/support/stack_lockfree.c',
- 'src/core/lib/support/string.c',
- 'src/core/lib/support/string_posix.c',
- 'src/core/lib/support/string_util_windows.c',
- 'src/core/lib/support/string_windows.c',
- 'src/core/lib/support/subprocess_posix.c',
- 'src/core/lib/support/subprocess_windows.c',
- 'src/core/lib/support/sync.c',
- 'src/core/lib/support/sync_posix.c',
- 'src/core/lib/support/sync_windows.c',
- 'src/core/lib/support/thd.c',
- 'src/core/lib/support/thd_posix.c',
- 'src/core/lib/support/thd_windows.c',
- 'src/core/lib/support/time.c',
- 'src/core/lib/support/time_posix.c',
- 'src/core/lib/support/time_precise.c',
- 'src/core/lib/support/time_windows.c',
- 'src/core/lib/support/tls_pthread.c',
- 'src/core/lib/support/tmpfile_msys.c',
- 'src/core/lib/support/tmpfile_posix.c',
- 'src/core/lib/support/tmpfile_windows.c',
- 'src/core/lib/support/wrap_memcpy.c',
+ 'src/core/lib/profiling/basic_timers.cc',
+ 'src/core/lib/profiling/stap_timers.cc',
+ 'src/core/lib/support/alloc.cc',
+ 'src/core/lib/support/arena.cc',
+ 'src/core/lib/support/atm.cc',
+ 'src/core/lib/support/avl.cc',
+ 'src/core/lib/support/cmdline.cc',
+ 'src/core/lib/support/cpu_iphone.cc',
+ 'src/core/lib/support/cpu_linux.cc',
+ 'src/core/lib/support/cpu_posix.cc',
+ 'src/core/lib/support/cpu_windows.cc',
+ 'src/core/lib/support/env_linux.cc',
+ 'src/core/lib/support/env_posix.cc',
+ 'src/core/lib/support/env_windows.cc',
+ 'src/core/lib/support/histogram.cc',
+ 'src/core/lib/support/host_port.cc',
+ 'src/core/lib/support/log.cc',
+ 'src/core/lib/support/log_android.cc',
+ 'src/core/lib/support/log_linux.cc',
+ 'src/core/lib/support/log_posix.cc',
+ 'src/core/lib/support/log_windows.cc',
+ 'src/core/lib/support/mpscq.cc',
+ 'src/core/lib/support/murmur_hash.cc',
+ 'src/core/lib/support/stack_lockfree.cc',
+ 'src/core/lib/support/string.cc',
+ 'src/core/lib/support/string_posix.cc',
+ 'src/core/lib/support/string_util_windows.cc',
+ 'src/core/lib/support/string_windows.cc',
+ 'src/core/lib/support/subprocess_posix.cc',
+ 'src/core/lib/support/subprocess_windows.cc',
+ 'src/core/lib/support/sync.cc',
+ 'src/core/lib/support/sync_posix.cc',
+ 'src/core/lib/support/sync_windows.cc',
+ 'src/core/lib/support/thd.cc',
+ 'src/core/lib/support/thd_posix.cc',
+ 'src/core/lib/support/thd_windows.cc',
+ 'src/core/lib/support/time.cc',
+ 'src/core/lib/support/time_posix.cc',
+ 'src/core/lib/support/time_precise.cc',
+ 'src/core/lib/support/time_windows.cc',
+ 'src/core/lib/support/tls_pthread.cc',
+ 'src/core/lib/support/tmpfile_msys.cc',
+ 'src/core/lib/support/tmpfile_posix.cc',
+ 'src/core/lib/support/tmpfile_windows.cc',
+ 'src/core/lib/support/wrap_memcpy.cc',
],
'conditions': [
['OS == "mac"', {
@@ -656,268 +656,269 @@
'gpr',
],
'sources': [
- 'src/core/lib/surface/init.c',
- 'src/core/lib/channel/channel_args.c',
- 'src/core/lib/channel/channel_stack.c',
- 'src/core/lib/channel/channel_stack_builder.c',
- 'src/core/lib/channel/connected_channel.c',
- 'src/core/lib/channel/handshaker.c',
- 'src/core/lib/channel/handshaker_factory.c',
- 'src/core/lib/channel/handshaker_registry.c',
- 'src/core/lib/compression/compression.c',
- 'src/core/lib/compression/compression_internal.c',
- 'src/core/lib/compression/message_compress.c',
- 'src/core/lib/compression/stream_compression.c',
- 'src/core/lib/compression/stream_compression_gzip.c',
- 'src/core/lib/compression/stream_compression_identity.c',
- 'src/core/lib/debug/stats.c',
- 'src/core/lib/debug/stats_data.c',
- 'src/core/lib/http/format_request.c',
- 'src/core/lib/http/httpcli.c',
- 'src/core/lib/http/parser.c',
- 'src/core/lib/iomgr/call_combiner.c',
- 'src/core/lib/iomgr/closure.c',
- 'src/core/lib/iomgr/combiner.c',
- 'src/core/lib/iomgr/endpoint.c',
- 'src/core/lib/iomgr/endpoint_pair_posix.c',
- 'src/core/lib/iomgr/endpoint_pair_uv.c',
- 'src/core/lib/iomgr/endpoint_pair_windows.c',
- 'src/core/lib/iomgr/error.c',
- 'src/core/lib/iomgr/ev_epoll1_linux.c',
- 'src/core/lib/iomgr/ev_epollex_linux.c',
- 'src/core/lib/iomgr/ev_epollsig_linux.c',
- 'src/core/lib/iomgr/ev_poll_posix.c',
- 'src/core/lib/iomgr/ev_posix.c',
- 'src/core/lib/iomgr/ev_windows.c',
- 'src/core/lib/iomgr/exec_ctx.c',
- 'src/core/lib/iomgr/executor.c',
- 'src/core/lib/iomgr/gethostname_fallback.c',
- 'src/core/lib/iomgr/gethostname_host_name_max.c',
- 'src/core/lib/iomgr/gethostname_sysconf.c',
- 'src/core/lib/iomgr/iocp_windows.c',
- 'src/core/lib/iomgr/iomgr.c',
- 'src/core/lib/iomgr/iomgr_posix.c',
- 'src/core/lib/iomgr/iomgr_uv.c',
- 'src/core/lib/iomgr/iomgr_windows.c',
- 'src/core/lib/iomgr/is_epollexclusive_available.c',
- 'src/core/lib/iomgr/load_file.c',
- 'src/core/lib/iomgr/lockfree_event.c',
- 'src/core/lib/iomgr/network_status_tracker.c',
- 'src/core/lib/iomgr/polling_entity.c',
- 'src/core/lib/iomgr/pollset_set_uv.c',
- 'src/core/lib/iomgr/pollset_set_windows.c',
- 'src/core/lib/iomgr/pollset_uv.c',
- 'src/core/lib/iomgr/pollset_windows.c',
- 'src/core/lib/iomgr/resolve_address_posix.c',
- 'src/core/lib/iomgr/resolve_address_uv.c',
- 'src/core/lib/iomgr/resolve_address_windows.c',
- 'src/core/lib/iomgr/resource_quota.c',
- 'src/core/lib/iomgr/sockaddr_utils.c',
- 'src/core/lib/iomgr/socket_factory_posix.c',
- 'src/core/lib/iomgr/socket_mutator.c',
- 'src/core/lib/iomgr/socket_utils_common_posix.c',
- 'src/core/lib/iomgr/socket_utils_linux.c',
- 'src/core/lib/iomgr/socket_utils_posix.c',
- 'src/core/lib/iomgr/socket_utils_uv.c',
- 'src/core/lib/iomgr/socket_utils_windows.c',
- 'src/core/lib/iomgr/socket_windows.c',
- 'src/core/lib/iomgr/tcp_client_posix.c',
- 'src/core/lib/iomgr/tcp_client_uv.c',
- 'src/core/lib/iomgr/tcp_client_windows.c',
- 'src/core/lib/iomgr/tcp_posix.c',
- 'src/core/lib/iomgr/tcp_server_posix.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_common.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c',
- 'src/core/lib/iomgr/tcp_server_uv.c',
- 'src/core/lib/iomgr/tcp_server_windows.c',
- 'src/core/lib/iomgr/tcp_uv.c',
- 'src/core/lib/iomgr/tcp_windows.c',
- 'src/core/lib/iomgr/time_averaged_stats.c',
- 'src/core/lib/iomgr/timer_generic.c',
- 'src/core/lib/iomgr/timer_heap.c',
- 'src/core/lib/iomgr/timer_manager.c',
- 'src/core/lib/iomgr/timer_uv.c',
- 'src/core/lib/iomgr/udp_server.c',
- 'src/core/lib/iomgr/unix_sockets_posix.c',
- 'src/core/lib/iomgr/unix_sockets_posix_noop.c',
- 'src/core/lib/iomgr/wakeup_fd_cv.c',
- 'src/core/lib/iomgr/wakeup_fd_eventfd.c',
- 'src/core/lib/iomgr/wakeup_fd_nospecial.c',
- 'src/core/lib/iomgr/wakeup_fd_pipe.c',
- 'src/core/lib/iomgr/wakeup_fd_posix.c',
- 'src/core/lib/json/json.c',
- 'src/core/lib/json/json_reader.c',
- 'src/core/lib/json/json_string.c',
- 'src/core/lib/json/json_writer.c',
- 'src/core/lib/slice/b64.c',
- 'src/core/lib/slice/percent_encoding.c',
- 'src/core/lib/slice/slice.c',
- 'src/core/lib/slice/slice_buffer.c',
- 'src/core/lib/slice/slice_hash_table.c',
- 'src/core/lib/slice/slice_intern.c',
- 'src/core/lib/slice/slice_string_helpers.c',
- 'src/core/lib/surface/alarm.c',
- 'src/core/lib/surface/api_trace.c',
- 'src/core/lib/surface/byte_buffer.c',
- 'src/core/lib/surface/byte_buffer_reader.c',
- 'src/core/lib/surface/call.c',
- 'src/core/lib/surface/call_details.c',
- 'src/core/lib/surface/call_log_batch.c',
- 'src/core/lib/surface/channel.c',
- 'src/core/lib/surface/channel_init.c',
- 'src/core/lib/surface/channel_ping.c',
- 'src/core/lib/surface/channel_stack_type.c',
- 'src/core/lib/surface/completion_queue.c',
- 'src/core/lib/surface/completion_queue_factory.c',
- 'src/core/lib/surface/event_string.c',
+ 'src/core/lib/surface/init.cc',
+ 'src/core/lib/backoff/backoff.cc',
+ 'src/core/lib/channel/channel_args.cc',
+ 'src/core/lib/channel/channel_stack.cc',
+ 'src/core/lib/channel/channel_stack_builder.cc',
+ 'src/core/lib/channel/connected_channel.cc',
+ 'src/core/lib/channel/handshaker.cc',
+ '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/message_compress.cc',
+ 'src/core/lib/compression/stream_compression.cc',
+ 'src/core/lib/compression/stream_compression_gzip.cc',
+ 'src/core/lib/compression/stream_compression_identity.cc',
+ 'src/core/lib/debug/stats.cc',
+ 'src/core/lib/debug/stats_data.cc',
+ 'src/core/lib/http/format_request.cc',
+ 'src/core/lib/http/httpcli.cc',
+ 'src/core/lib/http/parser.cc',
+ 'src/core/lib/iomgr/call_combiner.cc',
+ 'src/core/lib/iomgr/closure.cc',
+ 'src/core/lib/iomgr/combiner.cc',
+ 'src/core/lib/iomgr/endpoint.cc',
+ 'src/core/lib/iomgr/endpoint_pair_posix.cc',
+ 'src/core/lib/iomgr/endpoint_pair_uv.cc',
+ 'src/core/lib/iomgr/endpoint_pair_windows.cc',
+ 'src/core/lib/iomgr/error.cc',
+ 'src/core/lib/iomgr/ev_epoll1_linux.cc',
+ 'src/core/lib/iomgr/ev_epollex_linux.cc',
+ 'src/core/lib/iomgr/ev_epollsig_linux.cc',
+ 'src/core/lib/iomgr/ev_poll_posix.cc',
+ 'src/core/lib/iomgr/ev_posix.cc',
+ 'src/core/lib/iomgr/ev_windows.cc',
+ 'src/core/lib/iomgr/exec_ctx.cc',
+ 'src/core/lib/iomgr/executor.cc',
+ 'src/core/lib/iomgr/gethostname_fallback.cc',
+ 'src/core/lib/iomgr/gethostname_host_name_max.cc',
+ 'src/core/lib/iomgr/gethostname_sysconf.cc',
+ 'src/core/lib/iomgr/iocp_windows.cc',
+ 'src/core/lib/iomgr/iomgr.cc',
+ 'src/core/lib/iomgr/iomgr_posix.cc',
+ 'src/core/lib/iomgr/iomgr_uv.cc',
+ 'src/core/lib/iomgr/iomgr_windows.cc',
+ 'src/core/lib/iomgr/is_epollexclusive_available.cc',
+ 'src/core/lib/iomgr/load_file.cc',
+ 'src/core/lib/iomgr/lockfree_event.cc',
+ 'src/core/lib/iomgr/network_status_tracker.cc',
+ 'src/core/lib/iomgr/polling_entity.cc',
+ 'src/core/lib/iomgr/pollset_set_uv.cc',
+ 'src/core/lib/iomgr/pollset_set_windows.cc',
+ 'src/core/lib/iomgr/pollset_uv.cc',
+ 'src/core/lib/iomgr/pollset_windows.cc',
+ 'src/core/lib/iomgr/resolve_address_posix.cc',
+ 'src/core/lib/iomgr/resolve_address_uv.cc',
+ 'src/core/lib/iomgr/resolve_address_windows.cc',
+ 'src/core/lib/iomgr/resource_quota.cc',
+ 'src/core/lib/iomgr/sockaddr_utils.cc',
+ 'src/core/lib/iomgr/socket_factory_posix.cc',
+ 'src/core/lib/iomgr/socket_mutator.cc',
+ 'src/core/lib/iomgr/socket_utils_common_posix.cc',
+ 'src/core/lib/iomgr/socket_utils_linux.cc',
+ 'src/core/lib/iomgr/socket_utils_posix.cc',
+ 'src/core/lib/iomgr/socket_utils_uv.cc',
+ 'src/core/lib/iomgr/socket_utils_windows.cc',
+ 'src/core/lib/iomgr/socket_windows.cc',
+ 'src/core/lib/iomgr/tcp_client_posix.cc',
+ 'src/core/lib/iomgr/tcp_client_uv.cc',
+ 'src/core/lib/iomgr/tcp_client_windows.cc',
+ 'src/core/lib/iomgr/tcp_posix.cc',
+ 'src/core/lib/iomgr/tcp_server_posix.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_common.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
+ 'src/core/lib/iomgr/tcp_server_uv.cc',
+ 'src/core/lib/iomgr/tcp_server_windows.cc',
+ 'src/core/lib/iomgr/tcp_uv.cc',
+ 'src/core/lib/iomgr/tcp_windows.cc',
+ 'src/core/lib/iomgr/time_averaged_stats.cc',
+ 'src/core/lib/iomgr/timer_generic.cc',
+ 'src/core/lib/iomgr/timer_heap.cc',
+ 'src/core/lib/iomgr/timer_manager.cc',
+ 'src/core/lib/iomgr/timer_uv.cc',
+ 'src/core/lib/iomgr/udp_server.cc',
+ 'src/core/lib/iomgr/unix_sockets_posix.cc',
+ 'src/core/lib/iomgr/unix_sockets_posix_noop.cc',
+ 'src/core/lib/iomgr/wakeup_fd_cv.cc',
+ 'src/core/lib/iomgr/wakeup_fd_eventfd.cc',
+ 'src/core/lib/iomgr/wakeup_fd_nospecial.cc',
+ 'src/core/lib/iomgr/wakeup_fd_pipe.cc',
+ 'src/core/lib/iomgr/wakeup_fd_posix.cc',
+ 'src/core/lib/json/json.cc',
+ 'src/core/lib/json/json_reader.cc',
+ 'src/core/lib/json/json_string.cc',
+ 'src/core/lib/json/json_writer.cc',
+ 'src/core/lib/slice/b64.cc',
+ 'src/core/lib/slice/percent_encoding.cc',
+ 'src/core/lib/slice/slice.cc',
+ 'src/core/lib/slice/slice_buffer.cc',
+ 'src/core/lib/slice/slice_hash_table.cc',
+ 'src/core/lib/slice/slice_intern.cc',
+ 'src/core/lib/slice/slice_string_helpers.cc',
+ 'src/core/lib/surface/alarm.cc',
+ 'src/core/lib/surface/api_trace.cc',
+ 'src/core/lib/surface/byte_buffer.cc',
+ 'src/core/lib/surface/byte_buffer_reader.cc',
+ 'src/core/lib/surface/call.cc',
+ 'src/core/lib/surface/call_details.cc',
+ 'src/core/lib/surface/call_log_batch.cc',
+ 'src/core/lib/surface/channel.cc',
+ 'src/core/lib/surface/channel_init.cc',
+ 'src/core/lib/surface/channel_ping.cc',
+ 'src/core/lib/surface/channel_stack_type.cc',
+ 'src/core/lib/surface/completion_queue.cc',
+ 'src/core/lib/surface/completion_queue_factory.cc',
+ 'src/core/lib/surface/event_string.cc',
'src/core/lib/surface/lame_client.cc',
- 'src/core/lib/surface/metadata_array.c',
- 'src/core/lib/surface/server.c',
- 'src/core/lib/surface/validate_metadata.c',
- 'src/core/lib/surface/version.c',
- 'src/core/lib/transport/bdp_estimator.c',
- 'src/core/lib/transport/byte_stream.c',
- 'src/core/lib/transport/connectivity_state.c',
- 'src/core/lib/transport/error_utils.c',
- 'src/core/lib/transport/metadata.c',
- 'src/core/lib/transport/metadata_batch.c',
- 'src/core/lib/transport/pid_controller.c',
- 'src/core/lib/transport/service_config.c',
- 'src/core/lib/transport/static_metadata.c',
- 'src/core/lib/transport/status_conversion.c',
- 'src/core/lib/transport/timeout_encoding.c',
- 'src/core/lib/transport/transport.c',
- 'src/core/lib/transport/transport_op_string.c',
- 'src/core/lib/debug/trace.c',
- 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c',
- 'src/core/ext/transport/chttp2/transport/bin_decoder.c',
- 'src/core/ext/transport/chttp2/transport/bin_encoder.c',
- 'src/core/ext/transport/chttp2/transport/chttp2_plugin.c',
- 'src/core/ext/transport/chttp2/transport/chttp2_transport.c',
- 'src/core/ext/transport/chttp2/transport/flow_control.c',
- 'src/core/ext/transport/chttp2/transport/frame_data.c',
- 'src/core/ext/transport/chttp2/transport/frame_goaway.c',
- 'src/core/ext/transport/chttp2/transport/frame_ping.c',
- 'src/core/ext/transport/chttp2/transport/frame_rst_stream.c',
- 'src/core/ext/transport/chttp2/transport/frame_settings.c',
- 'src/core/ext/transport/chttp2/transport/frame_window_update.c',
- 'src/core/ext/transport/chttp2/transport/hpack_encoder.c',
- 'src/core/ext/transport/chttp2/transport/hpack_parser.c',
- 'src/core/ext/transport/chttp2/transport/hpack_table.c',
- 'src/core/ext/transport/chttp2/transport/http2_settings.c',
- 'src/core/ext/transport/chttp2/transport/huffsyms.c',
- 'src/core/ext/transport/chttp2/transport/incoming_metadata.c',
- 'src/core/ext/transport/chttp2/transport/parsing.c',
- 'src/core/ext/transport/chttp2/transport/stream_lists.c',
- 'src/core/ext/transport/chttp2/transport/stream_map.c',
- 'src/core/ext/transport/chttp2/transport/varint.c',
- 'src/core/ext/transport/chttp2/transport/writing.c',
- 'src/core/ext/transport/chttp2/alpn/alpn.c',
- 'src/core/ext/filters/http/client/http_client_filter.c',
- 'src/core/ext/filters/http/http_filters_plugin.c',
- 'src/core/ext/filters/http/message_compress/message_compress_filter.c',
- 'src/core/ext/filters/http/server/http_server_filter.c',
- 'src/core/lib/http/httpcli_security_connector.c',
- 'src/core/lib/security/context/security_context.c',
- 'src/core/lib/security/credentials/composite/composite_credentials.c',
- 'src/core/lib/security/credentials/credentials.c',
- 'src/core/lib/security/credentials/credentials_metadata.c',
- 'src/core/lib/security/credentials/fake/fake_credentials.c',
- 'src/core/lib/security/credentials/google_default/credentials_generic.c',
- 'src/core/lib/security/credentials/google_default/google_default_credentials.c',
- 'src/core/lib/security/credentials/iam/iam_credentials.c',
- 'src/core/lib/security/credentials/jwt/json_token.c',
- 'src/core/lib/security/credentials/jwt/jwt_credentials.c',
- 'src/core/lib/security/credentials/jwt/jwt_verifier.c',
- 'src/core/lib/security/credentials/oauth2/oauth2_credentials.c',
- 'src/core/lib/security/credentials/plugin/plugin_credentials.c',
- 'src/core/lib/security/credentials/ssl/ssl_credentials.c',
- 'src/core/lib/security/transport/client_auth_filter.c',
- 'src/core/lib/security/transport/lb_targets_info.c',
- 'src/core/lib/security/transport/secure_endpoint.c',
- 'src/core/lib/security/transport/security_connector.c',
- 'src/core/lib/security/transport/security_handshaker.c',
- 'src/core/lib/security/transport/server_auth_filter.c',
- 'src/core/lib/security/transport/tsi_error.c',
- 'src/core/lib/security/util/json_util.c',
- 'src/core/lib/surface/init_secure.c',
- 'src/core/tsi/fake_transport_security.c',
- 'src/core/tsi/gts_transport_security.c',
- 'src/core/tsi/ssl_transport_security.c',
- 'src/core/tsi/transport_security_grpc.c',
- 'src/core/tsi/transport_security.c',
- 'src/core/tsi/transport_security_adapter.c',
- 'src/core/ext/transport/chttp2/server/chttp2_server.c',
- 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c',
- 'src/core/ext/filters/client_channel/channel_connectivity.c',
- 'src/core/ext/filters/client_channel/client_channel.c',
- 'src/core/ext/filters/client_channel/client_channel_factory.c',
- 'src/core/ext/filters/client_channel/client_channel_plugin.c',
- 'src/core/ext/filters/client_channel/connector.c',
- 'src/core/ext/filters/client_channel/http_connect_handshaker.c',
- 'src/core/ext/filters/client_channel/http_proxy.c',
- 'src/core/ext/filters/client_channel/lb_policy.c',
- 'src/core/ext/filters/client_channel/lb_policy_factory.c',
- 'src/core/ext/filters/client_channel/lb_policy_registry.c',
- 'src/core/ext/filters/client_channel/parse_address.c',
- 'src/core/ext/filters/client_channel/proxy_mapper.c',
- 'src/core/ext/filters/client_channel/proxy_mapper_registry.c',
- 'src/core/ext/filters/client_channel/resolver.c',
- 'src/core/ext/filters/client_channel/resolver_factory.c',
- 'src/core/ext/filters/client_channel/resolver_registry.c',
- 'src/core/ext/filters/client_channel/retry_throttle.c',
- 'src/core/ext/filters/client_channel/subchannel.c',
- 'src/core/ext/filters/client_channel/subchannel_index.c',
- 'src/core/ext/filters/client_channel/uri_parser.c',
- 'src/core/ext/filters/deadline/deadline_filter.c',
- 'src/core/ext/transport/chttp2/client/chttp2_connector.c',
- 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c',
- 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c',
- 'src/core/ext/transport/chttp2/client/insecure/channel_create.c',
- 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c',
- 'src/core/ext/transport/inproc/inproc_plugin.c',
- 'src/core/ext/transport/inproc/inproc_transport.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c',
+ 'src/core/lib/surface/metadata_array.cc',
+ 'src/core/lib/surface/server.cc',
+ 'src/core/lib/surface/validate_metadata.cc',
+ 'src/core/lib/surface/version.cc',
+ 'src/core/lib/transport/bdp_estimator.cc',
+ 'src/core/lib/transport/byte_stream.cc',
+ 'src/core/lib/transport/connectivity_state.cc',
+ 'src/core/lib/transport/error_utils.cc',
+ 'src/core/lib/transport/metadata.cc',
+ 'src/core/lib/transport/metadata_batch.cc',
+ 'src/core/lib/transport/pid_controller.cc',
+ 'src/core/lib/transport/service_config.cc',
+ 'src/core/lib/transport/static_metadata.cc',
+ 'src/core/lib/transport/status_conversion.cc',
+ 'src/core/lib/transport/timeout_encoding.cc',
+ 'src/core/lib/transport/transport.cc',
+ 'src/core/lib/transport/transport_op_string.cc',
+ 'src/core/lib/debug/trace.cc',
+ 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc',
+ 'src/core/ext/transport/chttp2/transport/bin_decoder.cc',
+ 'src/core/ext/transport/chttp2/transport/bin_encoder.cc',
+ 'src/core/ext/transport/chttp2/transport/chttp2_plugin.cc',
+ 'src/core/ext/transport/chttp2/transport/chttp2_transport.cc',
+ 'src/core/ext/transport/chttp2/transport/flow_control.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_data.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_goaway.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_ping.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_rst_stream.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_settings.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_window_update.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_encoder.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_parser.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_table.cc',
+ 'src/core/ext/transport/chttp2/transport/http2_settings.cc',
+ 'src/core/ext/transport/chttp2/transport/huffsyms.cc',
+ 'src/core/ext/transport/chttp2/transport/incoming_metadata.cc',
+ 'src/core/ext/transport/chttp2/transport/parsing.cc',
+ 'src/core/ext/transport/chttp2/transport/stream_lists.cc',
+ 'src/core/ext/transport/chttp2/transport/stream_map.cc',
+ 'src/core/ext/transport/chttp2/transport/varint.cc',
+ 'src/core/ext/transport/chttp2/transport/writing.cc',
+ 'src/core/ext/transport/chttp2/alpn/alpn.cc',
+ 'src/core/ext/filters/http/client/http_client_filter.cc',
+ 'src/core/ext/filters/http/http_filters_plugin.cc',
+ 'src/core/ext/filters/http/message_compress/message_compress_filter.cc',
+ 'src/core/ext/filters/http/server/http_server_filter.cc',
+ 'src/core/lib/http/httpcli_security_connector.cc',
+ 'src/core/lib/security/context/security_context.cc',
+ 'src/core/lib/security/credentials/composite/composite_credentials.cc',
+ 'src/core/lib/security/credentials/credentials.cc',
+ 'src/core/lib/security/credentials/credentials_metadata.cc',
+ 'src/core/lib/security/credentials/fake/fake_credentials.cc',
+ 'src/core/lib/security/credentials/google_default/credentials_generic.cc',
+ 'src/core/lib/security/credentials/google_default/google_default_credentials.cc',
+ 'src/core/lib/security/credentials/iam/iam_credentials.cc',
+ 'src/core/lib/security/credentials/jwt/json_token.cc',
+ 'src/core/lib/security/credentials/jwt/jwt_credentials.cc',
+ 'src/core/lib/security/credentials/jwt/jwt_verifier.cc',
+ 'src/core/lib/security/credentials/oauth2/oauth2_credentials.cc',
+ 'src/core/lib/security/credentials/plugin/plugin_credentials.cc',
+ 'src/core/lib/security/credentials/ssl/ssl_credentials.cc',
+ 'src/core/lib/security/transport/client_auth_filter.cc',
+ 'src/core/lib/security/transport/lb_targets_info.cc',
+ 'src/core/lib/security/transport/secure_endpoint.cc',
+ 'src/core/lib/security/transport/security_connector.cc',
+ 'src/core/lib/security/transport/security_handshaker.cc',
+ 'src/core/lib/security/transport/server_auth_filter.cc',
+ '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/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',
+ 'src/core/tsi/transport_security_adapter.cc',
+ 'src/core/ext/transport/chttp2/server/chttp2_server.cc',
+ 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc',
+ 'src/core/ext/filters/client_channel/channel_connectivity.cc',
+ 'src/core/ext/filters/client_channel/client_channel.cc',
+ 'src/core/ext/filters/client_channel/client_channel_factory.cc',
+ 'src/core/ext/filters/client_channel/client_channel_plugin.cc',
+ 'src/core/ext/filters/client_channel/connector.cc',
+ 'src/core/ext/filters/client_channel/http_connect_handshaker.cc',
+ 'src/core/ext/filters/client_channel/http_proxy.cc',
+ 'src/core/ext/filters/client_channel/lb_policy.cc',
+ 'src/core/ext/filters/client_channel/lb_policy_factory.cc',
+ 'src/core/ext/filters/client_channel/lb_policy_registry.cc',
+ 'src/core/ext/filters/client_channel/parse_address.cc',
+ 'src/core/ext/filters/client_channel/proxy_mapper.cc',
+ 'src/core/ext/filters/client_channel/proxy_mapper_registry.cc',
+ 'src/core/ext/filters/client_channel/resolver.cc',
+ 'src/core/ext/filters/client_channel/resolver_factory.cc',
+ 'src/core/ext/filters/client_channel/resolver_registry.cc',
+ 'src/core/ext/filters/client_channel/retry_throttle.cc',
+ 'src/core/ext/filters/client_channel/subchannel.cc',
+ 'src/core/ext/filters/client_channel/subchannel_index.cc',
+ 'src/core/ext/filters/client_channel/uri_parser.cc',
+ 'src/core/ext/filters/deadline/deadline_filter.cc',
+ 'src/core/ext/transport/chttp2/client/chttp2_connector.cc',
+ 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc',
+ 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc',
+ 'src/core/ext/transport/chttp2/client/insecure/channel_create.cc',
+ 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc',
+ 'src/core/ext/transport/inproc/inproc_plugin.cc',
+ 'src/core/ext/transport/inproc/inproc_transport.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
'third_party/nanopb/pb_common.c',
'third_party/nanopb/pb_decode.c',
'third_party/nanopb/pb_encode.c',
- 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c',
- 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c',
- 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c',
- 'src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c',
- 'src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c',
- 'src/core/ext/filters/load_reporting/server_load_reporting_filter.c',
- 'src/core/ext/filters/load_reporting/server_load_reporting_plugin.c',
- 'src/core/ext/census/base_resources.c',
- 'src/core/ext/census/context.c',
+ 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc',
+ 'src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc',
+ 'src/core/ext/filters/load_reporting/server_load_reporting_filter.cc',
+ 'src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc',
+ 'src/core/ext/census/base_resources.cc',
+ 'src/core/ext/census/context.cc',
'src/core/ext/census/gen/census.pb.c',
'src/core/ext/census/gen/trace_context.pb.c',
- 'src/core/ext/census/grpc_context.c',
- 'src/core/ext/census/grpc_filter.c',
- 'src/core/ext/census/grpc_plugin.c',
- 'src/core/ext/census/initialize.c',
- 'src/core/ext/census/intrusive_hash_map.c',
- 'src/core/ext/census/mlog.c',
- 'src/core/ext/census/operation.c',
- 'src/core/ext/census/placeholders.c',
- 'src/core/ext/census/resource.c',
- 'src/core/ext/census/trace_context.c',
- 'src/core/ext/census/tracing.c',
- 'src/core/ext/filters/max_age/max_age_filter.c',
- 'src/core/ext/filters/message_size/message_size_filter.c',
- 'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c',
- 'src/core/ext/filters/workarounds/workaround_utils.c',
- 'src/core/plugin_registry/grpc_plugin_registry.c',
+ 'src/core/ext/census/grpc_context.cc',
+ 'src/core/ext/census/grpc_filter.cc',
+ 'src/core/ext/census/grpc_plugin.cc',
+ 'src/core/ext/census/initialize.cc',
+ 'src/core/ext/census/intrusive_hash_map.cc',
+ 'src/core/ext/census/mlog.cc',
+ 'src/core/ext/census/operation.cc',
+ 'src/core/ext/census/placeholders.cc',
+ 'src/core/ext/census/resource.cc',
+ 'src/core/ext/census/trace_context.cc',
+ 'src/core/ext/census/tracing.cc',
+ 'src/core/ext/filters/max_age/max_age_filter.cc',
+ 'src/core/ext/filters/message_size/message_size_filter.cc',
+ 'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc',
+ 'src/core/ext/filters/workarounds/workaround_utils.cc',
+ 'src/core/plugin_registry/grpc_plugin_registry.cc',
],
'conditions': [
['OS == "mac"', {
diff --git a/build.yaml b/build.yaml
index 2f3e0520e6..8b0aaa6c93 100644
--- a/build.yaml
+++ b/build.yaml
@@ -13,8 +13,8 @@ settings:
'#09': Per-language overrides are possible with (eg) ruby_version tag here
'#10': See the expand_version.py for all the quirks here
core_version: 5.0.0-dev
- g_stands_for: gambit
- version: 1.7.0-dev
+ g_stands_for: generous
+ version: 1.8.0-dev
filegroups:
- name: census
public_headers:
@@ -39,73 +39,72 @@ filegroups:
- src/core/ext/census/trace_string.h
- src/core/ext/census/tracing.h
src:
- - src/core/ext/census/base_resources.c
- - src/core/ext/census/context.c
+ - src/core/ext/census/base_resources.cc
+ - src/core/ext/census/context.cc
- src/core/ext/census/gen/census.pb.c
- src/core/ext/census/gen/trace_context.pb.c
- - src/core/ext/census/grpc_context.c
- - src/core/ext/census/grpc_filter.c
- - src/core/ext/census/grpc_plugin.c
- - src/core/ext/census/initialize.c
- - src/core/ext/census/intrusive_hash_map.c
- - src/core/ext/census/mlog.c
- - src/core/ext/census/operation.c
- - src/core/ext/census/placeholders.c
- - src/core/ext/census/resource.c
- - src/core/ext/census/trace_context.c
- - src/core/ext/census/tracing.c
+ - src/core/ext/census/grpc_context.cc
+ - src/core/ext/census/grpc_filter.cc
+ - src/core/ext/census/grpc_plugin.cc
+ - src/core/ext/census/initialize.cc
+ - src/core/ext/census/intrusive_hash_map.cc
+ - src/core/ext/census/mlog.cc
+ - src/core/ext/census/operation.cc
+ - src/core/ext/census/placeholders.cc
+ - src/core/ext/census/resource.cc
+ - src/core/ext/census/trace_context.cc
+ - src/core/ext/census/tracing.cc
plugin: census_grpc_plugin
uses:
- grpc_base
- nanopb
- name: gpr_base
src:
- - src/core/lib/profiling/basic_timers.c
- - src/core/lib/profiling/stap_timers.c
- - src/core/lib/support/alloc.c
- - src/core/lib/support/arena.c
- - src/core/lib/support/atm.c
- - src/core/lib/support/avl.c
- - src/core/lib/support/backoff.c
- - src/core/lib/support/cmdline.c
- - src/core/lib/support/cpu_iphone.c
- - src/core/lib/support/cpu_linux.c
- - src/core/lib/support/cpu_posix.c
- - src/core/lib/support/cpu_windows.c
- - src/core/lib/support/env_linux.c
- - src/core/lib/support/env_posix.c
- - src/core/lib/support/env_windows.c
- - src/core/lib/support/histogram.c
- - src/core/lib/support/host_port.c
- - src/core/lib/support/log.c
- - src/core/lib/support/log_android.c
- - src/core/lib/support/log_linux.c
- - src/core/lib/support/log_posix.c
- - src/core/lib/support/log_windows.c
- - src/core/lib/support/mpscq.c
- - src/core/lib/support/murmur_hash.c
- - src/core/lib/support/stack_lockfree.c
- - src/core/lib/support/string.c
- - src/core/lib/support/string_posix.c
- - src/core/lib/support/string_util_windows.c
- - src/core/lib/support/string_windows.c
- - src/core/lib/support/subprocess_posix.c
- - src/core/lib/support/subprocess_windows.c
- - src/core/lib/support/sync.c
- - src/core/lib/support/sync_posix.c
- - src/core/lib/support/sync_windows.c
- - src/core/lib/support/thd.c
- - src/core/lib/support/thd_posix.c
- - src/core/lib/support/thd_windows.c
- - src/core/lib/support/time.c
- - src/core/lib/support/time_posix.c
- - src/core/lib/support/time_precise.c
- - src/core/lib/support/time_windows.c
- - src/core/lib/support/tls_pthread.c
- - src/core/lib/support/tmpfile_msys.c
- - src/core/lib/support/tmpfile_posix.c
- - src/core/lib/support/tmpfile_windows.c
- - src/core/lib/support/wrap_memcpy.c
+ - src/core/lib/profiling/basic_timers.cc
+ - src/core/lib/profiling/stap_timers.cc
+ - src/core/lib/support/alloc.cc
+ - src/core/lib/support/arena.cc
+ - src/core/lib/support/atm.cc
+ - src/core/lib/support/avl.cc
+ - src/core/lib/support/cmdline.cc
+ - src/core/lib/support/cpu_iphone.cc
+ - src/core/lib/support/cpu_linux.cc
+ - src/core/lib/support/cpu_posix.cc
+ - src/core/lib/support/cpu_windows.cc
+ - src/core/lib/support/env_linux.cc
+ - src/core/lib/support/env_posix.cc
+ - src/core/lib/support/env_windows.cc
+ - src/core/lib/support/histogram.cc
+ - src/core/lib/support/host_port.cc
+ - src/core/lib/support/log.cc
+ - src/core/lib/support/log_android.cc
+ - src/core/lib/support/log_linux.cc
+ - src/core/lib/support/log_posix.cc
+ - src/core/lib/support/log_windows.cc
+ - src/core/lib/support/mpscq.cc
+ - src/core/lib/support/murmur_hash.cc
+ - src/core/lib/support/stack_lockfree.cc
+ - src/core/lib/support/string.cc
+ - src/core/lib/support/string_posix.cc
+ - src/core/lib/support/string_util_windows.cc
+ - src/core/lib/support/string_windows.cc
+ - src/core/lib/support/subprocess_posix.cc
+ - src/core/lib/support/subprocess_windows.cc
+ - src/core/lib/support/sync.cc
+ - src/core/lib/support/sync_posix.cc
+ - src/core/lib/support/sync_windows.cc
+ - src/core/lib/support/thd.cc
+ - src/core/lib/support/thd_posix.cc
+ - src/core/lib/support/thd_windows.cc
+ - src/core/lib/support/time.cc
+ - src/core/lib/support/time_posix.cc
+ - src/core/lib/support/time_precise.cc
+ - src/core/lib/support/time_windows.cc
+ - src/core/lib/support/tls_pthread.cc
+ - src/core/lib/support/tmpfile_msys.cc
+ - src/core/lib/support/tmpfile_posix.cc
+ - src/core/lib/support/tmpfile_windows.cc
+ - src/core/lib/support/wrap_memcpy.cc
uses:
- gpr_base_headers
- name: gpr_base_headers
@@ -143,8 +142,6 @@ filegroups:
- src/core/lib/support/atomic.h
- src/core/lib/support/atomic_with_atm.h
- src/core/lib/support/atomic_with_std.h
- - src/core/lib/support/backoff.h
- - src/core/lib/support/block_annotate.h
- src/core/lib/support/env.h
- src/core/lib/support/memory.h
- src/core/lib/support/mpscq.h
@@ -185,138 +182,139 @@ filegroups:
- grpc++_codegen_base
- name: grpc_base
src:
- - src/core/lib/channel/channel_args.c
- - src/core/lib/channel/channel_stack.c
- - src/core/lib/channel/channel_stack_builder.c
- - src/core/lib/channel/connected_channel.c
- - src/core/lib/channel/handshaker.c
- - src/core/lib/channel/handshaker_factory.c
- - src/core/lib/channel/handshaker_registry.c
- - src/core/lib/compression/compression.c
- - src/core/lib/compression/compression_internal.c
- - src/core/lib/compression/message_compress.c
- - src/core/lib/compression/stream_compression.c
- - src/core/lib/compression/stream_compression_gzip.c
- - src/core/lib/compression/stream_compression_identity.c
- - src/core/lib/debug/stats.c
- - src/core/lib/debug/stats_data.c
- - src/core/lib/http/format_request.c
- - src/core/lib/http/httpcli.c
- - src/core/lib/http/parser.c
- - src/core/lib/iomgr/call_combiner.c
- - src/core/lib/iomgr/closure.c
- - src/core/lib/iomgr/combiner.c
- - src/core/lib/iomgr/endpoint.c
- - src/core/lib/iomgr/endpoint_pair_posix.c
- - src/core/lib/iomgr/endpoint_pair_uv.c
- - src/core/lib/iomgr/endpoint_pair_windows.c
- - src/core/lib/iomgr/error.c
- - src/core/lib/iomgr/ev_epoll1_linux.c
- - src/core/lib/iomgr/ev_epollex_linux.c
- - src/core/lib/iomgr/ev_epollsig_linux.c
- - src/core/lib/iomgr/ev_poll_posix.c
- - src/core/lib/iomgr/ev_posix.c
- - src/core/lib/iomgr/ev_windows.c
- - src/core/lib/iomgr/exec_ctx.c
- - src/core/lib/iomgr/executor.c
- - src/core/lib/iomgr/gethostname_fallback.c
- - src/core/lib/iomgr/gethostname_host_name_max.c
- - src/core/lib/iomgr/gethostname_sysconf.c
- - src/core/lib/iomgr/iocp_windows.c
- - src/core/lib/iomgr/iomgr.c
- - src/core/lib/iomgr/iomgr_posix.c
- - src/core/lib/iomgr/iomgr_uv.c
- - src/core/lib/iomgr/iomgr_windows.c
- - src/core/lib/iomgr/is_epollexclusive_available.c
- - src/core/lib/iomgr/load_file.c
- - src/core/lib/iomgr/lockfree_event.c
- - src/core/lib/iomgr/network_status_tracker.c
- - src/core/lib/iomgr/polling_entity.c
- - src/core/lib/iomgr/pollset_set_uv.c
- - src/core/lib/iomgr/pollset_set_windows.c
- - src/core/lib/iomgr/pollset_uv.c
- - src/core/lib/iomgr/pollset_windows.c
- - src/core/lib/iomgr/resolve_address_posix.c
- - src/core/lib/iomgr/resolve_address_uv.c
- - src/core/lib/iomgr/resolve_address_windows.c
- - src/core/lib/iomgr/resource_quota.c
- - src/core/lib/iomgr/sockaddr_utils.c
- - src/core/lib/iomgr/socket_factory_posix.c
- - src/core/lib/iomgr/socket_mutator.c
- - src/core/lib/iomgr/socket_utils_common_posix.c
- - src/core/lib/iomgr/socket_utils_linux.c
- - src/core/lib/iomgr/socket_utils_posix.c
- - src/core/lib/iomgr/socket_utils_uv.c
- - src/core/lib/iomgr/socket_utils_windows.c
- - src/core/lib/iomgr/socket_windows.c
- - src/core/lib/iomgr/tcp_client_posix.c
- - src/core/lib/iomgr/tcp_client_uv.c
- - src/core/lib/iomgr/tcp_client_windows.c
- - src/core/lib/iomgr/tcp_posix.c
- - src/core/lib/iomgr/tcp_server_posix.c
- - src/core/lib/iomgr/tcp_server_utils_posix_common.c
- - src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c
- - src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c
- - src/core/lib/iomgr/tcp_server_uv.c
- - src/core/lib/iomgr/tcp_server_windows.c
- - src/core/lib/iomgr/tcp_uv.c
- - src/core/lib/iomgr/tcp_windows.c
- - src/core/lib/iomgr/time_averaged_stats.c
- - src/core/lib/iomgr/timer_generic.c
- - src/core/lib/iomgr/timer_heap.c
- - src/core/lib/iomgr/timer_manager.c
- - src/core/lib/iomgr/timer_uv.c
- - src/core/lib/iomgr/udp_server.c
- - src/core/lib/iomgr/unix_sockets_posix.c
- - src/core/lib/iomgr/unix_sockets_posix_noop.c
- - src/core/lib/iomgr/wakeup_fd_cv.c
- - src/core/lib/iomgr/wakeup_fd_eventfd.c
- - src/core/lib/iomgr/wakeup_fd_nospecial.c
- - src/core/lib/iomgr/wakeup_fd_pipe.c
- - src/core/lib/iomgr/wakeup_fd_posix.c
- - src/core/lib/json/json.c
- - src/core/lib/json/json_reader.c
- - src/core/lib/json/json_string.c
- - src/core/lib/json/json_writer.c
- - src/core/lib/slice/b64.c
- - src/core/lib/slice/percent_encoding.c
- - src/core/lib/slice/slice.c
- - src/core/lib/slice/slice_buffer.c
- - src/core/lib/slice/slice_hash_table.c
- - src/core/lib/slice/slice_intern.c
- - src/core/lib/slice/slice_string_helpers.c
- - src/core/lib/surface/alarm.c
- - src/core/lib/surface/api_trace.c
- - src/core/lib/surface/byte_buffer.c
- - src/core/lib/surface/byte_buffer_reader.c
- - src/core/lib/surface/call.c
- - src/core/lib/surface/call_details.c
- - src/core/lib/surface/call_log_batch.c
- - src/core/lib/surface/channel.c
- - src/core/lib/surface/channel_init.c
- - src/core/lib/surface/channel_ping.c
- - src/core/lib/surface/channel_stack_type.c
- - src/core/lib/surface/completion_queue.c
- - src/core/lib/surface/completion_queue_factory.c
- - src/core/lib/surface/event_string.c
+ - src/core/lib/backoff/backoff.cc
+ - src/core/lib/channel/channel_args.cc
+ - src/core/lib/channel/channel_stack.cc
+ - src/core/lib/channel/channel_stack_builder.cc
+ - src/core/lib/channel/connected_channel.cc
+ - src/core/lib/channel/handshaker.cc
+ - 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/message_compress.cc
+ - src/core/lib/compression/stream_compression.cc
+ - src/core/lib/compression/stream_compression_gzip.cc
+ - src/core/lib/compression/stream_compression_identity.cc
+ - src/core/lib/debug/stats.cc
+ - src/core/lib/debug/stats_data.cc
+ - src/core/lib/http/format_request.cc
+ - src/core/lib/http/httpcli.cc
+ - src/core/lib/http/parser.cc
+ - src/core/lib/iomgr/call_combiner.cc
+ - src/core/lib/iomgr/closure.cc
+ - src/core/lib/iomgr/combiner.cc
+ - src/core/lib/iomgr/endpoint.cc
+ - src/core/lib/iomgr/endpoint_pair_posix.cc
+ - src/core/lib/iomgr/endpoint_pair_uv.cc
+ - src/core/lib/iomgr/endpoint_pair_windows.cc
+ - src/core/lib/iomgr/error.cc
+ - src/core/lib/iomgr/ev_epoll1_linux.cc
+ - src/core/lib/iomgr/ev_epollex_linux.cc
+ - src/core/lib/iomgr/ev_epollsig_linux.cc
+ - src/core/lib/iomgr/ev_poll_posix.cc
+ - src/core/lib/iomgr/ev_posix.cc
+ - src/core/lib/iomgr/ev_windows.cc
+ - src/core/lib/iomgr/exec_ctx.cc
+ - src/core/lib/iomgr/executor.cc
+ - src/core/lib/iomgr/gethostname_fallback.cc
+ - src/core/lib/iomgr/gethostname_host_name_max.cc
+ - src/core/lib/iomgr/gethostname_sysconf.cc
+ - src/core/lib/iomgr/iocp_windows.cc
+ - src/core/lib/iomgr/iomgr.cc
+ - src/core/lib/iomgr/iomgr_posix.cc
+ - src/core/lib/iomgr/iomgr_uv.cc
+ - src/core/lib/iomgr/iomgr_windows.cc
+ - src/core/lib/iomgr/is_epollexclusive_available.cc
+ - src/core/lib/iomgr/load_file.cc
+ - src/core/lib/iomgr/lockfree_event.cc
+ - src/core/lib/iomgr/network_status_tracker.cc
+ - src/core/lib/iomgr/polling_entity.cc
+ - src/core/lib/iomgr/pollset_set_uv.cc
+ - src/core/lib/iomgr/pollset_set_windows.cc
+ - src/core/lib/iomgr/pollset_uv.cc
+ - src/core/lib/iomgr/pollset_windows.cc
+ - src/core/lib/iomgr/resolve_address_posix.cc
+ - src/core/lib/iomgr/resolve_address_uv.cc
+ - src/core/lib/iomgr/resolve_address_windows.cc
+ - src/core/lib/iomgr/resource_quota.cc
+ - src/core/lib/iomgr/sockaddr_utils.cc
+ - src/core/lib/iomgr/socket_factory_posix.cc
+ - src/core/lib/iomgr/socket_mutator.cc
+ - src/core/lib/iomgr/socket_utils_common_posix.cc
+ - src/core/lib/iomgr/socket_utils_linux.cc
+ - src/core/lib/iomgr/socket_utils_posix.cc
+ - src/core/lib/iomgr/socket_utils_uv.cc
+ - src/core/lib/iomgr/socket_utils_windows.cc
+ - src/core/lib/iomgr/socket_windows.cc
+ - src/core/lib/iomgr/tcp_client_posix.cc
+ - src/core/lib/iomgr/tcp_client_uv.cc
+ - src/core/lib/iomgr/tcp_client_windows.cc
+ - src/core/lib/iomgr/tcp_posix.cc
+ - src/core/lib/iomgr/tcp_server_posix.cc
+ - src/core/lib/iomgr/tcp_server_utils_posix_common.cc
+ - src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
+ - src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
+ - src/core/lib/iomgr/tcp_server_uv.cc
+ - src/core/lib/iomgr/tcp_server_windows.cc
+ - src/core/lib/iomgr/tcp_uv.cc
+ - src/core/lib/iomgr/tcp_windows.cc
+ - src/core/lib/iomgr/time_averaged_stats.cc
+ - src/core/lib/iomgr/timer_generic.cc
+ - src/core/lib/iomgr/timer_heap.cc
+ - src/core/lib/iomgr/timer_manager.cc
+ - src/core/lib/iomgr/timer_uv.cc
+ - src/core/lib/iomgr/udp_server.cc
+ - src/core/lib/iomgr/unix_sockets_posix.cc
+ - src/core/lib/iomgr/unix_sockets_posix_noop.cc
+ - src/core/lib/iomgr/wakeup_fd_cv.cc
+ - src/core/lib/iomgr/wakeup_fd_eventfd.cc
+ - src/core/lib/iomgr/wakeup_fd_nospecial.cc
+ - src/core/lib/iomgr/wakeup_fd_pipe.cc
+ - src/core/lib/iomgr/wakeup_fd_posix.cc
+ - src/core/lib/json/json.cc
+ - src/core/lib/json/json_reader.cc
+ - src/core/lib/json/json_string.cc
+ - src/core/lib/json/json_writer.cc
+ - src/core/lib/slice/b64.cc
+ - src/core/lib/slice/percent_encoding.cc
+ - src/core/lib/slice/slice.cc
+ - src/core/lib/slice/slice_buffer.cc
+ - src/core/lib/slice/slice_hash_table.cc
+ - src/core/lib/slice/slice_intern.cc
+ - src/core/lib/slice/slice_string_helpers.cc
+ - src/core/lib/surface/alarm.cc
+ - src/core/lib/surface/api_trace.cc
+ - src/core/lib/surface/byte_buffer.cc
+ - src/core/lib/surface/byte_buffer_reader.cc
+ - src/core/lib/surface/call.cc
+ - src/core/lib/surface/call_details.cc
+ - src/core/lib/surface/call_log_batch.cc
+ - src/core/lib/surface/channel.cc
+ - src/core/lib/surface/channel_init.cc
+ - src/core/lib/surface/channel_ping.cc
+ - src/core/lib/surface/channel_stack_type.cc
+ - src/core/lib/surface/completion_queue.cc
+ - src/core/lib/surface/completion_queue_factory.cc
+ - src/core/lib/surface/event_string.cc
- src/core/lib/surface/lame_client.cc
- - src/core/lib/surface/metadata_array.c
- - src/core/lib/surface/server.c
- - src/core/lib/surface/validate_metadata.c
- - src/core/lib/surface/version.c
- - src/core/lib/transport/bdp_estimator.c
- - src/core/lib/transport/byte_stream.c
- - src/core/lib/transport/connectivity_state.c
- - src/core/lib/transport/error_utils.c
- - src/core/lib/transport/metadata.c
- - src/core/lib/transport/metadata_batch.c
- - src/core/lib/transport/pid_controller.c
- - src/core/lib/transport/service_config.c
- - src/core/lib/transport/static_metadata.c
- - src/core/lib/transport/status_conversion.c
- - src/core/lib/transport/timeout_encoding.c
- - src/core/lib/transport/transport.c
- - src/core/lib/transport/transport_op_string.c
+ - src/core/lib/surface/metadata_array.cc
+ - src/core/lib/surface/server.cc
+ - src/core/lib/surface/validate_metadata.cc
+ - src/core/lib/surface/version.cc
+ - src/core/lib/transport/bdp_estimator.cc
+ - src/core/lib/transport/byte_stream.cc
+ - src/core/lib/transport/connectivity_state.cc
+ - src/core/lib/transport/error_utils.cc
+ - src/core/lib/transport/metadata.cc
+ - src/core/lib/transport/metadata_batch.cc
+ - src/core/lib/transport/pid_controller.cc
+ - src/core/lib/transport/service_config.cc
+ - src/core/lib/transport/static_metadata.cc
+ - src/core/lib/transport/status_conversion.cc
+ - src/core/lib/transport/timeout_encoding.cc
+ - src/core/lib/transport/transport.cc
+ - src/core/lib/transport/transport_op_string.cc
deps:
- gpr
filegroups:
@@ -338,6 +336,7 @@ filegroups:
- include/grpc/status.h
- include/grpc/support/workaround_list.h
headers:
+ - 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
@@ -357,6 +356,7 @@ filegroups:
- 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
@@ -482,26 +482,26 @@ filegroups:
- src/core/ext/filters/client_channel/subchannel_index.h
- src/core/ext/filters/client_channel/uri_parser.h
src:
- - src/core/ext/filters/client_channel/channel_connectivity.c
- - src/core/ext/filters/client_channel/client_channel.c
- - src/core/ext/filters/client_channel/client_channel_factory.c
- - src/core/ext/filters/client_channel/client_channel_plugin.c
- - src/core/ext/filters/client_channel/connector.c
- - src/core/ext/filters/client_channel/http_connect_handshaker.c
- - src/core/ext/filters/client_channel/http_proxy.c
- - src/core/ext/filters/client_channel/lb_policy.c
- - src/core/ext/filters/client_channel/lb_policy_factory.c
- - src/core/ext/filters/client_channel/lb_policy_registry.c
- - src/core/ext/filters/client_channel/parse_address.c
- - src/core/ext/filters/client_channel/proxy_mapper.c
- - src/core/ext/filters/client_channel/proxy_mapper_registry.c
- - src/core/ext/filters/client_channel/resolver.c
- - src/core/ext/filters/client_channel/resolver_factory.c
- - src/core/ext/filters/client_channel/resolver_registry.c
- - src/core/ext/filters/client_channel/retry_throttle.c
- - src/core/ext/filters/client_channel/subchannel.c
- - src/core/ext/filters/client_channel/subchannel_index.c
- - src/core/ext/filters/client_channel/uri_parser.c
+ - src/core/ext/filters/client_channel/channel_connectivity.cc
+ - src/core/ext/filters/client_channel/client_channel.cc
+ - src/core/ext/filters/client_channel/client_channel_factory.cc
+ - src/core/ext/filters/client_channel/client_channel_plugin.cc
+ - src/core/ext/filters/client_channel/connector.cc
+ - src/core/ext/filters/client_channel/http_connect_handshaker.cc
+ - src/core/ext/filters/client_channel/http_proxy.cc
+ - src/core/ext/filters/client_channel/lb_policy.cc
+ - src/core/ext/filters/client_channel/lb_policy_factory.cc
+ - src/core/ext/filters/client_channel/lb_policy_registry.cc
+ - src/core/ext/filters/client_channel/parse_address.cc
+ - src/core/ext/filters/client_channel/proxy_mapper.cc
+ - src/core/ext/filters/client_channel/proxy_mapper_registry.cc
+ - src/core/ext/filters/client_channel/resolver.cc
+ - src/core/ext/filters/client_channel/resolver_factory.cc
+ - src/core/ext/filters/client_channel/resolver_registry.cc
+ - src/core/ext/filters/client_channel/retry_throttle.cc
+ - src/core/ext/filters/client_channel/subchannel.cc
+ - src/core/ext/filters/client_channel/subchannel_index.cc
+ - src/core/ext/filters/client_channel/uri_parser.cc
plugin: grpc_client_channel
uses:
- grpc_base
@@ -523,7 +523,7 @@ filegroups:
headers:
- src/core/ext/filters/deadline/deadline_filter.h
src:
- - src/core/ext/filters/deadline/deadline_filter.c
+ - src/core/ext/filters/deadline/deadline_filter.cc
plugin: grpc_deadline_filter
uses:
- grpc_base
@@ -533,10 +533,10 @@ filegroups:
- src/core/ext/filters/http/message_compress/message_compress_filter.h
- src/core/ext/filters/http/server/http_server_filter.h
src:
- - src/core/ext/filters/http/client/http_client_filter.c
- - src/core/ext/filters/http/http_filters_plugin.c
- - src/core/ext/filters/http/message_compress/message_compress_filter.c
- - src/core/ext/filters/http/server/http_server_filter.c
+ - src/core/ext/filters/http/client/http_client_filter.cc
+ - src/core/ext/filters/http/http_filters_plugin.cc
+ - src/core/ext/filters/http/message_compress/message_compress_filter.cc
+ - src/core/ext/filters/http/server/http_server_filter.cc
plugin: grpc_http_filters
uses:
- grpc_base
@@ -549,11 +549,11 @@ filegroups:
- 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:
- - src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c
- - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c
- - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.c
- - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c
- - src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c
+ - src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc
+ - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
+ - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc
+ - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc
+ - src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc
- src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c
plugin: grpc_lb_policy_grpclb
uses:
@@ -570,11 +570,11 @@ filegroups:
- 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:
- - src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c
- - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c
- - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c
- - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c
- - src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c
+ - src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc
+ - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
+ - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc
+ - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc
+ - src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc
- src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c
plugin: grpc_lb_policy_grpclb
uses:
@@ -585,14 +585,14 @@ filegroups:
- grpc_resolver_fake
- name: grpc_lb_policy_pick_first
src:
- - src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c
+ - src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
plugin: grpc_lb_policy_pick_first
uses:
- grpc_base
- grpc_client_channel
- name: grpc_lb_policy_round_robin
src:
- - src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c
+ - src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
plugin: grpc_lb_policy_round_robin
uses:
- grpc_base
@@ -601,7 +601,7 @@ filegroups:
headers:
- src/core/ext/filters/max_age/max_age_filter.h
src:
- - src/core/ext/filters/max_age/max_age_filter.c
+ - src/core/ext/filters/max_age/max_age_filter.cc
plugin: grpc_max_age_filter
uses:
- grpc_base
@@ -609,7 +609,7 @@ filegroups:
headers:
- src/core/ext/filters/message_size/message_size_filter.h
src:
- - src/core/ext/filters/message_size/message_size_filter.c
+ - src/core/ext/filters/message_size/message_size_filter.cc
plugin: grpc_message_size_filter
uses:
- grpc_base
@@ -618,17 +618,17 @@ filegroups:
- 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:
- - src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c
- - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c
- - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c
- - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c
+ - src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
+ - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
+ - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
+ - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc
plugin: grpc_resolver_dns_ares
uses:
- grpc_base
- grpc_client_channel
- name: grpc_resolver_dns_native
src:
- - src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c
+ - src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
plugin: grpc_resolver_dns_native
uses:
- grpc_base
@@ -637,14 +637,14 @@ filegroups:
headers:
- src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h
src:
- - src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c
+ - src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
plugin: grpc_resolver_fake
uses:
- grpc_base
- grpc_client_channel
- name: grpc_resolver_sockaddr
src:
- - src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c
+ - src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
plugin: grpc_resolver_sockaddr
uses:
- grpc_base
@@ -673,30 +673,30 @@ filegroups:
- src/core/lib/security/transport/tsi_error.h
- src/core/lib/security/util/json_util.h
src:
- - src/core/lib/http/httpcli_security_connector.c
- - src/core/lib/security/context/security_context.c
- - src/core/lib/security/credentials/composite/composite_credentials.c
- - src/core/lib/security/credentials/credentials.c
- - src/core/lib/security/credentials/credentials_metadata.c
- - src/core/lib/security/credentials/fake/fake_credentials.c
- - src/core/lib/security/credentials/google_default/credentials_generic.c
- - src/core/lib/security/credentials/google_default/google_default_credentials.c
- - src/core/lib/security/credentials/iam/iam_credentials.c
- - src/core/lib/security/credentials/jwt/json_token.c
- - src/core/lib/security/credentials/jwt/jwt_credentials.c
- - src/core/lib/security/credentials/jwt/jwt_verifier.c
- - src/core/lib/security/credentials/oauth2/oauth2_credentials.c
- - src/core/lib/security/credentials/plugin/plugin_credentials.c
- - src/core/lib/security/credentials/ssl/ssl_credentials.c
- - src/core/lib/security/transport/client_auth_filter.c
- - src/core/lib/security/transport/lb_targets_info.c
- - src/core/lib/security/transport/secure_endpoint.c
- - src/core/lib/security/transport/security_connector.c
- - src/core/lib/security/transport/security_handshaker.c
- - src/core/lib/security/transport/server_auth_filter.c
- - src/core/lib/security/transport/tsi_error.c
- - src/core/lib/security/util/json_util.c
- - src/core/lib/surface/init_secure.c
+ - src/core/lib/http/httpcli_security_connector.cc
+ - src/core/lib/security/context/security_context.cc
+ - src/core/lib/security/credentials/composite/composite_credentials.cc
+ - src/core/lib/security/credentials/credentials.cc
+ - src/core/lib/security/credentials/credentials_metadata.cc
+ - src/core/lib/security/credentials/fake/fake_credentials.cc
+ - src/core/lib/security/credentials/google_default/credentials_generic.cc
+ - src/core/lib/security/credentials/google_default/google_default_credentials.cc
+ - src/core/lib/security/credentials/iam/iam_credentials.cc
+ - src/core/lib/security/credentials/jwt/json_token.cc
+ - src/core/lib/security/credentials/jwt/jwt_credentials.cc
+ - src/core/lib/security/credentials/jwt/jwt_verifier.cc
+ - src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
+ - src/core/lib/security/credentials/plugin/plugin_credentials.cc
+ - src/core/lib/security/credentials/ssl/ssl_credentials.cc
+ - src/core/lib/security/transport/client_auth_filter.cc
+ - src/core/lib/security/transport/lb_targets_info.cc
+ - src/core/lib/security/transport/secure_endpoint.cc
+ - src/core/lib/security/transport/security_connector.cc
+ - src/core/lib/security/transport/security_handshaker.cc
+ - src/core/lib/security/transport/server_auth_filter.cc
+ - src/core/lib/security/transport/tsi_error.cc
+ - src/core/lib/security/util/json_util.cc
+ - src/core/lib/surface/init_secure.cc
secure: true
uses:
- grpc_base
@@ -706,7 +706,7 @@ filegroups:
headers:
- src/core/ext/filters/workarounds/workaround_utils.h
src:
- - src/core/ext/filters/workarounds/workaround_utils.c
+ - src/core/ext/filters/workarounds/workaround_utils.cc
uses:
- grpc_base
- name: grpc_server_load_reporting
@@ -714,8 +714,8 @@ filegroups:
- src/core/ext/filters/load_reporting/server_load_reporting_filter.h
- src/core/ext/filters/load_reporting/server_load_reporting_plugin.h
src:
- - src/core/ext/filters/load_reporting/server_load_reporting_filter.c
- - src/core/ext/filters/load_reporting/server_load_reporting_plugin.c
+ - src/core/ext/filters/load_reporting/server_load_reporting_filter.cc
+ - src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc
plugin: grpc_server_load_reporting_plugin
uses:
- grpc_base
@@ -738,7 +738,7 @@ filegroups:
- test/core/util/slice_splitter.h
- test/core/util/trickle_endpoint.h
src:
- - src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c
+ - src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
- test/core/end2end/cq_verifier.c
- test/core/end2end/fixtures/http_proxy_fixture.c
- test/core/end2end/fixtures/proxy.c
@@ -762,11 +762,12 @@ filegroups:
- grpc_transport_chttp2
- name: grpc_trace
src:
- - src/core/lib/debug/trace.c
+ - src/core/lib/debug/trace.cc
deps:
- gpr
filegroups:
- grpc_trace_headers
+ - grpc_base_headers
- name: grpc_trace_headers
headers:
- src/core/lib/debug/trace.h
@@ -794,28 +795,28 @@ filegroups:
- src/core/ext/transport/chttp2/transport/stream_map.h
- src/core/ext/transport/chttp2/transport/varint.h
src:
- - src/core/ext/transport/chttp2/transport/bin_decoder.c
- - src/core/ext/transport/chttp2/transport/bin_encoder.c
- - src/core/ext/transport/chttp2/transport/chttp2_plugin.c
- - src/core/ext/transport/chttp2/transport/chttp2_transport.c
- - src/core/ext/transport/chttp2/transport/flow_control.c
- - src/core/ext/transport/chttp2/transport/frame_data.c
- - src/core/ext/transport/chttp2/transport/frame_goaway.c
- - src/core/ext/transport/chttp2/transport/frame_ping.c
- - src/core/ext/transport/chttp2/transport/frame_rst_stream.c
- - src/core/ext/transport/chttp2/transport/frame_settings.c
- - src/core/ext/transport/chttp2/transport/frame_window_update.c
- - src/core/ext/transport/chttp2/transport/hpack_encoder.c
- - src/core/ext/transport/chttp2/transport/hpack_parser.c
- - src/core/ext/transport/chttp2/transport/hpack_table.c
- - src/core/ext/transport/chttp2/transport/http2_settings.c
- - src/core/ext/transport/chttp2/transport/huffsyms.c
- - src/core/ext/transport/chttp2/transport/incoming_metadata.c
- - src/core/ext/transport/chttp2/transport/parsing.c
- - src/core/ext/transport/chttp2/transport/stream_lists.c
- - src/core/ext/transport/chttp2/transport/stream_map.c
- - src/core/ext/transport/chttp2/transport/varint.c
- - src/core/ext/transport/chttp2/transport/writing.c
+ - src/core/ext/transport/chttp2/transport/bin_decoder.cc
+ - src/core/ext/transport/chttp2/transport/bin_encoder.cc
+ - src/core/ext/transport/chttp2/transport/chttp2_plugin.cc
+ - src/core/ext/transport/chttp2/transport/chttp2_transport.cc
+ - src/core/ext/transport/chttp2/transport/flow_control.cc
+ - src/core/ext/transport/chttp2/transport/frame_data.cc
+ - src/core/ext/transport/chttp2/transport/frame_goaway.cc
+ - src/core/ext/transport/chttp2/transport/frame_ping.cc
+ - src/core/ext/transport/chttp2/transport/frame_rst_stream.cc
+ - src/core/ext/transport/chttp2/transport/frame_settings.cc
+ - src/core/ext/transport/chttp2/transport/frame_window_update.cc
+ - src/core/ext/transport/chttp2/transport/hpack_encoder.cc
+ - src/core/ext/transport/chttp2/transport/hpack_parser.cc
+ - src/core/ext/transport/chttp2/transport/hpack_table.cc
+ - src/core/ext/transport/chttp2/transport/http2_settings.cc
+ - src/core/ext/transport/chttp2/transport/huffsyms.cc
+ - src/core/ext/transport/chttp2/transport/incoming_metadata.cc
+ - src/core/ext/transport/chttp2/transport/parsing.cc
+ - src/core/ext/transport/chttp2/transport/stream_lists.cc
+ - src/core/ext/transport/chttp2/transport/stream_map.cc
+ - src/core/ext/transport/chttp2/transport/varint.cc
+ - src/core/ext/transport/chttp2/transport/writing.cc
plugin: grpc_chttp2_plugin
uses:
- grpc_base
@@ -825,22 +826,22 @@ filegroups:
headers:
- src/core/ext/transport/chttp2/alpn/alpn.h
src:
- - src/core/ext/transport/chttp2/alpn/alpn.c
+ - src/core/ext/transport/chttp2/alpn/alpn.cc
deps:
- gpr
- name: grpc_transport_chttp2_client_connector
headers:
- src/core/ext/transport/chttp2/client/chttp2_connector.h
src:
- - src/core/ext/transport/chttp2/client/chttp2_connector.c
+ - src/core/ext/transport/chttp2/client/chttp2_connector.cc
uses:
- grpc_transport_chttp2
- grpc_base
- grpc_client_channel
- name: grpc_transport_chttp2_client_insecure
src:
- - src/core/ext/transport/chttp2/client/insecure/channel_create.c
- - src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c
+ - src/core/ext/transport/chttp2/client/insecure/channel_create.cc
+ - src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc
uses:
- grpc_transport_chttp2_client_connector
- grpc_transport_chttp2
@@ -848,7 +849,7 @@ filegroups:
- grpc_client_channel
- name: grpc_transport_chttp2_client_secure
src:
- - src/core/ext/transport/chttp2/client/secure/secure_channel_create.c
+ - src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc
uses:
- grpc_transport_chttp2
- grpc_base
@@ -859,21 +860,21 @@ filegroups:
headers:
- src/core/ext/transport/chttp2/server/chttp2_server.h
src:
- - src/core/ext/transport/chttp2/server/chttp2_server.c
+ - src/core/ext/transport/chttp2/server/chttp2_server.cc
uses:
- grpc_transport_chttp2
- grpc_base
- name: grpc_transport_chttp2_server_insecure
src:
- - src/core/ext/transport/chttp2/server/insecure/server_chttp2.c
- - src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c
+ - src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc
+ - src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc
uses:
- grpc_transport_chttp2
- grpc_base
- grpc_transport_chttp2_server
- name: grpc_transport_chttp2_server_secure
src:
- - src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c
+ - src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc
uses:
- grpc_transport_chttp2
- grpc_base
@@ -888,17 +889,17 @@ filegroups:
- src/core/ext/transport/cronet/transport/cronet_transport.h
- third_party/objective_c/Cronet/bidirectional_stream_c.h
src:
- - src/core/ext/transport/cronet/client/secure/cronet_channel_create.c
- - src/core/ext/transport/cronet/transport/cronet_api_dummy.c
- - src/core/ext/transport/cronet/transport/cronet_transport.c
+ - src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc
+ - src/core/ext/transport/cronet/transport/cronet_api_dummy.cc
+ - src/core/ext/transport/cronet/transport/cronet_transport.cc
filegroups:
- grpc_base
- grpc_transport_chttp2
- grpc_http_filters
- name: grpc_transport_inproc
src:
- - src/core/ext/transport/inproc/inproc_plugin.c
- - src/core/ext/transport/inproc/inproc_transport.c
+ - src/core/ext/transport/inproc/inproc_plugin.cc
+ - src/core/ext/transport/inproc/inproc_transport.cc
plugin: grpc_inproc_plugin
uses:
- grpc_transport_inproc_headers
@@ -912,7 +913,7 @@ filegroups:
headers:
- src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h
src:
- - src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c
+ - src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc
plugin: grpc_workaround_cronet_compression_filter
uses:
- grpc_base
@@ -946,10 +947,10 @@ filegroups:
- src/core/tsi/ssl_types.h
- src/core/tsi/transport_security_grpc.h
src:
- - src/core/tsi/fake_transport_security.c
- - src/core/tsi/gts_transport_security.c
- - src/core/tsi/ssl_transport_security.c
- - src/core/tsi/transport_security_grpc.c
+ - 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
@@ -964,8 +965,8 @@ filegroups:
- src/core/tsi/transport_security_adapter.h
- src/core/tsi/transport_security_interface.h
src:
- - src/core/tsi/transport_security.c
- - src/core/tsi/transport_security_adapter.c
+ - src/core/tsi/transport_security.cc
+ - src/core/tsi/transport_security_adapter.cc
deps:
- gpr
secure: true
@@ -1154,7 +1155,7 @@ libs:
build: all
language: c
src:
- - src/core/lib/surface/init.c
+ - src/core/lib/surface/init.cc
baselib: true
deps_linkage: static
dll: true
@@ -1190,7 +1191,7 @@ libs:
build: all
language: c
src:
- - src/core/lib/surface/init.c
+ - src/core/lib/surface/init.cc
baselib: true
deps_linkage: static
dll: true
@@ -1258,8 +1259,8 @@ libs:
build: all
language: c
src:
- - src/core/lib/surface/init.c
- - src/core/lib/surface/init_unsecure.c
+ - src/core/lib/surface/init.cc
+ - src/core/lib/surface/init_unsecure.cc
baselib: true
deps_linkage: static
dll: true
@@ -1776,6 +1777,16 @@ targets:
deps:
- gpr_test_util
- gpr
+- name: backoff_test
+ build: test
+ language: c
+ src:
+ - test/core/backoff/backoff_test.c
+ deps:
+ - grpc_test_util
+ - grpc
+ - gpr_test_util
+ - gpr
- name: bad_server_response_test
build: test
language: c
@@ -2204,14 +2215,6 @@ targets:
deps:
- gpr_test_util
- gpr
-- name: gpr_backoff_test
- build: test
- language: c
- src:
- - test/core/support/backoff_test.c
- deps:
- - gpr_test_util
- - gpr
- name: gpr_cmdline_test
build: test
language: c
@@ -4786,7 +4789,7 @@ configs:
CXX: g++
DEFINES: _DEBUG DEBUG GPR_GCOV
LD: gcc
- LDFLAGS: -fprofile-arcs -ftest-coverage -rdynamic
+ LDFLAGS: -fprofile-arcs -ftest-coverage -rdynamic -lstdc++
LDXX: g++
helgrind:
CPPFLAGS: -O0
diff --git a/config.m4 b/config.m4
index cfbacc6021..69f8e94710 100644
--- a/config.m4
+++ b/config.m4
@@ -39,314 +39,314 @@ if test "$PHP_GRPC" != "no"; then
src/php/ext/grpc/server.c \
src/php/ext/grpc/server_credentials.c \
src/php/ext/grpc/timeval.c \
- src/core/lib/profiling/basic_timers.c \
- src/core/lib/profiling/stap_timers.c \
- src/core/lib/support/alloc.c \
- src/core/lib/support/arena.c \
- src/core/lib/support/atm.c \
- src/core/lib/support/avl.c \
- src/core/lib/support/backoff.c \
- src/core/lib/support/cmdline.c \
- src/core/lib/support/cpu_iphone.c \
- src/core/lib/support/cpu_linux.c \
- src/core/lib/support/cpu_posix.c \
- src/core/lib/support/cpu_windows.c \
- src/core/lib/support/env_linux.c \
- src/core/lib/support/env_posix.c \
- src/core/lib/support/env_windows.c \
- src/core/lib/support/histogram.c \
- src/core/lib/support/host_port.c \
- src/core/lib/support/log.c \
- src/core/lib/support/log_android.c \
- src/core/lib/support/log_linux.c \
- src/core/lib/support/log_posix.c \
- src/core/lib/support/log_windows.c \
- src/core/lib/support/mpscq.c \
- src/core/lib/support/murmur_hash.c \
- src/core/lib/support/stack_lockfree.c \
- src/core/lib/support/string.c \
- src/core/lib/support/string_posix.c \
- src/core/lib/support/string_util_windows.c \
- src/core/lib/support/string_windows.c \
- src/core/lib/support/subprocess_posix.c \
- src/core/lib/support/subprocess_windows.c \
- src/core/lib/support/sync.c \
- src/core/lib/support/sync_posix.c \
- src/core/lib/support/sync_windows.c \
- src/core/lib/support/thd.c \
- src/core/lib/support/thd_posix.c \
- src/core/lib/support/thd_windows.c \
- src/core/lib/support/time.c \
- src/core/lib/support/time_posix.c \
- src/core/lib/support/time_precise.c \
- src/core/lib/support/time_windows.c \
- src/core/lib/support/tls_pthread.c \
- src/core/lib/support/tmpfile_msys.c \
- src/core/lib/support/tmpfile_posix.c \
- src/core/lib/support/tmpfile_windows.c \
- src/core/lib/support/wrap_memcpy.c \
- src/core/lib/surface/init.c \
- src/core/lib/channel/channel_args.c \
- src/core/lib/channel/channel_stack.c \
- src/core/lib/channel/channel_stack_builder.c \
- src/core/lib/channel/connected_channel.c \
- src/core/lib/channel/handshaker.c \
- src/core/lib/channel/handshaker_factory.c \
- src/core/lib/channel/handshaker_registry.c \
- src/core/lib/compression/compression.c \
- src/core/lib/compression/compression_internal.c \
- src/core/lib/compression/message_compress.c \
- src/core/lib/compression/stream_compression.c \
- src/core/lib/compression/stream_compression_gzip.c \
- src/core/lib/compression/stream_compression_identity.c \
- src/core/lib/debug/stats.c \
- src/core/lib/debug/stats_data.c \
- src/core/lib/http/format_request.c \
- src/core/lib/http/httpcli.c \
- src/core/lib/http/parser.c \
- src/core/lib/iomgr/call_combiner.c \
- src/core/lib/iomgr/closure.c \
- src/core/lib/iomgr/combiner.c \
- src/core/lib/iomgr/endpoint.c \
- src/core/lib/iomgr/endpoint_pair_posix.c \
- src/core/lib/iomgr/endpoint_pair_uv.c \
- src/core/lib/iomgr/endpoint_pair_windows.c \
- src/core/lib/iomgr/error.c \
- src/core/lib/iomgr/ev_epoll1_linux.c \
- src/core/lib/iomgr/ev_epollex_linux.c \
- src/core/lib/iomgr/ev_epollsig_linux.c \
- src/core/lib/iomgr/ev_poll_posix.c \
- src/core/lib/iomgr/ev_posix.c \
- src/core/lib/iomgr/ev_windows.c \
- src/core/lib/iomgr/exec_ctx.c \
- src/core/lib/iomgr/executor.c \
- src/core/lib/iomgr/gethostname_fallback.c \
- src/core/lib/iomgr/gethostname_host_name_max.c \
- src/core/lib/iomgr/gethostname_sysconf.c \
- src/core/lib/iomgr/iocp_windows.c \
- src/core/lib/iomgr/iomgr.c \
- src/core/lib/iomgr/iomgr_posix.c \
- src/core/lib/iomgr/iomgr_uv.c \
- src/core/lib/iomgr/iomgr_windows.c \
- src/core/lib/iomgr/is_epollexclusive_available.c \
- src/core/lib/iomgr/load_file.c \
- src/core/lib/iomgr/lockfree_event.c \
- src/core/lib/iomgr/network_status_tracker.c \
- src/core/lib/iomgr/polling_entity.c \
- src/core/lib/iomgr/pollset_set_uv.c \
- src/core/lib/iomgr/pollset_set_windows.c \
- src/core/lib/iomgr/pollset_uv.c \
- src/core/lib/iomgr/pollset_windows.c \
- src/core/lib/iomgr/resolve_address_posix.c \
- src/core/lib/iomgr/resolve_address_uv.c \
- src/core/lib/iomgr/resolve_address_windows.c \
- src/core/lib/iomgr/resource_quota.c \
- src/core/lib/iomgr/sockaddr_utils.c \
- src/core/lib/iomgr/socket_factory_posix.c \
- src/core/lib/iomgr/socket_mutator.c \
- src/core/lib/iomgr/socket_utils_common_posix.c \
- src/core/lib/iomgr/socket_utils_linux.c \
- src/core/lib/iomgr/socket_utils_posix.c \
- src/core/lib/iomgr/socket_utils_uv.c \
- src/core/lib/iomgr/socket_utils_windows.c \
- src/core/lib/iomgr/socket_windows.c \
- src/core/lib/iomgr/tcp_client_posix.c \
- src/core/lib/iomgr/tcp_client_uv.c \
- src/core/lib/iomgr/tcp_client_windows.c \
- src/core/lib/iomgr/tcp_posix.c \
- src/core/lib/iomgr/tcp_server_posix.c \
- src/core/lib/iomgr/tcp_server_utils_posix_common.c \
- src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c \
- src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c \
- src/core/lib/iomgr/tcp_server_uv.c \
- src/core/lib/iomgr/tcp_server_windows.c \
- src/core/lib/iomgr/tcp_uv.c \
- src/core/lib/iomgr/tcp_windows.c \
- src/core/lib/iomgr/time_averaged_stats.c \
- src/core/lib/iomgr/timer_generic.c \
- src/core/lib/iomgr/timer_heap.c \
- src/core/lib/iomgr/timer_manager.c \
- src/core/lib/iomgr/timer_uv.c \
- src/core/lib/iomgr/udp_server.c \
- src/core/lib/iomgr/unix_sockets_posix.c \
- src/core/lib/iomgr/unix_sockets_posix_noop.c \
- src/core/lib/iomgr/wakeup_fd_cv.c \
- src/core/lib/iomgr/wakeup_fd_eventfd.c \
- src/core/lib/iomgr/wakeup_fd_nospecial.c \
- src/core/lib/iomgr/wakeup_fd_pipe.c \
- src/core/lib/iomgr/wakeup_fd_posix.c \
- src/core/lib/json/json.c \
- src/core/lib/json/json_reader.c \
- src/core/lib/json/json_string.c \
- src/core/lib/json/json_writer.c \
- src/core/lib/slice/b64.c \
- src/core/lib/slice/percent_encoding.c \
- src/core/lib/slice/slice.c \
- src/core/lib/slice/slice_buffer.c \
- src/core/lib/slice/slice_hash_table.c \
- src/core/lib/slice/slice_intern.c \
- src/core/lib/slice/slice_string_helpers.c \
- src/core/lib/surface/alarm.c \
- src/core/lib/surface/api_trace.c \
- src/core/lib/surface/byte_buffer.c \
- src/core/lib/surface/byte_buffer_reader.c \
- src/core/lib/surface/call.c \
- src/core/lib/surface/call_details.c \
- src/core/lib/surface/call_log_batch.c \
- src/core/lib/surface/channel.c \
- src/core/lib/surface/channel_init.c \
- src/core/lib/surface/channel_ping.c \
- src/core/lib/surface/channel_stack_type.c \
- src/core/lib/surface/completion_queue.c \
- src/core/lib/surface/completion_queue_factory.c \
- src/core/lib/surface/event_string.c \
+ src/core/lib/profiling/basic_timers.cc \
+ src/core/lib/profiling/stap_timers.cc \
+ src/core/lib/support/alloc.cc \
+ src/core/lib/support/arena.cc \
+ src/core/lib/support/atm.cc \
+ src/core/lib/support/avl.cc \
+ src/core/lib/support/cmdline.cc \
+ src/core/lib/support/cpu_iphone.cc \
+ src/core/lib/support/cpu_linux.cc \
+ src/core/lib/support/cpu_posix.cc \
+ src/core/lib/support/cpu_windows.cc \
+ src/core/lib/support/env_linux.cc \
+ src/core/lib/support/env_posix.cc \
+ src/core/lib/support/env_windows.cc \
+ src/core/lib/support/histogram.cc \
+ src/core/lib/support/host_port.cc \
+ src/core/lib/support/log.cc \
+ src/core/lib/support/log_android.cc \
+ src/core/lib/support/log_linux.cc \
+ src/core/lib/support/log_posix.cc \
+ src/core/lib/support/log_windows.cc \
+ src/core/lib/support/mpscq.cc \
+ src/core/lib/support/murmur_hash.cc \
+ src/core/lib/support/stack_lockfree.cc \
+ src/core/lib/support/string.cc \
+ src/core/lib/support/string_posix.cc \
+ src/core/lib/support/string_util_windows.cc \
+ src/core/lib/support/string_windows.cc \
+ src/core/lib/support/subprocess_posix.cc \
+ src/core/lib/support/subprocess_windows.cc \
+ src/core/lib/support/sync.cc \
+ src/core/lib/support/sync_posix.cc \
+ src/core/lib/support/sync_windows.cc \
+ src/core/lib/support/thd.cc \
+ src/core/lib/support/thd_posix.cc \
+ src/core/lib/support/thd_windows.cc \
+ src/core/lib/support/time.cc \
+ src/core/lib/support/time_posix.cc \
+ src/core/lib/support/time_precise.cc \
+ src/core/lib/support/time_windows.cc \
+ src/core/lib/support/tls_pthread.cc \
+ src/core/lib/support/tmpfile_msys.cc \
+ src/core/lib/support/tmpfile_posix.cc \
+ src/core/lib/support/tmpfile_windows.cc \
+ src/core/lib/support/wrap_memcpy.cc \
+ src/core/lib/surface/init.cc \
+ src/core/lib/backoff/backoff.cc \
+ src/core/lib/channel/channel_args.cc \
+ src/core/lib/channel/channel_stack.cc \
+ src/core/lib/channel/channel_stack_builder.cc \
+ src/core/lib/channel/connected_channel.cc \
+ src/core/lib/channel/handshaker.cc \
+ 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/message_compress.cc \
+ src/core/lib/compression/stream_compression.cc \
+ src/core/lib/compression/stream_compression_gzip.cc \
+ src/core/lib/compression/stream_compression_identity.cc \
+ src/core/lib/debug/stats.cc \
+ src/core/lib/debug/stats_data.cc \
+ src/core/lib/http/format_request.cc \
+ src/core/lib/http/httpcli.cc \
+ src/core/lib/http/parser.cc \
+ src/core/lib/iomgr/call_combiner.cc \
+ src/core/lib/iomgr/closure.cc \
+ src/core/lib/iomgr/combiner.cc \
+ src/core/lib/iomgr/endpoint.cc \
+ src/core/lib/iomgr/endpoint_pair_posix.cc \
+ src/core/lib/iomgr/endpoint_pair_uv.cc \
+ src/core/lib/iomgr/endpoint_pair_windows.cc \
+ src/core/lib/iomgr/error.cc \
+ src/core/lib/iomgr/ev_epoll1_linux.cc \
+ src/core/lib/iomgr/ev_epollex_linux.cc \
+ src/core/lib/iomgr/ev_epollsig_linux.cc \
+ src/core/lib/iomgr/ev_poll_posix.cc \
+ src/core/lib/iomgr/ev_posix.cc \
+ src/core/lib/iomgr/ev_windows.cc \
+ src/core/lib/iomgr/exec_ctx.cc \
+ src/core/lib/iomgr/executor.cc \
+ src/core/lib/iomgr/gethostname_fallback.cc \
+ src/core/lib/iomgr/gethostname_host_name_max.cc \
+ src/core/lib/iomgr/gethostname_sysconf.cc \
+ src/core/lib/iomgr/iocp_windows.cc \
+ src/core/lib/iomgr/iomgr.cc \
+ src/core/lib/iomgr/iomgr_posix.cc \
+ src/core/lib/iomgr/iomgr_uv.cc \
+ src/core/lib/iomgr/iomgr_windows.cc \
+ src/core/lib/iomgr/is_epollexclusive_available.cc \
+ src/core/lib/iomgr/load_file.cc \
+ src/core/lib/iomgr/lockfree_event.cc \
+ src/core/lib/iomgr/network_status_tracker.cc \
+ src/core/lib/iomgr/polling_entity.cc \
+ src/core/lib/iomgr/pollset_set_uv.cc \
+ src/core/lib/iomgr/pollset_set_windows.cc \
+ src/core/lib/iomgr/pollset_uv.cc \
+ src/core/lib/iomgr/pollset_windows.cc \
+ src/core/lib/iomgr/resolve_address_posix.cc \
+ src/core/lib/iomgr/resolve_address_uv.cc \
+ src/core/lib/iomgr/resolve_address_windows.cc \
+ src/core/lib/iomgr/resource_quota.cc \
+ src/core/lib/iomgr/sockaddr_utils.cc \
+ src/core/lib/iomgr/socket_factory_posix.cc \
+ src/core/lib/iomgr/socket_mutator.cc \
+ src/core/lib/iomgr/socket_utils_common_posix.cc \
+ src/core/lib/iomgr/socket_utils_linux.cc \
+ src/core/lib/iomgr/socket_utils_posix.cc \
+ src/core/lib/iomgr/socket_utils_uv.cc \
+ src/core/lib/iomgr/socket_utils_windows.cc \
+ src/core/lib/iomgr/socket_windows.cc \
+ src/core/lib/iomgr/tcp_client_posix.cc \
+ src/core/lib/iomgr/tcp_client_uv.cc \
+ src/core/lib/iomgr/tcp_client_windows.cc \
+ src/core/lib/iomgr/tcp_posix.cc \
+ src/core/lib/iomgr/tcp_server_posix.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_common.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
+ src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
+ src/core/lib/iomgr/tcp_server_uv.cc \
+ src/core/lib/iomgr/tcp_server_windows.cc \
+ src/core/lib/iomgr/tcp_uv.cc \
+ src/core/lib/iomgr/tcp_windows.cc \
+ src/core/lib/iomgr/time_averaged_stats.cc \
+ src/core/lib/iomgr/timer_generic.cc \
+ src/core/lib/iomgr/timer_heap.cc \
+ src/core/lib/iomgr/timer_manager.cc \
+ src/core/lib/iomgr/timer_uv.cc \
+ src/core/lib/iomgr/udp_server.cc \
+ src/core/lib/iomgr/unix_sockets_posix.cc \
+ src/core/lib/iomgr/unix_sockets_posix_noop.cc \
+ src/core/lib/iomgr/wakeup_fd_cv.cc \
+ src/core/lib/iomgr/wakeup_fd_eventfd.cc \
+ src/core/lib/iomgr/wakeup_fd_nospecial.cc \
+ src/core/lib/iomgr/wakeup_fd_pipe.cc \
+ src/core/lib/iomgr/wakeup_fd_posix.cc \
+ src/core/lib/json/json.cc \
+ src/core/lib/json/json_reader.cc \
+ src/core/lib/json/json_string.cc \
+ src/core/lib/json/json_writer.cc \
+ src/core/lib/slice/b64.cc \
+ src/core/lib/slice/percent_encoding.cc \
+ src/core/lib/slice/slice.cc \
+ src/core/lib/slice/slice_buffer.cc \
+ src/core/lib/slice/slice_hash_table.cc \
+ src/core/lib/slice/slice_intern.cc \
+ src/core/lib/slice/slice_string_helpers.cc \
+ src/core/lib/surface/alarm.cc \
+ src/core/lib/surface/api_trace.cc \
+ src/core/lib/surface/byte_buffer.cc \
+ src/core/lib/surface/byte_buffer_reader.cc \
+ src/core/lib/surface/call.cc \
+ src/core/lib/surface/call_details.cc \
+ src/core/lib/surface/call_log_batch.cc \
+ src/core/lib/surface/channel.cc \
+ src/core/lib/surface/channel_init.cc \
+ src/core/lib/surface/channel_ping.cc \
+ src/core/lib/surface/channel_stack_type.cc \
+ src/core/lib/surface/completion_queue.cc \
+ src/core/lib/surface/completion_queue_factory.cc \
+ src/core/lib/surface/event_string.cc \
src/core/lib/surface/lame_client.cc \
- src/core/lib/surface/metadata_array.c \
- src/core/lib/surface/server.c \
- src/core/lib/surface/validate_metadata.c \
- src/core/lib/surface/version.c \
- src/core/lib/transport/bdp_estimator.c \
- src/core/lib/transport/byte_stream.c \
- src/core/lib/transport/connectivity_state.c \
- src/core/lib/transport/error_utils.c \
- src/core/lib/transport/metadata.c \
- src/core/lib/transport/metadata_batch.c \
- src/core/lib/transport/pid_controller.c \
- src/core/lib/transport/service_config.c \
- src/core/lib/transport/static_metadata.c \
- src/core/lib/transport/status_conversion.c \
- src/core/lib/transport/timeout_encoding.c \
- src/core/lib/transport/transport.c \
- src/core/lib/transport/transport_op_string.c \
- src/core/lib/debug/trace.c \
- src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c \
- src/core/ext/transport/chttp2/transport/bin_decoder.c \
- src/core/ext/transport/chttp2/transport/bin_encoder.c \
- src/core/ext/transport/chttp2/transport/chttp2_plugin.c \
- src/core/ext/transport/chttp2/transport/chttp2_transport.c \
- src/core/ext/transport/chttp2/transport/flow_control.c \
- src/core/ext/transport/chttp2/transport/frame_data.c \
- src/core/ext/transport/chttp2/transport/frame_goaway.c \
- src/core/ext/transport/chttp2/transport/frame_ping.c \
- src/core/ext/transport/chttp2/transport/frame_rst_stream.c \
- src/core/ext/transport/chttp2/transport/frame_settings.c \
- src/core/ext/transport/chttp2/transport/frame_window_update.c \
- src/core/ext/transport/chttp2/transport/hpack_encoder.c \
- src/core/ext/transport/chttp2/transport/hpack_parser.c \
- src/core/ext/transport/chttp2/transport/hpack_table.c \
- src/core/ext/transport/chttp2/transport/http2_settings.c \
- src/core/ext/transport/chttp2/transport/huffsyms.c \
- src/core/ext/transport/chttp2/transport/incoming_metadata.c \
- src/core/ext/transport/chttp2/transport/parsing.c \
- src/core/ext/transport/chttp2/transport/stream_lists.c \
- src/core/ext/transport/chttp2/transport/stream_map.c \
- src/core/ext/transport/chttp2/transport/varint.c \
- src/core/ext/transport/chttp2/transport/writing.c \
- src/core/ext/transport/chttp2/alpn/alpn.c \
- src/core/ext/filters/http/client/http_client_filter.c \
- src/core/ext/filters/http/http_filters_plugin.c \
- src/core/ext/filters/http/message_compress/message_compress_filter.c \
- src/core/ext/filters/http/server/http_server_filter.c \
- src/core/lib/http/httpcli_security_connector.c \
- src/core/lib/security/context/security_context.c \
- src/core/lib/security/credentials/composite/composite_credentials.c \
- src/core/lib/security/credentials/credentials.c \
- src/core/lib/security/credentials/credentials_metadata.c \
- src/core/lib/security/credentials/fake/fake_credentials.c \
- src/core/lib/security/credentials/google_default/credentials_generic.c \
- src/core/lib/security/credentials/google_default/google_default_credentials.c \
- src/core/lib/security/credentials/iam/iam_credentials.c \
- src/core/lib/security/credentials/jwt/json_token.c \
- src/core/lib/security/credentials/jwt/jwt_credentials.c \
- src/core/lib/security/credentials/jwt/jwt_verifier.c \
- src/core/lib/security/credentials/oauth2/oauth2_credentials.c \
- src/core/lib/security/credentials/plugin/plugin_credentials.c \
- src/core/lib/security/credentials/ssl/ssl_credentials.c \
- src/core/lib/security/transport/client_auth_filter.c \
- src/core/lib/security/transport/lb_targets_info.c \
- src/core/lib/security/transport/secure_endpoint.c \
- src/core/lib/security/transport/security_connector.c \
- src/core/lib/security/transport/security_handshaker.c \
- src/core/lib/security/transport/server_auth_filter.c \
- src/core/lib/security/transport/tsi_error.c \
- src/core/lib/security/util/json_util.c \
- src/core/lib/surface/init_secure.c \
- src/core/tsi/fake_transport_security.c \
- src/core/tsi/gts_transport_security.c \
- src/core/tsi/ssl_transport_security.c \
- src/core/tsi/transport_security_grpc.c \
- src/core/tsi/transport_security.c \
- src/core/tsi/transport_security_adapter.c \
- src/core/ext/transport/chttp2/server/chttp2_server.c \
- src/core/ext/transport/chttp2/client/secure/secure_channel_create.c \
- src/core/ext/filters/client_channel/channel_connectivity.c \
- src/core/ext/filters/client_channel/client_channel.c \
- src/core/ext/filters/client_channel/client_channel_factory.c \
- src/core/ext/filters/client_channel/client_channel_plugin.c \
- src/core/ext/filters/client_channel/connector.c \
- src/core/ext/filters/client_channel/http_connect_handshaker.c \
- src/core/ext/filters/client_channel/http_proxy.c \
- src/core/ext/filters/client_channel/lb_policy.c \
- src/core/ext/filters/client_channel/lb_policy_factory.c \
- src/core/ext/filters/client_channel/lb_policy_registry.c \
- src/core/ext/filters/client_channel/parse_address.c \
- src/core/ext/filters/client_channel/proxy_mapper.c \
- src/core/ext/filters/client_channel/proxy_mapper_registry.c \
- src/core/ext/filters/client_channel/resolver.c \
- src/core/ext/filters/client_channel/resolver_factory.c \
- src/core/ext/filters/client_channel/resolver_registry.c \
- src/core/ext/filters/client_channel/retry_throttle.c \
- src/core/ext/filters/client_channel/subchannel.c \
- src/core/ext/filters/client_channel/subchannel_index.c \
- src/core/ext/filters/client_channel/uri_parser.c \
- src/core/ext/filters/deadline/deadline_filter.c \
- src/core/ext/transport/chttp2/client/chttp2_connector.c \
- src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \
- src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \
- src/core/ext/transport/chttp2/client/insecure/channel_create.c \
- src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \
- src/core/ext/transport/inproc/inproc_plugin.c \
- src/core/ext/transport/inproc/inproc_transport.c \
- src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c \
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c \
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c \
- src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c \
- src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c \
+ src/core/lib/surface/metadata_array.cc \
+ src/core/lib/surface/server.cc \
+ src/core/lib/surface/validate_metadata.cc \
+ src/core/lib/surface/version.cc \
+ src/core/lib/transport/bdp_estimator.cc \
+ src/core/lib/transport/byte_stream.cc \
+ src/core/lib/transport/connectivity_state.cc \
+ src/core/lib/transport/error_utils.cc \
+ src/core/lib/transport/metadata.cc \
+ src/core/lib/transport/metadata_batch.cc \
+ src/core/lib/transport/pid_controller.cc \
+ src/core/lib/transport/service_config.cc \
+ src/core/lib/transport/static_metadata.cc \
+ src/core/lib/transport/status_conversion.cc \
+ src/core/lib/transport/timeout_encoding.cc \
+ src/core/lib/transport/transport.cc \
+ src/core/lib/transport/transport_op_string.cc \
+ src/core/lib/debug/trace.cc \
+ src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc \
+ src/core/ext/transport/chttp2/transport/bin_decoder.cc \
+ src/core/ext/transport/chttp2/transport/bin_encoder.cc \
+ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc \
+ src/core/ext/transport/chttp2/transport/chttp2_transport.cc \
+ src/core/ext/transport/chttp2/transport/flow_control.cc \
+ src/core/ext/transport/chttp2/transport/frame_data.cc \
+ src/core/ext/transport/chttp2/transport/frame_goaway.cc \
+ src/core/ext/transport/chttp2/transport/frame_ping.cc \
+ src/core/ext/transport/chttp2/transport/frame_rst_stream.cc \
+ src/core/ext/transport/chttp2/transport/frame_settings.cc \
+ src/core/ext/transport/chttp2/transport/frame_window_update.cc \
+ src/core/ext/transport/chttp2/transport/hpack_encoder.cc \
+ src/core/ext/transport/chttp2/transport/hpack_parser.cc \
+ src/core/ext/transport/chttp2/transport/hpack_table.cc \
+ src/core/ext/transport/chttp2/transport/http2_settings.cc \
+ src/core/ext/transport/chttp2/transport/huffsyms.cc \
+ src/core/ext/transport/chttp2/transport/incoming_metadata.cc \
+ src/core/ext/transport/chttp2/transport/parsing.cc \
+ src/core/ext/transport/chttp2/transport/stream_lists.cc \
+ src/core/ext/transport/chttp2/transport/stream_map.cc \
+ src/core/ext/transport/chttp2/transport/varint.cc \
+ src/core/ext/transport/chttp2/transport/writing.cc \
+ src/core/ext/transport/chttp2/alpn/alpn.cc \
+ src/core/ext/filters/http/client/http_client_filter.cc \
+ src/core/ext/filters/http/http_filters_plugin.cc \
+ src/core/ext/filters/http/message_compress/message_compress_filter.cc \
+ src/core/ext/filters/http/server/http_server_filter.cc \
+ src/core/lib/http/httpcli_security_connector.cc \
+ src/core/lib/security/context/security_context.cc \
+ src/core/lib/security/credentials/composite/composite_credentials.cc \
+ src/core/lib/security/credentials/credentials.cc \
+ src/core/lib/security/credentials/credentials_metadata.cc \
+ src/core/lib/security/credentials/fake/fake_credentials.cc \
+ src/core/lib/security/credentials/google_default/credentials_generic.cc \
+ src/core/lib/security/credentials/google_default/google_default_credentials.cc \
+ src/core/lib/security/credentials/iam/iam_credentials.cc \
+ src/core/lib/security/credentials/jwt/json_token.cc \
+ src/core/lib/security/credentials/jwt/jwt_credentials.cc \
+ src/core/lib/security/credentials/jwt/jwt_verifier.cc \
+ src/core/lib/security/credentials/oauth2/oauth2_credentials.cc \
+ src/core/lib/security/credentials/plugin/plugin_credentials.cc \
+ src/core/lib/security/credentials/ssl/ssl_credentials.cc \
+ src/core/lib/security/transport/client_auth_filter.cc \
+ src/core/lib/security/transport/lb_targets_info.cc \
+ src/core/lib/security/transport/secure_endpoint.cc \
+ src/core/lib/security/transport/security_connector.cc \
+ src/core/lib/security/transport/security_handshaker.cc \
+ src/core/lib/security/transport/server_auth_filter.cc \
+ 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/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 \
+ src/core/tsi/transport_security_adapter.cc \
+ src/core/ext/transport/chttp2/server/chttp2_server.cc \
+ src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc \
+ src/core/ext/filters/client_channel/channel_connectivity.cc \
+ src/core/ext/filters/client_channel/client_channel.cc \
+ src/core/ext/filters/client_channel/client_channel_factory.cc \
+ src/core/ext/filters/client_channel/client_channel_plugin.cc \
+ src/core/ext/filters/client_channel/connector.cc \
+ src/core/ext/filters/client_channel/http_connect_handshaker.cc \
+ src/core/ext/filters/client_channel/http_proxy.cc \
+ src/core/ext/filters/client_channel/lb_policy.cc \
+ src/core/ext/filters/client_channel/lb_policy_factory.cc \
+ src/core/ext/filters/client_channel/lb_policy_registry.cc \
+ src/core/ext/filters/client_channel/parse_address.cc \
+ src/core/ext/filters/client_channel/proxy_mapper.cc \
+ src/core/ext/filters/client_channel/proxy_mapper_registry.cc \
+ src/core/ext/filters/client_channel/resolver.cc \
+ src/core/ext/filters/client_channel/resolver_factory.cc \
+ src/core/ext/filters/client_channel/resolver_registry.cc \
+ src/core/ext/filters/client_channel/retry_throttle.cc \
+ src/core/ext/filters/client_channel/subchannel.cc \
+ src/core/ext/filters/client_channel/subchannel_index.cc \
+ src/core/ext/filters/client_channel/uri_parser.cc \
+ src/core/ext/filters/deadline/deadline_filter.cc \
+ src/core/ext/transport/chttp2/client/chttp2_connector.cc \
+ src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc \
+ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc \
+ src/core/ext/transport/chttp2/client/insecure/channel_create.cc \
+ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc \
+ src/core/ext/transport/inproc/inproc_plugin.cc \
+ src/core/ext/transport/inproc/inproc_transport.cc \
+ src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc \
+ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc \
+ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc \
+ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc \
+ src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc \
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \
third_party/nanopb/pb_common.c \
third_party/nanopb/pb_decode.c \
third_party/nanopb/pb_encode.c \
- src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c \
- src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c \
- src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c \
- src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c \
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c \
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c \
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c \
- src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c \
- src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c \
- src/core/ext/filters/load_reporting/server_load_reporting_filter.c \
- src/core/ext/filters/load_reporting/server_load_reporting_plugin.c \
- src/core/ext/census/base_resources.c \
- src/core/ext/census/context.c \
+ src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc \
+ src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc \
+ src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc \
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc \
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc \
+ src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc \
+ src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc \
+ src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc \
+ src/core/ext/filters/load_reporting/server_load_reporting_filter.cc \
+ src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc \
+ src/core/ext/census/base_resources.cc \
+ src/core/ext/census/context.cc \
src/core/ext/census/gen/census.pb.c \
src/core/ext/census/gen/trace_context.pb.c \
- src/core/ext/census/grpc_context.c \
- src/core/ext/census/grpc_filter.c \
- src/core/ext/census/grpc_plugin.c \
- src/core/ext/census/initialize.c \
- src/core/ext/census/intrusive_hash_map.c \
- src/core/ext/census/mlog.c \
- src/core/ext/census/operation.c \
- src/core/ext/census/placeholders.c \
- src/core/ext/census/resource.c \
- src/core/ext/census/trace_context.c \
- src/core/ext/census/tracing.c \
- src/core/ext/filters/max_age/max_age_filter.c \
- src/core/ext/filters/message_size/message_size_filter.c \
- src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c \
- src/core/ext/filters/workarounds/workaround_utils.c \
- src/core/plugin_registry/grpc_plugin_registry.c \
+ src/core/ext/census/grpc_context.cc \
+ src/core/ext/census/grpc_filter.cc \
+ src/core/ext/census/grpc_plugin.cc \
+ src/core/ext/census/initialize.cc \
+ src/core/ext/census/intrusive_hash_map.cc \
+ src/core/ext/census/mlog.cc \
+ src/core/ext/census/operation.cc \
+ src/core/ext/census/placeholders.cc \
+ src/core/ext/census/resource.cc \
+ src/core/ext/census/trace_context.cc \
+ src/core/ext/census/tracing.cc \
+ src/core/ext/filters/max_age/max_age_filter.cc \
+ src/core/ext/filters/message_size/message_size_filter.cc \
+ src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc \
+ 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 \
@@ -687,6 +687,7 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/secure)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/transport)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/inproc)
+ PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/backoff)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/channel)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/compression)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/debug)
diff --git a/config.w32 b/config.w32
index 1253a888c9..ba05db8950 100644
--- a/config.w32
+++ b/config.w32
@@ -16,314 +16,314 @@ if (PHP_GRPC != "no") {
"src\\php\\ext\\grpc\\server.c " +
"src\\php\\ext\\grpc\\server_credentials.c " +
"src\\php\\ext\\grpc\\timeval.c " +
- "src\\core\\lib\\profiling\\basic_timers.c " +
- "src\\core\\lib\\profiling\\stap_timers.c " +
- "src\\core\\lib\\support\\alloc.c " +
- "src\\core\\lib\\support\\arena.c " +
- "src\\core\\lib\\support\\atm.c " +
- "src\\core\\lib\\support\\avl.c " +
- "src\\core\\lib\\support\\backoff.c " +
- "src\\core\\lib\\support\\cmdline.c " +
- "src\\core\\lib\\support\\cpu_iphone.c " +
- "src\\core\\lib\\support\\cpu_linux.c " +
- "src\\core\\lib\\support\\cpu_posix.c " +
- "src\\core\\lib\\support\\cpu_windows.c " +
- "src\\core\\lib\\support\\env_linux.c " +
- "src\\core\\lib\\support\\env_posix.c " +
- "src\\core\\lib\\support\\env_windows.c " +
- "src\\core\\lib\\support\\histogram.c " +
- "src\\core\\lib\\support\\host_port.c " +
- "src\\core\\lib\\support\\log.c " +
- "src\\core\\lib\\support\\log_android.c " +
- "src\\core\\lib\\support\\log_linux.c " +
- "src\\core\\lib\\support\\log_posix.c " +
- "src\\core\\lib\\support\\log_windows.c " +
- "src\\core\\lib\\support\\mpscq.c " +
- "src\\core\\lib\\support\\murmur_hash.c " +
- "src\\core\\lib\\support\\stack_lockfree.c " +
- "src\\core\\lib\\support\\string.c " +
- "src\\core\\lib\\support\\string_posix.c " +
- "src\\core\\lib\\support\\string_util_windows.c " +
- "src\\core\\lib\\support\\string_windows.c " +
- "src\\core\\lib\\support\\subprocess_posix.c " +
- "src\\core\\lib\\support\\subprocess_windows.c " +
- "src\\core\\lib\\support\\sync.c " +
- "src\\core\\lib\\support\\sync_posix.c " +
- "src\\core\\lib\\support\\sync_windows.c " +
- "src\\core\\lib\\support\\thd.c " +
- "src\\core\\lib\\support\\thd_posix.c " +
- "src\\core\\lib\\support\\thd_windows.c " +
- "src\\core\\lib\\support\\time.c " +
- "src\\core\\lib\\support\\time_posix.c " +
- "src\\core\\lib\\support\\time_precise.c " +
- "src\\core\\lib\\support\\time_windows.c " +
- "src\\core\\lib\\support\\tls_pthread.c " +
- "src\\core\\lib\\support\\tmpfile_msys.c " +
- "src\\core\\lib\\support\\tmpfile_posix.c " +
- "src\\core\\lib\\support\\tmpfile_windows.c " +
- "src\\core\\lib\\support\\wrap_memcpy.c " +
- "src\\core\\lib\\surface\\init.c " +
- "src\\core\\lib\\channel\\channel_args.c " +
- "src\\core\\lib\\channel\\channel_stack.c " +
- "src\\core\\lib\\channel\\channel_stack_builder.c " +
- "src\\core\\lib\\channel\\connected_channel.c " +
- "src\\core\\lib\\channel\\handshaker.c " +
- "src\\core\\lib\\channel\\handshaker_factory.c " +
- "src\\core\\lib\\channel\\handshaker_registry.c " +
- "src\\core\\lib\\compression\\compression.c " +
- "src\\core\\lib\\compression\\compression_internal.c " +
- "src\\core\\lib\\compression\\message_compress.c " +
- "src\\core\\lib\\compression\\stream_compression.c " +
- "src\\core\\lib\\compression\\stream_compression_gzip.c " +
- "src\\core\\lib\\compression\\stream_compression_identity.c " +
- "src\\core\\lib\\debug\\stats.c " +
- "src\\core\\lib\\debug\\stats_data.c " +
- "src\\core\\lib\\http\\format_request.c " +
- "src\\core\\lib\\http\\httpcli.c " +
- "src\\core\\lib\\http\\parser.c " +
- "src\\core\\lib\\iomgr\\call_combiner.c " +
- "src\\core\\lib\\iomgr\\closure.c " +
- "src\\core\\lib\\iomgr\\combiner.c " +
- "src\\core\\lib\\iomgr\\endpoint.c " +
- "src\\core\\lib\\iomgr\\endpoint_pair_posix.c " +
- "src\\core\\lib\\iomgr\\endpoint_pair_uv.c " +
- "src\\core\\lib\\iomgr\\endpoint_pair_windows.c " +
- "src\\core\\lib\\iomgr\\error.c " +
- "src\\core\\lib\\iomgr\\ev_epoll1_linux.c " +
- "src\\core\\lib\\iomgr\\ev_epollex_linux.c " +
- "src\\core\\lib\\iomgr\\ev_epollsig_linux.c " +
- "src\\core\\lib\\iomgr\\ev_poll_posix.c " +
- "src\\core\\lib\\iomgr\\ev_posix.c " +
- "src\\core\\lib\\iomgr\\ev_windows.c " +
- "src\\core\\lib\\iomgr\\exec_ctx.c " +
- "src\\core\\lib\\iomgr\\executor.c " +
- "src\\core\\lib\\iomgr\\gethostname_fallback.c " +
- "src\\core\\lib\\iomgr\\gethostname_host_name_max.c " +
- "src\\core\\lib\\iomgr\\gethostname_sysconf.c " +
- "src\\core\\lib\\iomgr\\iocp_windows.c " +
- "src\\core\\lib\\iomgr\\iomgr.c " +
- "src\\core\\lib\\iomgr\\iomgr_posix.c " +
- "src\\core\\lib\\iomgr\\iomgr_uv.c " +
- "src\\core\\lib\\iomgr\\iomgr_windows.c " +
- "src\\core\\lib\\iomgr\\is_epollexclusive_available.c " +
- "src\\core\\lib\\iomgr\\load_file.c " +
- "src\\core\\lib\\iomgr\\lockfree_event.c " +
- "src\\core\\lib\\iomgr\\network_status_tracker.c " +
- "src\\core\\lib\\iomgr\\polling_entity.c " +
- "src\\core\\lib\\iomgr\\pollset_set_uv.c " +
- "src\\core\\lib\\iomgr\\pollset_set_windows.c " +
- "src\\core\\lib\\iomgr\\pollset_uv.c " +
- "src\\core\\lib\\iomgr\\pollset_windows.c " +
- "src\\core\\lib\\iomgr\\resolve_address_posix.c " +
- "src\\core\\lib\\iomgr\\resolve_address_uv.c " +
- "src\\core\\lib\\iomgr\\resolve_address_windows.c " +
- "src\\core\\lib\\iomgr\\resource_quota.c " +
- "src\\core\\lib\\iomgr\\sockaddr_utils.c " +
- "src\\core\\lib\\iomgr\\socket_factory_posix.c " +
- "src\\core\\lib\\iomgr\\socket_mutator.c " +
- "src\\core\\lib\\iomgr\\socket_utils_common_posix.c " +
- "src\\core\\lib\\iomgr\\socket_utils_linux.c " +
- "src\\core\\lib\\iomgr\\socket_utils_posix.c " +
- "src\\core\\lib\\iomgr\\socket_utils_uv.c " +
- "src\\core\\lib\\iomgr\\socket_utils_windows.c " +
- "src\\core\\lib\\iomgr\\socket_windows.c " +
- "src\\core\\lib\\iomgr\\tcp_client_posix.c " +
- "src\\core\\lib\\iomgr\\tcp_client_uv.c " +
- "src\\core\\lib\\iomgr\\tcp_client_windows.c " +
- "src\\core\\lib\\iomgr\\tcp_posix.c " +
- "src\\core\\lib\\iomgr\\tcp_server_posix.c " +
- "src\\core\\lib\\iomgr\\tcp_server_utils_posix_common.c " +
- "src\\core\\lib\\iomgr\\tcp_server_utils_posix_ifaddrs.c " +
- "src\\core\\lib\\iomgr\\tcp_server_utils_posix_noifaddrs.c " +
- "src\\core\\lib\\iomgr\\tcp_server_uv.c " +
- "src\\core\\lib\\iomgr\\tcp_server_windows.c " +
- "src\\core\\lib\\iomgr\\tcp_uv.c " +
- "src\\core\\lib\\iomgr\\tcp_windows.c " +
- "src\\core\\lib\\iomgr\\time_averaged_stats.c " +
- "src\\core\\lib\\iomgr\\timer_generic.c " +
- "src\\core\\lib\\iomgr\\timer_heap.c " +
- "src\\core\\lib\\iomgr\\timer_manager.c " +
- "src\\core\\lib\\iomgr\\timer_uv.c " +
- "src\\core\\lib\\iomgr\\udp_server.c " +
- "src\\core\\lib\\iomgr\\unix_sockets_posix.c " +
- "src\\core\\lib\\iomgr\\unix_sockets_posix_noop.c " +
- "src\\core\\lib\\iomgr\\wakeup_fd_cv.c " +
- "src\\core\\lib\\iomgr\\wakeup_fd_eventfd.c " +
- "src\\core\\lib\\iomgr\\wakeup_fd_nospecial.c " +
- "src\\core\\lib\\iomgr\\wakeup_fd_pipe.c " +
- "src\\core\\lib\\iomgr\\wakeup_fd_posix.c " +
- "src\\core\\lib\\json\\json.c " +
- "src\\core\\lib\\json\\json_reader.c " +
- "src\\core\\lib\\json\\json_string.c " +
- "src\\core\\lib\\json\\json_writer.c " +
- "src\\core\\lib\\slice\\b64.c " +
- "src\\core\\lib\\slice\\percent_encoding.c " +
- "src\\core\\lib\\slice\\slice.c " +
- "src\\core\\lib\\slice\\slice_buffer.c " +
- "src\\core\\lib\\slice\\slice_hash_table.c " +
- "src\\core\\lib\\slice\\slice_intern.c " +
- "src\\core\\lib\\slice\\slice_string_helpers.c " +
- "src\\core\\lib\\surface\\alarm.c " +
- "src\\core\\lib\\surface\\api_trace.c " +
- "src\\core\\lib\\surface\\byte_buffer.c " +
- "src\\core\\lib\\surface\\byte_buffer_reader.c " +
- "src\\core\\lib\\surface\\call.c " +
- "src\\core\\lib\\surface\\call_details.c " +
- "src\\core\\lib\\surface\\call_log_batch.c " +
- "src\\core\\lib\\surface\\channel.c " +
- "src\\core\\lib\\surface\\channel_init.c " +
- "src\\core\\lib\\surface\\channel_ping.c " +
- "src\\core\\lib\\surface\\channel_stack_type.c " +
- "src\\core\\lib\\surface\\completion_queue.c " +
- "src\\core\\lib\\surface\\completion_queue_factory.c " +
- "src\\core\\lib\\surface\\event_string.c " +
+ "src\\core\\lib\\profiling\\basic_timers.cc " +
+ "src\\core\\lib\\profiling\\stap_timers.cc " +
+ "src\\core\\lib\\support\\alloc.cc " +
+ "src\\core\\lib\\support\\arena.cc " +
+ "src\\core\\lib\\support\\atm.cc " +
+ "src\\core\\lib\\support\\avl.cc " +
+ "src\\core\\lib\\support\\cmdline.cc " +
+ "src\\core\\lib\\support\\cpu_iphone.cc " +
+ "src\\core\\lib\\support\\cpu_linux.cc " +
+ "src\\core\\lib\\support\\cpu_posix.cc " +
+ "src\\core\\lib\\support\\cpu_windows.cc " +
+ "src\\core\\lib\\support\\env_linux.cc " +
+ "src\\core\\lib\\support\\env_posix.cc " +
+ "src\\core\\lib\\support\\env_windows.cc " +
+ "src\\core\\lib\\support\\histogram.cc " +
+ "src\\core\\lib\\support\\host_port.cc " +
+ "src\\core\\lib\\support\\log.cc " +
+ "src\\core\\lib\\support\\log_android.cc " +
+ "src\\core\\lib\\support\\log_linux.cc " +
+ "src\\core\\lib\\support\\log_posix.cc " +
+ "src\\core\\lib\\support\\log_windows.cc " +
+ "src\\core\\lib\\support\\mpscq.cc " +
+ "src\\core\\lib\\support\\murmur_hash.cc " +
+ "src\\core\\lib\\support\\stack_lockfree.cc " +
+ "src\\core\\lib\\support\\string.cc " +
+ "src\\core\\lib\\support\\string_posix.cc " +
+ "src\\core\\lib\\support\\string_util_windows.cc " +
+ "src\\core\\lib\\support\\string_windows.cc " +
+ "src\\core\\lib\\support\\subprocess_posix.cc " +
+ "src\\core\\lib\\support\\subprocess_windows.cc " +
+ "src\\core\\lib\\support\\sync.cc " +
+ "src\\core\\lib\\support\\sync_posix.cc " +
+ "src\\core\\lib\\support\\sync_windows.cc " +
+ "src\\core\\lib\\support\\thd.cc " +
+ "src\\core\\lib\\support\\thd_posix.cc " +
+ "src\\core\\lib\\support\\thd_windows.cc " +
+ "src\\core\\lib\\support\\time.cc " +
+ "src\\core\\lib\\support\\time_posix.cc " +
+ "src\\core\\lib\\support\\time_precise.cc " +
+ "src\\core\\lib\\support\\time_windows.cc " +
+ "src\\core\\lib\\support\\tls_pthread.cc " +
+ "src\\core\\lib\\support\\tmpfile_msys.cc " +
+ "src\\core\\lib\\support\\tmpfile_posix.cc " +
+ "src\\core\\lib\\support\\tmpfile_windows.cc " +
+ "src\\core\\lib\\support\\wrap_memcpy.cc " +
+ "src\\core\\lib\\surface\\init.cc " +
+ "src\\core\\lib\\backoff\\backoff.cc " +
+ "src\\core\\lib\\channel\\channel_args.cc " +
+ "src\\core\\lib\\channel\\channel_stack.cc " +
+ "src\\core\\lib\\channel\\channel_stack_builder.cc " +
+ "src\\core\\lib\\channel\\connected_channel.cc " +
+ "src\\core\\lib\\channel\\handshaker.cc " +
+ "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\\message_compress.cc " +
+ "src\\core\\lib\\compression\\stream_compression.cc " +
+ "src\\core\\lib\\compression\\stream_compression_gzip.cc " +
+ "src\\core\\lib\\compression\\stream_compression_identity.cc " +
+ "src\\core\\lib\\debug\\stats.cc " +
+ "src\\core\\lib\\debug\\stats_data.cc " +
+ "src\\core\\lib\\http\\format_request.cc " +
+ "src\\core\\lib\\http\\httpcli.cc " +
+ "src\\core\\lib\\http\\parser.cc " +
+ "src\\core\\lib\\iomgr\\call_combiner.cc " +
+ "src\\core\\lib\\iomgr\\closure.cc " +
+ "src\\core\\lib\\iomgr\\combiner.cc " +
+ "src\\core\\lib\\iomgr\\endpoint.cc " +
+ "src\\core\\lib\\iomgr\\endpoint_pair_posix.cc " +
+ "src\\core\\lib\\iomgr\\endpoint_pair_uv.cc " +
+ "src\\core\\lib\\iomgr\\endpoint_pair_windows.cc " +
+ "src\\core\\lib\\iomgr\\error.cc " +
+ "src\\core\\lib\\iomgr\\ev_epoll1_linux.cc " +
+ "src\\core\\lib\\iomgr\\ev_epollex_linux.cc " +
+ "src\\core\\lib\\iomgr\\ev_epollsig_linux.cc " +
+ "src\\core\\lib\\iomgr\\ev_poll_posix.cc " +
+ "src\\core\\lib\\iomgr\\ev_posix.cc " +
+ "src\\core\\lib\\iomgr\\ev_windows.cc " +
+ "src\\core\\lib\\iomgr\\exec_ctx.cc " +
+ "src\\core\\lib\\iomgr\\executor.cc " +
+ "src\\core\\lib\\iomgr\\gethostname_fallback.cc " +
+ "src\\core\\lib\\iomgr\\gethostname_host_name_max.cc " +
+ "src\\core\\lib\\iomgr\\gethostname_sysconf.cc " +
+ "src\\core\\lib\\iomgr\\iocp_windows.cc " +
+ "src\\core\\lib\\iomgr\\iomgr.cc " +
+ "src\\core\\lib\\iomgr\\iomgr_posix.cc " +
+ "src\\core\\lib\\iomgr\\iomgr_uv.cc " +
+ "src\\core\\lib\\iomgr\\iomgr_windows.cc " +
+ "src\\core\\lib\\iomgr\\is_epollexclusive_available.cc " +
+ "src\\core\\lib\\iomgr\\load_file.cc " +
+ "src\\core\\lib\\iomgr\\lockfree_event.cc " +
+ "src\\core\\lib\\iomgr\\network_status_tracker.cc " +
+ "src\\core\\lib\\iomgr\\polling_entity.cc " +
+ "src\\core\\lib\\iomgr\\pollset_set_uv.cc " +
+ "src\\core\\lib\\iomgr\\pollset_set_windows.cc " +
+ "src\\core\\lib\\iomgr\\pollset_uv.cc " +
+ "src\\core\\lib\\iomgr\\pollset_windows.cc " +
+ "src\\core\\lib\\iomgr\\resolve_address_posix.cc " +
+ "src\\core\\lib\\iomgr\\resolve_address_uv.cc " +
+ "src\\core\\lib\\iomgr\\resolve_address_windows.cc " +
+ "src\\core\\lib\\iomgr\\resource_quota.cc " +
+ "src\\core\\lib\\iomgr\\sockaddr_utils.cc " +
+ "src\\core\\lib\\iomgr\\socket_factory_posix.cc " +
+ "src\\core\\lib\\iomgr\\socket_mutator.cc " +
+ "src\\core\\lib\\iomgr\\socket_utils_common_posix.cc " +
+ "src\\core\\lib\\iomgr\\socket_utils_linux.cc " +
+ "src\\core\\lib\\iomgr\\socket_utils_posix.cc " +
+ "src\\core\\lib\\iomgr\\socket_utils_uv.cc " +
+ "src\\core\\lib\\iomgr\\socket_utils_windows.cc " +
+ "src\\core\\lib\\iomgr\\socket_windows.cc " +
+ "src\\core\\lib\\iomgr\\tcp_client_posix.cc " +
+ "src\\core\\lib\\iomgr\\tcp_client_uv.cc " +
+ "src\\core\\lib\\iomgr\\tcp_client_windows.cc " +
+ "src\\core\\lib\\iomgr\\tcp_posix.cc " +
+ "src\\core\\lib\\iomgr\\tcp_server_posix.cc " +
+ "src\\core\\lib\\iomgr\\tcp_server_utils_posix_common.cc " +
+ "src\\core\\lib\\iomgr\\tcp_server_utils_posix_ifaddrs.cc " +
+ "src\\core\\lib\\iomgr\\tcp_server_utils_posix_noifaddrs.cc " +
+ "src\\core\\lib\\iomgr\\tcp_server_uv.cc " +
+ "src\\core\\lib\\iomgr\\tcp_server_windows.cc " +
+ "src\\core\\lib\\iomgr\\tcp_uv.cc " +
+ "src\\core\\lib\\iomgr\\tcp_windows.cc " +
+ "src\\core\\lib\\iomgr\\time_averaged_stats.cc " +
+ "src\\core\\lib\\iomgr\\timer_generic.cc " +
+ "src\\core\\lib\\iomgr\\timer_heap.cc " +
+ "src\\core\\lib\\iomgr\\timer_manager.cc " +
+ "src\\core\\lib\\iomgr\\timer_uv.cc " +
+ "src\\core\\lib\\iomgr\\udp_server.cc " +
+ "src\\core\\lib\\iomgr\\unix_sockets_posix.cc " +
+ "src\\core\\lib\\iomgr\\unix_sockets_posix_noop.cc " +
+ "src\\core\\lib\\iomgr\\wakeup_fd_cv.cc " +
+ "src\\core\\lib\\iomgr\\wakeup_fd_eventfd.cc " +
+ "src\\core\\lib\\iomgr\\wakeup_fd_nospecial.cc " +
+ "src\\core\\lib\\iomgr\\wakeup_fd_pipe.cc " +
+ "src\\core\\lib\\iomgr\\wakeup_fd_posix.cc " +
+ "src\\core\\lib\\json\\json.cc " +
+ "src\\core\\lib\\json\\json_reader.cc " +
+ "src\\core\\lib\\json\\json_string.cc " +
+ "src\\core\\lib\\json\\json_writer.cc " +
+ "src\\core\\lib\\slice\\b64.cc " +
+ "src\\core\\lib\\slice\\percent_encoding.cc " +
+ "src\\core\\lib\\slice\\slice.cc " +
+ "src\\core\\lib\\slice\\slice_buffer.cc " +
+ "src\\core\\lib\\slice\\slice_hash_table.cc " +
+ "src\\core\\lib\\slice\\slice_intern.cc " +
+ "src\\core\\lib\\slice\\slice_string_helpers.cc " +
+ "src\\core\\lib\\surface\\alarm.cc " +
+ "src\\core\\lib\\surface\\api_trace.cc " +
+ "src\\core\\lib\\surface\\byte_buffer.cc " +
+ "src\\core\\lib\\surface\\byte_buffer_reader.cc " +
+ "src\\core\\lib\\surface\\call.cc " +
+ "src\\core\\lib\\surface\\call_details.cc " +
+ "src\\core\\lib\\surface\\call_log_batch.cc " +
+ "src\\core\\lib\\surface\\channel.cc " +
+ "src\\core\\lib\\surface\\channel_init.cc " +
+ "src\\core\\lib\\surface\\channel_ping.cc " +
+ "src\\core\\lib\\surface\\channel_stack_type.cc " +
+ "src\\core\\lib\\surface\\completion_queue.cc " +
+ "src\\core\\lib\\surface\\completion_queue_factory.cc " +
+ "src\\core\\lib\\surface\\event_string.cc " +
"src\\core\\lib\\surface\\lame_client.cc " +
- "src\\core\\lib\\surface\\metadata_array.c " +
- "src\\core\\lib\\surface\\server.c " +
- "src\\core\\lib\\surface\\validate_metadata.c " +
- "src\\core\\lib\\surface\\version.c " +
- "src\\core\\lib\\transport\\bdp_estimator.c " +
- "src\\core\\lib\\transport\\byte_stream.c " +
- "src\\core\\lib\\transport\\connectivity_state.c " +
- "src\\core\\lib\\transport\\error_utils.c " +
- "src\\core\\lib\\transport\\metadata.c " +
- "src\\core\\lib\\transport\\metadata_batch.c " +
- "src\\core\\lib\\transport\\pid_controller.c " +
- "src\\core\\lib\\transport\\service_config.c " +
- "src\\core\\lib\\transport\\static_metadata.c " +
- "src\\core\\lib\\transport\\status_conversion.c " +
- "src\\core\\lib\\transport\\timeout_encoding.c " +
- "src\\core\\lib\\transport\\transport.c " +
- "src\\core\\lib\\transport\\transport_op_string.c " +
- "src\\core\\lib\\debug\\trace.c " +
- "src\\core\\ext\\transport\\chttp2\\server\\secure\\server_secure_chttp2.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\bin_decoder.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\bin_encoder.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\chttp2_plugin.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\chttp2_transport.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\flow_control.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\frame_data.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\frame_goaway.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\frame_ping.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\frame_rst_stream.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\frame_settings.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\frame_window_update.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\hpack_encoder.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\hpack_parser.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\hpack_table.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\http2_settings.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\huffsyms.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\incoming_metadata.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\parsing.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\stream_lists.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\stream_map.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\varint.c " +
- "src\\core\\ext\\transport\\chttp2\\transport\\writing.c " +
- "src\\core\\ext\\transport\\chttp2\\alpn\\alpn.c " +
- "src\\core\\ext\\filters\\http\\client\\http_client_filter.c " +
- "src\\core\\ext\\filters\\http\\http_filters_plugin.c " +
- "src\\core\\ext\\filters\\http\\message_compress\\message_compress_filter.c " +
- "src\\core\\ext\\filters\\http\\server\\http_server_filter.c " +
- "src\\core\\lib\\http\\httpcli_security_connector.c " +
- "src\\core\\lib\\security\\context\\security_context.c " +
- "src\\core\\lib\\security\\credentials\\composite\\composite_credentials.c " +
- "src\\core\\lib\\security\\credentials\\credentials.c " +
- "src\\core\\lib\\security\\credentials\\credentials_metadata.c " +
- "src\\core\\lib\\security\\credentials\\fake\\fake_credentials.c " +
- "src\\core\\lib\\security\\credentials\\google_default\\credentials_generic.c " +
- "src\\core\\lib\\security\\credentials\\google_default\\google_default_credentials.c " +
- "src\\core\\lib\\security\\credentials\\iam\\iam_credentials.c " +
- "src\\core\\lib\\security\\credentials\\jwt\\json_token.c " +
- "src\\core\\lib\\security\\credentials\\jwt\\jwt_credentials.c " +
- "src\\core\\lib\\security\\credentials\\jwt\\jwt_verifier.c " +
- "src\\core\\lib\\security\\credentials\\oauth2\\oauth2_credentials.c " +
- "src\\core\\lib\\security\\credentials\\plugin\\plugin_credentials.c " +
- "src\\core\\lib\\security\\credentials\\ssl\\ssl_credentials.c " +
- "src\\core\\lib\\security\\transport\\client_auth_filter.c " +
- "src\\core\\lib\\security\\transport\\lb_targets_info.c " +
- "src\\core\\lib\\security\\transport\\secure_endpoint.c " +
- "src\\core\\lib\\security\\transport\\security_connector.c " +
- "src\\core\\lib\\security\\transport\\security_handshaker.c " +
- "src\\core\\lib\\security\\transport\\server_auth_filter.c " +
- "src\\core\\lib\\security\\transport\\tsi_error.c " +
- "src\\core\\lib\\security\\util\\json_util.c " +
- "src\\core\\lib\\surface\\init_secure.c " +
- "src\\core\\tsi\\fake_transport_security.c " +
- "src\\core\\tsi\\gts_transport_security.c " +
- "src\\core\\tsi\\ssl_transport_security.c " +
- "src\\core\\tsi\\transport_security_grpc.c " +
- "src\\core\\tsi\\transport_security.c " +
- "src\\core\\tsi\\transport_security_adapter.c " +
- "src\\core\\ext\\transport\\chttp2\\server\\chttp2_server.c " +
- "src\\core\\ext\\transport\\chttp2\\client\\secure\\secure_channel_create.c " +
- "src\\core\\ext\\filters\\client_channel\\channel_connectivity.c " +
- "src\\core\\ext\\filters\\client_channel\\client_channel.c " +
- "src\\core\\ext\\filters\\client_channel\\client_channel_factory.c " +
- "src\\core\\ext\\filters\\client_channel\\client_channel_plugin.c " +
- "src\\core\\ext\\filters\\client_channel\\connector.c " +
- "src\\core\\ext\\filters\\client_channel\\http_connect_handshaker.c " +
- "src\\core\\ext\\filters\\client_channel\\http_proxy.c " +
- "src\\core\\ext\\filters\\client_channel\\lb_policy.c " +
- "src\\core\\ext\\filters\\client_channel\\lb_policy_factory.c " +
- "src\\core\\ext\\filters\\client_channel\\lb_policy_registry.c " +
- "src\\core\\ext\\filters\\client_channel\\parse_address.c " +
- "src\\core\\ext\\filters\\client_channel\\proxy_mapper.c " +
- "src\\core\\ext\\filters\\client_channel\\proxy_mapper_registry.c " +
- "src\\core\\ext\\filters\\client_channel\\resolver.c " +
- "src\\core\\ext\\filters\\client_channel\\resolver_factory.c " +
- "src\\core\\ext\\filters\\client_channel\\resolver_registry.c " +
- "src\\core\\ext\\filters\\client_channel\\retry_throttle.c " +
- "src\\core\\ext\\filters\\client_channel\\subchannel.c " +
- "src\\core\\ext\\filters\\client_channel\\subchannel_index.c " +
- "src\\core\\ext\\filters\\client_channel\\uri_parser.c " +
- "src\\core\\ext\\filters\\deadline\\deadline_filter.c " +
- "src\\core\\ext\\transport\\chttp2\\client\\chttp2_connector.c " +
- "src\\core\\ext\\transport\\chttp2\\server\\insecure\\server_chttp2.c " +
- "src\\core\\ext\\transport\\chttp2\\server\\insecure\\server_chttp2_posix.c " +
- "src\\core\\ext\\transport\\chttp2\\client\\insecure\\channel_create.c " +
- "src\\core\\ext\\transport\\chttp2\\client\\insecure\\channel_create_posix.c " +
- "src\\core\\ext\\transport\\inproc\\inproc_plugin.c " +
- "src\\core\\ext\\transport\\inproc\\inproc_transport.c " +
- "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\client_load_reporting_filter.c " +
- "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\grpclb.c " +
- "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\grpclb_channel_secure.c " +
- "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\grpclb_client_stats.c " +
- "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\load_balancer_api.c " +
+ "src\\core\\lib\\surface\\metadata_array.cc " +
+ "src\\core\\lib\\surface\\server.cc " +
+ "src\\core\\lib\\surface\\validate_metadata.cc " +
+ "src\\core\\lib\\surface\\version.cc " +
+ "src\\core\\lib\\transport\\bdp_estimator.cc " +
+ "src\\core\\lib\\transport\\byte_stream.cc " +
+ "src\\core\\lib\\transport\\connectivity_state.cc " +
+ "src\\core\\lib\\transport\\error_utils.cc " +
+ "src\\core\\lib\\transport\\metadata.cc " +
+ "src\\core\\lib\\transport\\metadata_batch.cc " +
+ "src\\core\\lib\\transport\\pid_controller.cc " +
+ "src\\core\\lib\\transport\\service_config.cc " +
+ "src\\core\\lib\\transport\\static_metadata.cc " +
+ "src\\core\\lib\\transport\\status_conversion.cc " +
+ "src\\core\\lib\\transport\\timeout_encoding.cc " +
+ "src\\core\\lib\\transport\\transport.cc " +
+ "src\\core\\lib\\transport\\transport_op_string.cc " +
+ "src\\core\\lib\\debug\\trace.cc " +
+ "src\\core\\ext\\transport\\chttp2\\server\\secure\\server_secure_chttp2.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\bin_decoder.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\bin_encoder.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\chttp2_plugin.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\chttp2_transport.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\flow_control.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\frame_data.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\frame_goaway.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\frame_ping.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\frame_rst_stream.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\frame_settings.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\frame_window_update.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\hpack_encoder.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\hpack_parser.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\hpack_table.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\http2_settings.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\huffsyms.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\incoming_metadata.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\parsing.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\stream_lists.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\stream_map.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\varint.cc " +
+ "src\\core\\ext\\transport\\chttp2\\transport\\writing.cc " +
+ "src\\core\\ext\\transport\\chttp2\\alpn\\alpn.cc " +
+ "src\\core\\ext\\filters\\http\\client\\http_client_filter.cc " +
+ "src\\core\\ext\\filters\\http\\http_filters_plugin.cc " +
+ "src\\core\\ext\\filters\\http\\message_compress\\message_compress_filter.cc " +
+ "src\\core\\ext\\filters\\http\\server\\http_server_filter.cc " +
+ "src\\core\\lib\\http\\httpcli_security_connector.cc " +
+ "src\\core\\lib\\security\\context\\security_context.cc " +
+ "src\\core\\lib\\security\\credentials\\composite\\composite_credentials.cc " +
+ "src\\core\\lib\\security\\credentials\\credentials.cc " +
+ "src\\core\\lib\\security\\credentials\\credentials_metadata.cc " +
+ "src\\core\\lib\\security\\credentials\\fake\\fake_credentials.cc " +
+ "src\\core\\lib\\security\\credentials\\google_default\\credentials_generic.cc " +
+ "src\\core\\lib\\security\\credentials\\google_default\\google_default_credentials.cc " +
+ "src\\core\\lib\\security\\credentials\\iam\\iam_credentials.cc " +
+ "src\\core\\lib\\security\\credentials\\jwt\\json_token.cc " +
+ "src\\core\\lib\\security\\credentials\\jwt\\jwt_credentials.cc " +
+ "src\\core\\lib\\security\\credentials\\jwt\\jwt_verifier.cc " +
+ "src\\core\\lib\\security\\credentials\\oauth2\\oauth2_credentials.cc " +
+ "src\\core\\lib\\security\\credentials\\plugin\\plugin_credentials.cc " +
+ "src\\core\\lib\\security\\credentials\\ssl\\ssl_credentials.cc " +
+ "src\\core\\lib\\security\\transport\\client_auth_filter.cc " +
+ "src\\core\\lib\\security\\transport\\lb_targets_info.cc " +
+ "src\\core\\lib\\security\\transport\\secure_endpoint.cc " +
+ "src\\core\\lib\\security\\transport\\security_connector.cc " +
+ "src\\core\\lib\\security\\transport\\security_handshaker.cc " +
+ "src\\core\\lib\\security\\transport\\server_auth_filter.cc " +
+ "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\\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 " +
+ "src\\core\\tsi\\transport_security_adapter.cc " +
+ "src\\core\\ext\\transport\\chttp2\\server\\chttp2_server.cc " +
+ "src\\core\\ext\\transport\\chttp2\\client\\secure\\secure_channel_create.cc " +
+ "src\\core\\ext\\filters\\client_channel\\channel_connectivity.cc " +
+ "src\\core\\ext\\filters\\client_channel\\client_channel.cc " +
+ "src\\core\\ext\\filters\\client_channel\\client_channel_factory.cc " +
+ "src\\core\\ext\\filters\\client_channel\\client_channel_plugin.cc " +
+ "src\\core\\ext\\filters\\client_channel\\connector.cc " +
+ "src\\core\\ext\\filters\\client_channel\\http_connect_handshaker.cc " +
+ "src\\core\\ext\\filters\\client_channel\\http_proxy.cc " +
+ "src\\core\\ext\\filters\\client_channel\\lb_policy.cc " +
+ "src\\core\\ext\\filters\\client_channel\\lb_policy_factory.cc " +
+ "src\\core\\ext\\filters\\client_channel\\lb_policy_registry.cc " +
+ "src\\core\\ext\\filters\\client_channel\\parse_address.cc " +
+ "src\\core\\ext\\filters\\client_channel\\proxy_mapper.cc " +
+ "src\\core\\ext\\filters\\client_channel\\proxy_mapper_registry.cc " +
+ "src\\core\\ext\\filters\\client_channel\\resolver.cc " +
+ "src\\core\\ext\\filters\\client_channel\\resolver_factory.cc " +
+ "src\\core\\ext\\filters\\client_channel\\resolver_registry.cc " +
+ "src\\core\\ext\\filters\\client_channel\\retry_throttle.cc " +
+ "src\\core\\ext\\filters\\client_channel\\subchannel.cc " +
+ "src\\core\\ext\\filters\\client_channel\\subchannel_index.cc " +
+ "src\\core\\ext\\filters\\client_channel\\uri_parser.cc " +
+ "src\\core\\ext\\filters\\deadline\\deadline_filter.cc " +
+ "src\\core\\ext\\transport\\chttp2\\client\\chttp2_connector.cc " +
+ "src\\core\\ext\\transport\\chttp2\\server\\insecure\\server_chttp2.cc " +
+ "src\\core\\ext\\transport\\chttp2\\server\\insecure\\server_chttp2_posix.cc " +
+ "src\\core\\ext\\transport\\chttp2\\client\\insecure\\channel_create.cc " +
+ "src\\core\\ext\\transport\\chttp2\\client\\insecure\\channel_create_posix.cc " +
+ "src\\core\\ext\\transport\\inproc\\inproc_plugin.cc " +
+ "src\\core\\ext\\transport\\inproc\\inproc_transport.cc " +
+ "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\client_load_reporting_filter.cc " +
+ "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\grpclb.cc " +
+ "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\grpclb_channel_secure.cc " +
+ "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\grpclb_client_stats.cc " +
+ "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\load_balancer_api.cc " +
"src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto\\grpc\\lb\\v1\\load_balancer.pb.c " +
"third_party\\nanopb\\pb_common.c " +
"third_party\\nanopb\\pb_decode.c " +
"third_party\\nanopb\\pb_encode.c " +
- "src\\core\\ext\\filters\\client_channel\\resolver\\fake\\fake_resolver.c " +
- "src\\core\\ext\\filters\\client_channel\\lb_policy\\pick_first\\pick_first.c " +
- "src\\core\\ext\\filters\\client_channel\\lb_policy\\round_robin\\round_robin.c " +
- "src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\dns_resolver_ares.c " +
- "src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\grpc_ares_ev_driver_posix.c " +
- "src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\grpc_ares_wrapper.c " +
- "src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\grpc_ares_wrapper_fallback.c " +
- "src\\core\\ext\\filters\\client_channel\\resolver\\dns\\native\\dns_resolver.c " +
- "src\\core\\ext\\filters\\client_channel\\resolver\\sockaddr\\sockaddr_resolver.c " +
- "src\\core\\ext\\filters\\load_reporting\\server_load_reporting_filter.c " +
- "src\\core\\ext\\filters\\load_reporting\\server_load_reporting_plugin.c " +
- "src\\core\\ext\\census\\base_resources.c " +
- "src\\core\\ext\\census\\context.c " +
+ "src\\core\\ext\\filters\\client_channel\\resolver\\fake\\fake_resolver.cc " +
+ "src\\core\\ext\\filters\\client_channel\\lb_policy\\pick_first\\pick_first.cc " +
+ "src\\core\\ext\\filters\\client_channel\\lb_policy\\round_robin\\round_robin.cc " +
+ "src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\dns_resolver_ares.cc " +
+ "src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\grpc_ares_ev_driver_posix.cc " +
+ "src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\grpc_ares_wrapper.cc " +
+ "src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\grpc_ares_wrapper_fallback.cc " +
+ "src\\core\\ext\\filters\\client_channel\\resolver\\dns\\native\\dns_resolver.cc " +
+ "src\\core\\ext\\filters\\client_channel\\resolver\\sockaddr\\sockaddr_resolver.cc " +
+ "src\\core\\ext\\filters\\load_reporting\\server_load_reporting_filter.cc " +
+ "src\\core\\ext\\filters\\load_reporting\\server_load_reporting_plugin.cc " +
+ "src\\core\\ext\\census\\base_resources.cc " +
+ "src\\core\\ext\\census\\context.cc " +
"src\\core\\ext\\census\\gen\\census.pb.c " +
"src\\core\\ext\\census\\gen\\trace_context.pb.c " +
- "src\\core\\ext\\census\\grpc_context.c " +
- "src\\core\\ext\\census\\grpc_filter.c " +
- "src\\core\\ext\\census\\grpc_plugin.c " +
- "src\\core\\ext\\census\\initialize.c " +
- "src\\core\\ext\\census\\intrusive_hash_map.c " +
- "src\\core\\ext\\census\\mlog.c " +
- "src\\core\\ext\\census\\operation.c " +
- "src\\core\\ext\\census\\placeholders.c " +
- "src\\core\\ext\\census\\resource.c " +
- "src\\core\\ext\\census\\trace_context.c " +
- "src\\core\\ext\\census\\tracing.c " +
- "src\\core\\ext\\filters\\max_age\\max_age_filter.c " +
- "src\\core\\ext\\filters\\message_size\\message_size_filter.c " +
- "src\\core\\ext\\filters\\workarounds\\workaround_cronet_compression_filter.c " +
- "src\\core\\ext\\filters\\workarounds\\workaround_utils.c " +
- "src\\core\\plugin_registry\\grpc_plugin_registry.c " +
+ "src\\core\\ext\\census\\grpc_context.cc " +
+ "src\\core\\ext\\census\\grpc_filter.cc " +
+ "src\\core\\ext\\census\\grpc_plugin.cc " +
+ "src\\core\\ext\\census\\initialize.cc " +
+ "src\\core\\ext\\census\\intrusive_hash_map.cc " +
+ "src\\core\\ext\\census\\mlog.cc " +
+ "src\\core\\ext\\census\\operation.cc " +
+ "src\\core\\ext\\census\\placeholders.cc " +
+ "src\\core\\ext\\census\\resource.cc " +
+ "src\\core\\ext\\census\\trace_context.cc " +
+ "src\\core\\ext\\census\\tracing.cc " +
+ "src\\core\\ext\\filters\\max_age\\max_age_filter.cc " +
+ "src\\core\\ext\\filters\\message_size\\message_size_filter.cc " +
+ "src\\core\\ext\\filters\\workarounds\\workaround_cronet_compression_filter.cc " +
+ "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 " +
@@ -700,6 +700,7 @@ if (PHP_GRPC != "no") {
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\transport");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\inproc");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib");
+ FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\backoff");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\channel");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\compression");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\debug");
diff --git a/doc/environment_variables.md b/doc/environment_variables.md
index f90f1d5b10..f775de1664 100644
--- a/doc/environment_variables.md
+++ b/doc/environment_variables.md
@@ -58,6 +58,7 @@ some configuration as environment variables that can be set.
completion queue
- round_robin - traces the round_robin load balancing policy
- pick_first - traces the pick first load balancing policy
+ - plugin_credentials - traces plugin credentials
- resource_quota - trace resource quota objects internals
- glb - traces the grpclb load balancer
- queue_pluck
diff --git a/doc/g_stands_for.md b/doc/g_stands_for.md
index 9a161d67a3..4e2ca33276 100644
--- a/doc/g_stands_for.md
+++ b/doc/g_stands_for.md
@@ -11,3 +11,4 @@ future), and the corresponding version numbers that used them:
- 1.4 'g' stands for 'gregarious'
- 1.6 'g' stands for 'garcia'
- 1.7 'g' stands for 'gambit'
+- 1.8 'g' stands for 'generous'
diff --git a/examples/node/dynamic_codegen/greeter_server.js b/examples/node/dynamic_codegen/greeter_server.js
index f9cb1b13d6..180f96c28b 100644
--- a/examples/node/dynamic_codegen/greeter_server.js
+++ b/examples/node/dynamic_codegen/greeter_server.js
@@ -34,7 +34,7 @@ function sayHello(call, callback) {
*/
function main() {
var server = new grpc.Server();
- server.addProtoService(hello_proto.Greeter.service, {sayHello: sayHello});
+ server.addService(hello_proto.Greeter.service, {sayHello: sayHello});
server.bind('0.0.0.0:50051', grpc.ServerCredentials.createInsecure());
server.start();
}
diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec
index 5b9c3a07df..0165d10f5b 100644
--- a/gRPC-Core.podspec
+++ b/gRPC-Core.podspec
@@ -22,7 +22,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-Core'
- version = '1.7.0-dev'
+ version = '1.8.0-dev'
s.version = version
s.summary = 'Core cross-platform gRPC library, written in C'
s.homepage = 'https://grpc.io'
@@ -84,6 +84,7 @@ Pod::Spec.new do |s|
# build.
'USE_HEADERMAP' => 'NO',
'ALWAYS_SEARCH_USER_PATHS' => 'NO',
+ 'GCC_PREPROCESSOR_DEFINITIONS' => '"$(inherited)" "COCOAPODS=1" "PB_NO_PACKED_STRUCTS=1"',
}
s.default_subspecs = 'Interface', 'Implementation'
@@ -105,8 +106,6 @@ Pod::Spec.new do |s|
ss.source_files = 'include/grpc/support/alloc.h',
'include/grpc/support/atm.h',
'include/grpc/support/atm_gcc_atomic.h',
- 'include/grpc/support/atm_gcc_sync.h',
- 'include/grpc/support/atm_windows.h',
'include/grpc/support/avl.h',
'include/grpc/support/cmdline.h',
'include/grpc/support/cpu.h',
@@ -121,18 +120,13 @@ Pod::Spec.new do |s|
'include/grpc/support/sync_custom.h',
'include/grpc/support/sync_generic.h',
'include/grpc/support/sync_posix.h',
- 'include/grpc/support/sync_windows.h',
'include/grpc/support/thd.h',
'include/grpc/support/time.h',
'include/grpc/support/tls.h',
- 'include/grpc/support/tls_gcc.h',
- 'include/grpc/support/tls_msvc.h',
'include/grpc/support/tls_pthread.h',
'include/grpc/support/useful.h',
'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h',
- 'include/grpc/impl/codegen/atm_gcc_sync.h',
- 'include/grpc/impl/codegen/atm_windows.h',
'include/grpc/impl/codegen/gpr_slice.h',
'include/grpc/impl/codegen/gpr_types.h',
'include/grpc/impl/codegen/port_platform.h',
@@ -140,7 +134,6 @@ Pod::Spec.new do |s|
'include/grpc/impl/codegen/sync_custom.h',
'include/grpc/impl/codegen/sync_generic.h',
'include/grpc/impl/codegen/sync_posix.h',
- 'include/grpc/impl/codegen/sync_windows.h',
'include/grpc/impl/codegen/byte_buffer.h',
'include/grpc/impl/codegen/byte_buffer_reader.h',
'include/grpc/impl/codegen/compression_types.h',
@@ -152,8 +145,6 @@ Pod::Spec.new do |s|
'include/grpc/impl/codegen/status.h',
'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h',
- 'include/grpc/impl/codegen/atm_gcc_sync.h',
- 'include/grpc/impl/codegen/atm_windows.h',
'include/grpc/impl/codegen/gpr_slice.h',
'include/grpc/impl/codegen/gpr_types.h',
'include/grpc/impl/codegen/port_platform.h',
@@ -161,7 +152,6 @@ Pod::Spec.new do |s|
'include/grpc/impl/codegen/sync_custom.h',
'include/grpc/impl/codegen/sync_generic.h',
'include/grpc/impl/codegen/sync_posix.h',
- 'include/grpc/impl/codegen/sync_windows.h',
'include/grpc/grpc_security.h',
'include/grpc/byte_buffer.h',
'include/grpc/byte_buffer_reader.h',
@@ -189,8 +179,6 @@ Pod::Spec.new do |s|
'src/core/lib/support/atomic.h',
'src/core/lib/support/atomic_with_atm.h',
'src/core/lib/support/atomic_with_std.h',
- 'src/core/lib/support/backoff.h',
- 'src/core/lib/support/block_annotate.h',
'src/core/lib/support/env.h',
'src/core/lib/support/memory.h',
'src/core/lib/support/mpscq.h',
@@ -201,52 +189,51 @@ Pod::Spec.new do |s|
'src/core/lib/support/string_windows.h',
'src/core/lib/support/time_precise.h',
'src/core/lib/support/tmpfile.h',
- 'src/core/lib/profiling/basic_timers.c',
- 'src/core/lib/profiling/stap_timers.c',
- 'src/core/lib/support/alloc.c',
- 'src/core/lib/support/arena.c',
- 'src/core/lib/support/atm.c',
- 'src/core/lib/support/avl.c',
- 'src/core/lib/support/backoff.c',
- 'src/core/lib/support/cmdline.c',
- 'src/core/lib/support/cpu_iphone.c',
- 'src/core/lib/support/cpu_linux.c',
- 'src/core/lib/support/cpu_posix.c',
- 'src/core/lib/support/cpu_windows.c',
- 'src/core/lib/support/env_linux.c',
- 'src/core/lib/support/env_posix.c',
- 'src/core/lib/support/env_windows.c',
- 'src/core/lib/support/histogram.c',
- 'src/core/lib/support/host_port.c',
- 'src/core/lib/support/log.c',
- 'src/core/lib/support/log_android.c',
- 'src/core/lib/support/log_linux.c',
- 'src/core/lib/support/log_posix.c',
- 'src/core/lib/support/log_windows.c',
- 'src/core/lib/support/mpscq.c',
- 'src/core/lib/support/murmur_hash.c',
- 'src/core/lib/support/stack_lockfree.c',
- 'src/core/lib/support/string.c',
- 'src/core/lib/support/string_posix.c',
- 'src/core/lib/support/string_util_windows.c',
- 'src/core/lib/support/string_windows.c',
- 'src/core/lib/support/subprocess_posix.c',
- 'src/core/lib/support/subprocess_windows.c',
- 'src/core/lib/support/sync.c',
- 'src/core/lib/support/sync_posix.c',
- 'src/core/lib/support/sync_windows.c',
- 'src/core/lib/support/thd.c',
- 'src/core/lib/support/thd_posix.c',
- 'src/core/lib/support/thd_windows.c',
- 'src/core/lib/support/time.c',
- 'src/core/lib/support/time_posix.c',
- 'src/core/lib/support/time_precise.c',
- 'src/core/lib/support/time_windows.c',
- 'src/core/lib/support/tls_pthread.c',
- 'src/core/lib/support/tmpfile_msys.c',
- 'src/core/lib/support/tmpfile_posix.c',
- 'src/core/lib/support/tmpfile_windows.c',
- 'src/core/lib/support/wrap_memcpy.c',
+ 'src/core/lib/profiling/basic_timers.cc',
+ 'src/core/lib/profiling/stap_timers.cc',
+ 'src/core/lib/support/alloc.cc',
+ 'src/core/lib/support/arena.cc',
+ 'src/core/lib/support/atm.cc',
+ 'src/core/lib/support/avl.cc',
+ 'src/core/lib/support/cmdline.cc',
+ 'src/core/lib/support/cpu_iphone.cc',
+ 'src/core/lib/support/cpu_linux.cc',
+ 'src/core/lib/support/cpu_posix.cc',
+ 'src/core/lib/support/cpu_windows.cc',
+ 'src/core/lib/support/env_linux.cc',
+ 'src/core/lib/support/env_posix.cc',
+ 'src/core/lib/support/env_windows.cc',
+ 'src/core/lib/support/histogram.cc',
+ 'src/core/lib/support/host_port.cc',
+ 'src/core/lib/support/log.cc',
+ 'src/core/lib/support/log_android.cc',
+ 'src/core/lib/support/log_linux.cc',
+ 'src/core/lib/support/log_posix.cc',
+ 'src/core/lib/support/log_windows.cc',
+ 'src/core/lib/support/mpscq.cc',
+ 'src/core/lib/support/murmur_hash.cc',
+ 'src/core/lib/support/stack_lockfree.cc',
+ 'src/core/lib/support/string.cc',
+ 'src/core/lib/support/string_posix.cc',
+ 'src/core/lib/support/string_util_windows.cc',
+ 'src/core/lib/support/string_windows.cc',
+ 'src/core/lib/support/subprocess_posix.cc',
+ 'src/core/lib/support/subprocess_windows.cc',
+ 'src/core/lib/support/sync.cc',
+ 'src/core/lib/support/sync_posix.cc',
+ 'src/core/lib/support/sync_windows.cc',
+ 'src/core/lib/support/thd.cc',
+ 'src/core/lib/support/thd_posix.cc',
+ 'src/core/lib/support/thd_windows.cc',
+ 'src/core/lib/support/time.cc',
+ 'src/core/lib/support/time_posix.cc',
+ 'src/core/lib/support/time_precise.cc',
+ 'src/core/lib/support/time_windows.cc',
+ 'src/core/lib/support/tls_pthread.cc',
+ 'src/core/lib/support/tmpfile_msys.cc',
+ 'src/core/lib/support/tmpfile_posix.cc',
+ 'src/core/lib/support/tmpfile_windows.cc',
+ 'src/core/lib/support/wrap_memcpy.cc',
'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',
@@ -319,6 +306,7 @@ Pod::Spec.new do |s|
'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',
@@ -338,6 +326,7 @@ Pod::Spec.new do |s|
'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',
@@ -471,273 +460,272 @@ Pod::Spec.new do |s|
'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',
- 'src/core/lib/surface/init.c',
- 'src/core/lib/channel/channel_args.c',
- 'src/core/lib/channel/channel_stack.c',
- 'src/core/lib/channel/channel_stack_builder.c',
- 'src/core/lib/channel/connected_channel.c',
- 'src/core/lib/channel/handshaker.c',
- 'src/core/lib/channel/handshaker_factory.c',
- 'src/core/lib/channel/handshaker_registry.c',
- 'src/core/lib/compression/compression.c',
- 'src/core/lib/compression/compression_internal.c',
- 'src/core/lib/compression/message_compress.c',
- 'src/core/lib/compression/stream_compression.c',
- 'src/core/lib/compression/stream_compression_gzip.c',
- 'src/core/lib/compression/stream_compression_identity.c',
- 'src/core/lib/debug/stats.c',
- 'src/core/lib/debug/stats_data.c',
- 'src/core/lib/http/format_request.c',
- 'src/core/lib/http/httpcli.c',
- 'src/core/lib/http/parser.c',
- 'src/core/lib/iomgr/call_combiner.c',
- 'src/core/lib/iomgr/closure.c',
- 'src/core/lib/iomgr/combiner.c',
- 'src/core/lib/iomgr/endpoint.c',
- 'src/core/lib/iomgr/endpoint_pair_posix.c',
- 'src/core/lib/iomgr/endpoint_pair_uv.c',
- 'src/core/lib/iomgr/endpoint_pair_windows.c',
- 'src/core/lib/iomgr/error.c',
- 'src/core/lib/iomgr/ev_epoll1_linux.c',
- 'src/core/lib/iomgr/ev_epollex_linux.c',
- 'src/core/lib/iomgr/ev_epollsig_linux.c',
- 'src/core/lib/iomgr/ev_poll_posix.c',
- 'src/core/lib/iomgr/ev_posix.c',
- 'src/core/lib/iomgr/ev_windows.c',
- 'src/core/lib/iomgr/exec_ctx.c',
- 'src/core/lib/iomgr/executor.c',
- 'src/core/lib/iomgr/gethostname_fallback.c',
- 'src/core/lib/iomgr/gethostname_host_name_max.c',
- 'src/core/lib/iomgr/gethostname_sysconf.c',
- 'src/core/lib/iomgr/iocp_windows.c',
- 'src/core/lib/iomgr/iomgr.c',
- 'src/core/lib/iomgr/iomgr_posix.c',
- 'src/core/lib/iomgr/iomgr_uv.c',
- 'src/core/lib/iomgr/iomgr_windows.c',
- 'src/core/lib/iomgr/is_epollexclusive_available.c',
- 'src/core/lib/iomgr/load_file.c',
- 'src/core/lib/iomgr/lockfree_event.c',
- 'src/core/lib/iomgr/network_status_tracker.c',
- 'src/core/lib/iomgr/polling_entity.c',
- 'src/core/lib/iomgr/pollset_set_uv.c',
- 'src/core/lib/iomgr/pollset_set_windows.c',
- 'src/core/lib/iomgr/pollset_uv.c',
- 'src/core/lib/iomgr/pollset_windows.c',
- 'src/core/lib/iomgr/resolve_address_posix.c',
- 'src/core/lib/iomgr/resolve_address_uv.c',
- 'src/core/lib/iomgr/resolve_address_windows.c',
- 'src/core/lib/iomgr/resource_quota.c',
- 'src/core/lib/iomgr/sockaddr_utils.c',
- 'src/core/lib/iomgr/socket_factory_posix.c',
- 'src/core/lib/iomgr/socket_mutator.c',
- 'src/core/lib/iomgr/socket_utils_common_posix.c',
- 'src/core/lib/iomgr/socket_utils_linux.c',
- 'src/core/lib/iomgr/socket_utils_posix.c',
- 'src/core/lib/iomgr/socket_utils_uv.c',
- 'src/core/lib/iomgr/socket_utils_windows.c',
- 'src/core/lib/iomgr/socket_windows.c',
- 'src/core/lib/iomgr/tcp_client_posix.c',
- 'src/core/lib/iomgr/tcp_client_uv.c',
- 'src/core/lib/iomgr/tcp_client_windows.c',
- 'src/core/lib/iomgr/tcp_posix.c',
- 'src/core/lib/iomgr/tcp_server_posix.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_common.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c',
- 'src/core/lib/iomgr/tcp_server_uv.c',
- 'src/core/lib/iomgr/tcp_server_windows.c',
- 'src/core/lib/iomgr/tcp_uv.c',
- 'src/core/lib/iomgr/tcp_windows.c',
- 'src/core/lib/iomgr/time_averaged_stats.c',
- 'src/core/lib/iomgr/timer_generic.c',
- 'src/core/lib/iomgr/timer_heap.c',
- 'src/core/lib/iomgr/timer_manager.c',
- 'src/core/lib/iomgr/timer_uv.c',
- 'src/core/lib/iomgr/udp_server.c',
- 'src/core/lib/iomgr/unix_sockets_posix.c',
- 'src/core/lib/iomgr/unix_sockets_posix_noop.c',
- 'src/core/lib/iomgr/wakeup_fd_cv.c',
- 'src/core/lib/iomgr/wakeup_fd_eventfd.c',
- 'src/core/lib/iomgr/wakeup_fd_nospecial.c',
- 'src/core/lib/iomgr/wakeup_fd_pipe.c',
- 'src/core/lib/iomgr/wakeup_fd_posix.c',
- 'src/core/lib/json/json.c',
- 'src/core/lib/json/json_reader.c',
- 'src/core/lib/json/json_string.c',
- 'src/core/lib/json/json_writer.c',
- 'src/core/lib/slice/b64.c',
- 'src/core/lib/slice/percent_encoding.c',
- 'src/core/lib/slice/slice.c',
- 'src/core/lib/slice/slice_buffer.c',
- 'src/core/lib/slice/slice_hash_table.c',
- 'src/core/lib/slice/slice_intern.c',
- 'src/core/lib/slice/slice_string_helpers.c',
- 'src/core/lib/surface/alarm.c',
- 'src/core/lib/surface/api_trace.c',
- 'src/core/lib/surface/byte_buffer.c',
- 'src/core/lib/surface/byte_buffer_reader.c',
- 'src/core/lib/surface/call.c',
- 'src/core/lib/surface/call_details.c',
- 'src/core/lib/surface/call_log_batch.c',
- 'src/core/lib/surface/channel.c',
- 'src/core/lib/surface/channel_init.c',
- 'src/core/lib/surface/channel_ping.c',
- 'src/core/lib/surface/channel_stack_type.c',
- 'src/core/lib/surface/completion_queue.c',
- 'src/core/lib/surface/completion_queue_factory.c',
- 'src/core/lib/surface/event_string.c',
+ 'src/core/lib/surface/init.cc',
+ 'src/core/lib/backoff/backoff.cc',
+ 'src/core/lib/channel/channel_args.cc',
+ 'src/core/lib/channel/channel_stack.cc',
+ 'src/core/lib/channel/channel_stack_builder.cc',
+ 'src/core/lib/channel/connected_channel.cc',
+ 'src/core/lib/channel/handshaker.cc',
+ '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/message_compress.cc',
+ 'src/core/lib/compression/stream_compression.cc',
+ 'src/core/lib/compression/stream_compression_gzip.cc',
+ 'src/core/lib/compression/stream_compression_identity.cc',
+ 'src/core/lib/debug/stats.cc',
+ 'src/core/lib/debug/stats_data.cc',
+ 'src/core/lib/http/format_request.cc',
+ 'src/core/lib/http/httpcli.cc',
+ 'src/core/lib/http/parser.cc',
+ 'src/core/lib/iomgr/call_combiner.cc',
+ 'src/core/lib/iomgr/closure.cc',
+ 'src/core/lib/iomgr/combiner.cc',
+ 'src/core/lib/iomgr/endpoint.cc',
+ 'src/core/lib/iomgr/endpoint_pair_posix.cc',
+ 'src/core/lib/iomgr/endpoint_pair_uv.cc',
+ 'src/core/lib/iomgr/endpoint_pair_windows.cc',
+ 'src/core/lib/iomgr/error.cc',
+ 'src/core/lib/iomgr/ev_epoll1_linux.cc',
+ 'src/core/lib/iomgr/ev_epollex_linux.cc',
+ 'src/core/lib/iomgr/ev_epollsig_linux.cc',
+ 'src/core/lib/iomgr/ev_poll_posix.cc',
+ 'src/core/lib/iomgr/ev_posix.cc',
+ 'src/core/lib/iomgr/ev_windows.cc',
+ 'src/core/lib/iomgr/exec_ctx.cc',
+ 'src/core/lib/iomgr/executor.cc',
+ 'src/core/lib/iomgr/gethostname_fallback.cc',
+ 'src/core/lib/iomgr/gethostname_host_name_max.cc',
+ 'src/core/lib/iomgr/gethostname_sysconf.cc',
+ 'src/core/lib/iomgr/iocp_windows.cc',
+ 'src/core/lib/iomgr/iomgr.cc',
+ 'src/core/lib/iomgr/iomgr_posix.cc',
+ 'src/core/lib/iomgr/iomgr_uv.cc',
+ 'src/core/lib/iomgr/iomgr_windows.cc',
+ 'src/core/lib/iomgr/is_epollexclusive_available.cc',
+ 'src/core/lib/iomgr/load_file.cc',
+ 'src/core/lib/iomgr/lockfree_event.cc',
+ 'src/core/lib/iomgr/network_status_tracker.cc',
+ 'src/core/lib/iomgr/polling_entity.cc',
+ 'src/core/lib/iomgr/pollset_set_uv.cc',
+ 'src/core/lib/iomgr/pollset_set_windows.cc',
+ 'src/core/lib/iomgr/pollset_uv.cc',
+ 'src/core/lib/iomgr/pollset_windows.cc',
+ 'src/core/lib/iomgr/resolve_address_posix.cc',
+ 'src/core/lib/iomgr/resolve_address_uv.cc',
+ 'src/core/lib/iomgr/resolve_address_windows.cc',
+ 'src/core/lib/iomgr/resource_quota.cc',
+ 'src/core/lib/iomgr/sockaddr_utils.cc',
+ 'src/core/lib/iomgr/socket_factory_posix.cc',
+ 'src/core/lib/iomgr/socket_mutator.cc',
+ 'src/core/lib/iomgr/socket_utils_common_posix.cc',
+ 'src/core/lib/iomgr/socket_utils_linux.cc',
+ 'src/core/lib/iomgr/socket_utils_posix.cc',
+ 'src/core/lib/iomgr/socket_utils_uv.cc',
+ 'src/core/lib/iomgr/socket_utils_windows.cc',
+ 'src/core/lib/iomgr/socket_windows.cc',
+ 'src/core/lib/iomgr/tcp_client_posix.cc',
+ 'src/core/lib/iomgr/tcp_client_uv.cc',
+ 'src/core/lib/iomgr/tcp_client_windows.cc',
+ 'src/core/lib/iomgr/tcp_posix.cc',
+ 'src/core/lib/iomgr/tcp_server_posix.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_common.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
+ 'src/core/lib/iomgr/tcp_server_uv.cc',
+ 'src/core/lib/iomgr/tcp_server_windows.cc',
+ 'src/core/lib/iomgr/tcp_uv.cc',
+ 'src/core/lib/iomgr/tcp_windows.cc',
+ 'src/core/lib/iomgr/time_averaged_stats.cc',
+ 'src/core/lib/iomgr/timer_generic.cc',
+ 'src/core/lib/iomgr/timer_heap.cc',
+ 'src/core/lib/iomgr/timer_manager.cc',
+ 'src/core/lib/iomgr/timer_uv.cc',
+ 'src/core/lib/iomgr/udp_server.cc',
+ 'src/core/lib/iomgr/unix_sockets_posix.cc',
+ 'src/core/lib/iomgr/unix_sockets_posix_noop.cc',
+ 'src/core/lib/iomgr/wakeup_fd_cv.cc',
+ 'src/core/lib/iomgr/wakeup_fd_eventfd.cc',
+ 'src/core/lib/iomgr/wakeup_fd_nospecial.cc',
+ 'src/core/lib/iomgr/wakeup_fd_pipe.cc',
+ 'src/core/lib/iomgr/wakeup_fd_posix.cc',
+ 'src/core/lib/json/json.cc',
+ 'src/core/lib/json/json_reader.cc',
+ 'src/core/lib/json/json_string.cc',
+ 'src/core/lib/json/json_writer.cc',
+ 'src/core/lib/slice/b64.cc',
+ 'src/core/lib/slice/percent_encoding.cc',
+ 'src/core/lib/slice/slice.cc',
+ 'src/core/lib/slice/slice_buffer.cc',
+ 'src/core/lib/slice/slice_hash_table.cc',
+ 'src/core/lib/slice/slice_intern.cc',
+ 'src/core/lib/slice/slice_string_helpers.cc',
+ 'src/core/lib/surface/alarm.cc',
+ 'src/core/lib/surface/api_trace.cc',
+ 'src/core/lib/surface/byte_buffer.cc',
+ 'src/core/lib/surface/byte_buffer_reader.cc',
+ 'src/core/lib/surface/call.cc',
+ 'src/core/lib/surface/call_details.cc',
+ 'src/core/lib/surface/call_log_batch.cc',
+ 'src/core/lib/surface/channel.cc',
+ 'src/core/lib/surface/channel_init.cc',
+ 'src/core/lib/surface/channel_ping.cc',
+ 'src/core/lib/surface/channel_stack_type.cc',
+ 'src/core/lib/surface/completion_queue.cc',
+ 'src/core/lib/surface/completion_queue_factory.cc',
+ 'src/core/lib/surface/event_string.cc',
'src/core/lib/surface/lame_client.cc',
- 'src/core/lib/surface/metadata_array.c',
- 'src/core/lib/surface/server.c',
- 'src/core/lib/surface/validate_metadata.c',
- 'src/core/lib/surface/version.c',
- 'src/core/lib/transport/bdp_estimator.c',
- 'src/core/lib/transport/byte_stream.c',
- 'src/core/lib/transport/connectivity_state.c',
- 'src/core/lib/transport/error_utils.c',
- 'src/core/lib/transport/metadata.c',
- 'src/core/lib/transport/metadata_batch.c',
- 'src/core/lib/transport/pid_controller.c',
- 'src/core/lib/transport/service_config.c',
- 'src/core/lib/transport/static_metadata.c',
- 'src/core/lib/transport/status_conversion.c',
- 'src/core/lib/transport/timeout_encoding.c',
- 'src/core/lib/transport/transport.c',
- 'src/core/lib/transport/transport_op_string.c',
- 'src/core/lib/debug/trace.c',
- 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c',
- 'src/core/ext/transport/chttp2/transport/bin_decoder.c',
- 'src/core/ext/transport/chttp2/transport/bin_encoder.c',
- 'src/core/ext/transport/chttp2/transport/chttp2_plugin.c',
- 'src/core/ext/transport/chttp2/transport/chttp2_transport.c',
- 'src/core/ext/transport/chttp2/transport/flow_control.c',
- 'src/core/ext/transport/chttp2/transport/frame_data.c',
- 'src/core/ext/transport/chttp2/transport/frame_goaway.c',
- 'src/core/ext/transport/chttp2/transport/frame_ping.c',
- 'src/core/ext/transport/chttp2/transport/frame_rst_stream.c',
- 'src/core/ext/transport/chttp2/transport/frame_settings.c',
- 'src/core/ext/transport/chttp2/transport/frame_window_update.c',
- 'src/core/ext/transport/chttp2/transport/hpack_encoder.c',
- 'src/core/ext/transport/chttp2/transport/hpack_parser.c',
- 'src/core/ext/transport/chttp2/transport/hpack_table.c',
- 'src/core/ext/transport/chttp2/transport/http2_settings.c',
- 'src/core/ext/transport/chttp2/transport/huffsyms.c',
- 'src/core/ext/transport/chttp2/transport/incoming_metadata.c',
- 'src/core/ext/transport/chttp2/transport/parsing.c',
- 'src/core/ext/transport/chttp2/transport/stream_lists.c',
- 'src/core/ext/transport/chttp2/transport/stream_map.c',
- 'src/core/ext/transport/chttp2/transport/varint.c',
- 'src/core/ext/transport/chttp2/transport/writing.c',
- 'src/core/ext/transport/chttp2/alpn/alpn.c',
- 'src/core/ext/filters/http/client/http_client_filter.c',
- 'src/core/ext/filters/http/http_filters_plugin.c',
- 'src/core/ext/filters/http/message_compress/message_compress_filter.c',
- 'src/core/ext/filters/http/server/http_server_filter.c',
- 'src/core/lib/http/httpcli_security_connector.c',
- 'src/core/lib/security/context/security_context.c',
- 'src/core/lib/security/credentials/composite/composite_credentials.c',
- 'src/core/lib/security/credentials/credentials.c',
- 'src/core/lib/security/credentials/credentials_metadata.c',
- 'src/core/lib/security/credentials/fake/fake_credentials.c',
- 'src/core/lib/security/credentials/google_default/credentials_generic.c',
- 'src/core/lib/security/credentials/google_default/google_default_credentials.c',
- 'src/core/lib/security/credentials/iam/iam_credentials.c',
- 'src/core/lib/security/credentials/jwt/json_token.c',
- 'src/core/lib/security/credentials/jwt/jwt_credentials.c',
- 'src/core/lib/security/credentials/jwt/jwt_verifier.c',
- 'src/core/lib/security/credentials/oauth2/oauth2_credentials.c',
- 'src/core/lib/security/credentials/plugin/plugin_credentials.c',
- 'src/core/lib/security/credentials/ssl/ssl_credentials.c',
- 'src/core/lib/security/transport/client_auth_filter.c',
- 'src/core/lib/security/transport/lb_targets_info.c',
- 'src/core/lib/security/transport/secure_endpoint.c',
- 'src/core/lib/security/transport/security_connector.c',
- 'src/core/lib/security/transport/security_handshaker.c',
- 'src/core/lib/security/transport/server_auth_filter.c',
- 'src/core/lib/security/transport/tsi_error.c',
- 'src/core/lib/security/util/json_util.c',
- 'src/core/lib/surface/init_secure.c',
- 'src/core/tsi/fake_transport_security.c',
- 'src/core/tsi/gts_transport_security.c',
- 'src/core/tsi/ssl_transport_security.c',
- 'src/core/tsi/transport_security_grpc.c',
- 'src/core/tsi/transport_security.c',
- 'src/core/tsi/transport_security_adapter.c',
- 'src/core/ext/transport/chttp2/server/chttp2_server.c',
- 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c',
- 'src/core/ext/filters/client_channel/channel_connectivity.c',
- 'src/core/ext/filters/client_channel/client_channel.c',
- 'src/core/ext/filters/client_channel/client_channel_factory.c',
- 'src/core/ext/filters/client_channel/client_channel_plugin.c',
- 'src/core/ext/filters/client_channel/connector.c',
- 'src/core/ext/filters/client_channel/http_connect_handshaker.c',
- 'src/core/ext/filters/client_channel/http_proxy.c',
- 'src/core/ext/filters/client_channel/lb_policy.c',
- 'src/core/ext/filters/client_channel/lb_policy_factory.c',
- 'src/core/ext/filters/client_channel/lb_policy_registry.c',
- 'src/core/ext/filters/client_channel/parse_address.c',
- 'src/core/ext/filters/client_channel/proxy_mapper.c',
- 'src/core/ext/filters/client_channel/proxy_mapper_registry.c',
- 'src/core/ext/filters/client_channel/resolver.c',
- 'src/core/ext/filters/client_channel/resolver_factory.c',
- 'src/core/ext/filters/client_channel/resolver_registry.c',
- 'src/core/ext/filters/client_channel/retry_throttle.c',
- 'src/core/ext/filters/client_channel/subchannel.c',
- 'src/core/ext/filters/client_channel/subchannel_index.c',
- 'src/core/ext/filters/client_channel/uri_parser.c',
- 'src/core/ext/filters/deadline/deadline_filter.c',
- 'src/core/ext/transport/chttp2/client/chttp2_connector.c',
- 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c',
- 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c',
- 'src/core/ext/transport/chttp2/client/insecure/channel_create.c',
- 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c',
- 'src/core/ext/transport/inproc/inproc_plugin.c',
- 'src/core/ext/transport/inproc/inproc_transport.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c',
+ 'src/core/lib/surface/metadata_array.cc',
+ 'src/core/lib/surface/server.cc',
+ 'src/core/lib/surface/validate_metadata.cc',
+ 'src/core/lib/surface/version.cc',
+ 'src/core/lib/transport/bdp_estimator.cc',
+ 'src/core/lib/transport/byte_stream.cc',
+ 'src/core/lib/transport/connectivity_state.cc',
+ 'src/core/lib/transport/error_utils.cc',
+ 'src/core/lib/transport/metadata.cc',
+ 'src/core/lib/transport/metadata_batch.cc',
+ 'src/core/lib/transport/pid_controller.cc',
+ 'src/core/lib/transport/service_config.cc',
+ 'src/core/lib/transport/static_metadata.cc',
+ 'src/core/lib/transport/status_conversion.cc',
+ 'src/core/lib/transport/timeout_encoding.cc',
+ 'src/core/lib/transport/transport.cc',
+ 'src/core/lib/transport/transport_op_string.cc',
+ 'src/core/lib/debug/trace.cc',
+ 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc',
+ 'src/core/ext/transport/chttp2/transport/bin_decoder.cc',
+ 'src/core/ext/transport/chttp2/transport/bin_encoder.cc',
+ 'src/core/ext/transport/chttp2/transport/chttp2_plugin.cc',
+ 'src/core/ext/transport/chttp2/transport/chttp2_transport.cc',
+ 'src/core/ext/transport/chttp2/transport/flow_control.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_data.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_goaway.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_ping.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_rst_stream.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_settings.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_window_update.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_encoder.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_parser.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_table.cc',
+ 'src/core/ext/transport/chttp2/transport/http2_settings.cc',
+ 'src/core/ext/transport/chttp2/transport/huffsyms.cc',
+ 'src/core/ext/transport/chttp2/transport/incoming_metadata.cc',
+ 'src/core/ext/transport/chttp2/transport/parsing.cc',
+ 'src/core/ext/transport/chttp2/transport/stream_lists.cc',
+ 'src/core/ext/transport/chttp2/transport/stream_map.cc',
+ 'src/core/ext/transport/chttp2/transport/varint.cc',
+ 'src/core/ext/transport/chttp2/transport/writing.cc',
+ 'src/core/ext/transport/chttp2/alpn/alpn.cc',
+ 'src/core/ext/filters/http/client/http_client_filter.cc',
+ 'src/core/ext/filters/http/http_filters_plugin.cc',
+ 'src/core/ext/filters/http/message_compress/message_compress_filter.cc',
+ 'src/core/ext/filters/http/server/http_server_filter.cc',
+ 'src/core/lib/http/httpcli_security_connector.cc',
+ 'src/core/lib/security/context/security_context.cc',
+ 'src/core/lib/security/credentials/composite/composite_credentials.cc',
+ 'src/core/lib/security/credentials/credentials.cc',
+ 'src/core/lib/security/credentials/credentials_metadata.cc',
+ 'src/core/lib/security/credentials/fake/fake_credentials.cc',
+ 'src/core/lib/security/credentials/google_default/credentials_generic.cc',
+ 'src/core/lib/security/credentials/google_default/google_default_credentials.cc',
+ 'src/core/lib/security/credentials/iam/iam_credentials.cc',
+ 'src/core/lib/security/credentials/jwt/json_token.cc',
+ 'src/core/lib/security/credentials/jwt/jwt_credentials.cc',
+ 'src/core/lib/security/credentials/jwt/jwt_verifier.cc',
+ 'src/core/lib/security/credentials/oauth2/oauth2_credentials.cc',
+ 'src/core/lib/security/credentials/plugin/plugin_credentials.cc',
+ 'src/core/lib/security/credentials/ssl/ssl_credentials.cc',
+ 'src/core/lib/security/transport/client_auth_filter.cc',
+ 'src/core/lib/security/transport/lb_targets_info.cc',
+ 'src/core/lib/security/transport/secure_endpoint.cc',
+ 'src/core/lib/security/transport/security_connector.cc',
+ 'src/core/lib/security/transport/security_handshaker.cc',
+ 'src/core/lib/security/transport/server_auth_filter.cc',
+ '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/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',
+ 'src/core/tsi/transport_security_adapter.cc',
+ 'src/core/ext/transport/chttp2/server/chttp2_server.cc',
+ 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc',
+ 'src/core/ext/filters/client_channel/channel_connectivity.cc',
+ 'src/core/ext/filters/client_channel/client_channel.cc',
+ 'src/core/ext/filters/client_channel/client_channel_factory.cc',
+ 'src/core/ext/filters/client_channel/client_channel_plugin.cc',
+ 'src/core/ext/filters/client_channel/connector.cc',
+ 'src/core/ext/filters/client_channel/http_connect_handshaker.cc',
+ 'src/core/ext/filters/client_channel/http_proxy.cc',
+ 'src/core/ext/filters/client_channel/lb_policy.cc',
+ 'src/core/ext/filters/client_channel/lb_policy_factory.cc',
+ 'src/core/ext/filters/client_channel/lb_policy_registry.cc',
+ 'src/core/ext/filters/client_channel/parse_address.cc',
+ 'src/core/ext/filters/client_channel/proxy_mapper.cc',
+ 'src/core/ext/filters/client_channel/proxy_mapper_registry.cc',
+ 'src/core/ext/filters/client_channel/resolver.cc',
+ 'src/core/ext/filters/client_channel/resolver_factory.cc',
+ 'src/core/ext/filters/client_channel/resolver_registry.cc',
+ 'src/core/ext/filters/client_channel/retry_throttle.cc',
+ 'src/core/ext/filters/client_channel/subchannel.cc',
+ 'src/core/ext/filters/client_channel/subchannel_index.cc',
+ 'src/core/ext/filters/client_channel/uri_parser.cc',
+ 'src/core/ext/filters/deadline/deadline_filter.cc',
+ 'src/core/ext/transport/chttp2/client/chttp2_connector.cc',
+ 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc',
+ 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc',
+ 'src/core/ext/transport/chttp2/client/insecure/channel_create.cc',
+ 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc',
+ 'src/core/ext/transport/inproc/inproc_plugin.cc',
+ 'src/core/ext/transport/inproc/inproc_transport.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
- 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c',
- 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c',
- 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c',
- 'src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c',
- 'src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c',
- 'src/core/ext/filters/load_reporting/server_load_reporting_filter.c',
- 'src/core/ext/filters/load_reporting/server_load_reporting_plugin.c',
- 'src/core/ext/census/base_resources.c',
- 'src/core/ext/census/context.c',
+ 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc',
+ 'src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc',
+ 'src/core/ext/filters/load_reporting/server_load_reporting_filter.cc',
+ 'src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc',
+ 'src/core/ext/census/base_resources.cc',
+ 'src/core/ext/census/context.cc',
'src/core/ext/census/gen/census.pb.c',
'src/core/ext/census/gen/trace_context.pb.c',
- 'src/core/ext/census/grpc_context.c',
- 'src/core/ext/census/grpc_filter.c',
- 'src/core/ext/census/grpc_plugin.c',
- 'src/core/ext/census/initialize.c',
- 'src/core/ext/census/intrusive_hash_map.c',
- 'src/core/ext/census/mlog.c',
- 'src/core/ext/census/operation.c',
- 'src/core/ext/census/placeholders.c',
- 'src/core/ext/census/resource.c',
- 'src/core/ext/census/trace_context.c',
- 'src/core/ext/census/tracing.c',
- 'src/core/ext/filters/max_age/max_age_filter.c',
- 'src/core/ext/filters/message_size/message_size_filter.c',
- 'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c',
- 'src/core/ext/filters/workarounds/workaround_utils.c',
- 'src/core/plugin_registry/grpc_plugin_registry.c'
+ 'src/core/ext/census/grpc_context.cc',
+ 'src/core/ext/census/grpc_filter.cc',
+ 'src/core/ext/census/grpc_plugin.cc',
+ 'src/core/ext/census/initialize.cc',
+ 'src/core/ext/census/intrusive_hash_map.cc',
+ 'src/core/ext/census/mlog.cc',
+ 'src/core/ext/census/operation.cc',
+ 'src/core/ext/census/placeholders.cc',
+ 'src/core/ext/census/resource.cc',
+ 'src/core/ext/census/trace_context.cc',
+ 'src/core/ext/census/tracing.cc',
+ 'src/core/ext/filters/max_age/max_age_filter.cc',
+ 'src/core/ext/filters/message_size/message_size_filter.cc',
+ 'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc',
+ 'src/core/ext/filters/workarounds/workaround_utils.cc',
+ 'src/core/plugin_registry/grpc_plugin_registry.cc'
ss.private_header_files = 'src/core/lib/profiling/timers.h',
'src/core/lib/support/arena.h',
'src/core/lib/support/atomic.h',
'src/core/lib/support/atomic_with_atm.h',
'src/core/lib/support/atomic_with_std.h',
- 'src/core/lib/support/backoff.h',
- 'src/core/lib/support/block_annotate.h',
'src/core/lib/support/env.h',
'src/core/lib/support/memory.h',
'src/core/lib/support/mpscq.h',
@@ -820,6 +808,7 @@ Pod::Spec.new do |s|
'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',
@@ -839,6 +828,7 @@ Pod::Spec.new do |s|
'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',
@@ -986,8 +976,8 @@ Pod::Spec.new do |s|
ss.dependency "#{s.name}/Implementation", version
ss.dependency "#{s.name}/Cronet-Interface", version
- ss.source_files = 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.c',
- 'src/core/ext/transport/cronet/transport/cronet_transport.{c,h}',
+ ss.source_files = 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc',
+ 'src/core/ext/transport/cronet/transport/cronet_transport.{cc,h}',
'third_party/objective_c/Cronet/bidirectional_stream_c.h'
end
diff --git a/gRPC-ProtoRPC.podspec b/gRPC-ProtoRPC.podspec
index cb40330dab..db1e8db06c 100644
--- a/gRPC-ProtoRPC.podspec
+++ b/gRPC-ProtoRPC.podspec
@@ -21,7 +21,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-ProtoRPC'
- version = '1.7.0-dev'
+ version = '1.8.0-dev'
s.version = version
s.summary = 'RPC library for Protocol Buffers, based on gRPC'
s.homepage = 'https://grpc.io'
diff --git a/gRPC-RxLibrary.podspec b/gRPC-RxLibrary.podspec
index 52bd8ed0ae..3689779039 100644
--- a/gRPC-RxLibrary.podspec
+++ b/gRPC-RxLibrary.podspec
@@ -21,7 +21,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-RxLibrary'
- version = '1.7.0-dev'
+ version = '1.8.0-dev'
s.version = version
s.summary = 'Reactive Extensions library for iOS/OSX.'
s.homepage = 'https://grpc.io'
diff --git a/gRPC.podspec b/gRPC.podspec
index 79315e46f3..6bec50f0de 100644
--- a/gRPC.podspec
+++ b/gRPC.podspec
@@ -20,7 +20,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC'
- version = '1.7.0-dev'
+ version = '1.8.0-dev'
s.version = version
s.summary = 'gRPC client library for iOS/OSX'
s.homepage = 'https://grpc.io'
diff --git a/grpc.gemspec b/grpc.gemspec
index 2bae208637..6afb09d75e 100644
--- a/grpc.gemspec
+++ b/grpc.gemspec
@@ -88,8 +88,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/support/atomic.h )
s.files += %w( src/core/lib/support/atomic_with_atm.h )
s.files += %w( src/core/lib/support/atomic_with_std.h )
- s.files += %w( src/core/lib/support/backoff.h )
- s.files += %w( src/core/lib/support/block_annotate.h )
s.files += %w( src/core/lib/support/env.h )
s.files += %w( src/core/lib/support/memory.h )
s.files += %w( src/core/lib/support/mpscq.h )
@@ -100,52 +98,51 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/support/string_windows.h )
s.files += %w( src/core/lib/support/time_precise.h )
s.files += %w( src/core/lib/support/tmpfile.h )
- s.files += %w( src/core/lib/profiling/basic_timers.c )
- s.files += %w( src/core/lib/profiling/stap_timers.c )
- s.files += %w( src/core/lib/support/alloc.c )
- s.files += %w( src/core/lib/support/arena.c )
- s.files += %w( src/core/lib/support/atm.c )
- s.files += %w( src/core/lib/support/avl.c )
- s.files += %w( src/core/lib/support/backoff.c )
- s.files += %w( src/core/lib/support/cmdline.c )
- s.files += %w( src/core/lib/support/cpu_iphone.c )
- s.files += %w( src/core/lib/support/cpu_linux.c )
- s.files += %w( src/core/lib/support/cpu_posix.c )
- s.files += %w( src/core/lib/support/cpu_windows.c )
- s.files += %w( src/core/lib/support/env_linux.c )
- s.files += %w( src/core/lib/support/env_posix.c )
- s.files += %w( src/core/lib/support/env_windows.c )
- s.files += %w( src/core/lib/support/histogram.c )
- s.files += %w( src/core/lib/support/host_port.c )
- s.files += %w( src/core/lib/support/log.c )
- s.files += %w( src/core/lib/support/log_android.c )
- s.files += %w( src/core/lib/support/log_linux.c )
- s.files += %w( src/core/lib/support/log_posix.c )
- s.files += %w( src/core/lib/support/log_windows.c )
- s.files += %w( src/core/lib/support/mpscq.c )
- s.files += %w( src/core/lib/support/murmur_hash.c )
- s.files += %w( src/core/lib/support/stack_lockfree.c )
- s.files += %w( src/core/lib/support/string.c )
- s.files += %w( src/core/lib/support/string_posix.c )
- s.files += %w( src/core/lib/support/string_util_windows.c )
- s.files += %w( src/core/lib/support/string_windows.c )
- s.files += %w( src/core/lib/support/subprocess_posix.c )
- s.files += %w( src/core/lib/support/subprocess_windows.c )
- s.files += %w( src/core/lib/support/sync.c )
- s.files += %w( src/core/lib/support/sync_posix.c )
- s.files += %w( src/core/lib/support/sync_windows.c )
- s.files += %w( src/core/lib/support/thd.c )
- s.files += %w( src/core/lib/support/thd_posix.c )
- s.files += %w( src/core/lib/support/thd_windows.c )
- s.files += %w( src/core/lib/support/time.c )
- s.files += %w( src/core/lib/support/time_posix.c )
- s.files += %w( src/core/lib/support/time_precise.c )
- s.files += %w( src/core/lib/support/time_windows.c )
- s.files += %w( src/core/lib/support/tls_pthread.c )
- s.files += %w( src/core/lib/support/tmpfile_msys.c )
- s.files += %w( src/core/lib/support/tmpfile_posix.c )
- s.files += %w( src/core/lib/support/tmpfile_windows.c )
- s.files += %w( src/core/lib/support/wrap_memcpy.c )
+ s.files += %w( src/core/lib/profiling/basic_timers.cc )
+ s.files += %w( src/core/lib/profiling/stap_timers.cc )
+ s.files += %w( src/core/lib/support/alloc.cc )
+ s.files += %w( src/core/lib/support/arena.cc )
+ s.files += %w( src/core/lib/support/atm.cc )
+ s.files += %w( src/core/lib/support/avl.cc )
+ s.files += %w( src/core/lib/support/cmdline.cc )
+ s.files += %w( src/core/lib/support/cpu_iphone.cc )
+ s.files += %w( src/core/lib/support/cpu_linux.cc )
+ s.files += %w( src/core/lib/support/cpu_posix.cc )
+ s.files += %w( src/core/lib/support/cpu_windows.cc )
+ s.files += %w( src/core/lib/support/env_linux.cc )
+ s.files += %w( src/core/lib/support/env_posix.cc )
+ s.files += %w( src/core/lib/support/env_windows.cc )
+ s.files += %w( src/core/lib/support/histogram.cc )
+ s.files += %w( src/core/lib/support/host_port.cc )
+ s.files += %w( src/core/lib/support/log.cc )
+ s.files += %w( src/core/lib/support/log_android.cc )
+ s.files += %w( src/core/lib/support/log_linux.cc )
+ s.files += %w( src/core/lib/support/log_posix.cc )
+ s.files += %w( src/core/lib/support/log_windows.cc )
+ s.files += %w( src/core/lib/support/mpscq.cc )
+ s.files += %w( src/core/lib/support/murmur_hash.cc )
+ s.files += %w( src/core/lib/support/stack_lockfree.cc )
+ s.files += %w( src/core/lib/support/string.cc )
+ s.files += %w( src/core/lib/support/string_posix.cc )
+ s.files += %w( src/core/lib/support/string_util_windows.cc )
+ s.files += %w( src/core/lib/support/string_windows.cc )
+ s.files += %w( src/core/lib/support/subprocess_posix.cc )
+ s.files += %w( src/core/lib/support/subprocess_windows.cc )
+ s.files += %w( src/core/lib/support/sync.cc )
+ s.files += %w( src/core/lib/support/sync_posix.cc )
+ s.files += %w( src/core/lib/support/sync_windows.cc )
+ s.files += %w( src/core/lib/support/thd.cc )
+ s.files += %w( src/core/lib/support/thd_posix.cc )
+ s.files += %w( src/core/lib/support/thd_windows.cc )
+ s.files += %w( src/core/lib/support/time.cc )
+ s.files += %w( src/core/lib/support/time_posix.cc )
+ s.files += %w( src/core/lib/support/time_precise.cc )
+ s.files += %w( src/core/lib/support/time_windows.cc )
+ s.files += %w( src/core/lib/support/tls_pthread.cc )
+ s.files += %w( src/core/lib/support/tmpfile_msys.cc )
+ s.files += %w( src/core/lib/support/tmpfile_posix.cc )
+ s.files += %w( src/core/lib/support/tmpfile_windows.cc )
+ s.files += %w( src/core/lib/support/wrap_memcpy.cc )
s.files += %w( include/grpc/impl/codegen/byte_buffer.h )
s.files += %w( include/grpc/impl/codegen/byte_buffer_reader.h )
s.files += %w( include/grpc/impl/codegen/compression_types.h )
@@ -252,6 +249,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/filters/deadline/deadline_filter.h )
s.files += %w( src/core/ext/transport/chttp2/client/chttp2_connector.h )
s.files += %w( src/core/ext/transport/inproc/inproc_transport.h )
+ s.files += %w( src/core/lib/backoff/backoff.h )
s.files += %w( src/core/lib/channel/channel_args.h )
s.files += %w( src/core/lib/channel/channel_stack.h )
s.files += %w( src/core/lib/channel/channel_stack_builder.h )
@@ -271,6 +269,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/http/format_request.h )
s.files += %w( src/core/lib/http/httpcli.h )
s.files += %w( src/core/lib/http/parser.h )
+ s.files += %w( src/core/lib/iomgr/block_annotate.h )
s.files += %w( src/core/lib/iomgr/call_combiner.h )
s.files += %w( src/core/lib/iomgr/closure.h )
s.files += %w( src/core/lib/iomgr/combiner.h )
@@ -408,268 +407,269 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/filters/message_size/message_size_filter.h )
s.files += %w( src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h )
s.files += %w( src/core/ext/filters/workarounds/workaround_utils.h )
- s.files += %w( src/core/lib/surface/init.c )
- s.files += %w( src/core/lib/channel/channel_args.c )
- s.files += %w( src/core/lib/channel/channel_stack.c )
- s.files += %w( src/core/lib/channel/channel_stack_builder.c )
- s.files += %w( src/core/lib/channel/connected_channel.c )
- s.files += %w( src/core/lib/channel/handshaker.c )
- s.files += %w( src/core/lib/channel/handshaker_factory.c )
- s.files += %w( src/core/lib/channel/handshaker_registry.c )
- s.files += %w( src/core/lib/compression/compression.c )
- s.files += %w( src/core/lib/compression/compression_internal.c )
- s.files += %w( src/core/lib/compression/message_compress.c )
- s.files += %w( src/core/lib/compression/stream_compression.c )
- s.files += %w( src/core/lib/compression/stream_compression_gzip.c )
- s.files += %w( src/core/lib/compression/stream_compression_identity.c )
- s.files += %w( src/core/lib/debug/stats.c )
- s.files += %w( src/core/lib/debug/stats_data.c )
- s.files += %w( src/core/lib/http/format_request.c )
- s.files += %w( src/core/lib/http/httpcli.c )
- s.files += %w( src/core/lib/http/parser.c )
- s.files += %w( src/core/lib/iomgr/call_combiner.c )
- s.files += %w( src/core/lib/iomgr/closure.c )
- s.files += %w( src/core/lib/iomgr/combiner.c )
- s.files += %w( src/core/lib/iomgr/endpoint.c )
- s.files += %w( src/core/lib/iomgr/endpoint_pair_posix.c )
- s.files += %w( src/core/lib/iomgr/endpoint_pair_uv.c )
- s.files += %w( src/core/lib/iomgr/endpoint_pair_windows.c )
- s.files += %w( src/core/lib/iomgr/error.c )
- s.files += %w( src/core/lib/iomgr/ev_epoll1_linux.c )
- s.files += %w( src/core/lib/iomgr/ev_epollex_linux.c )
- s.files += %w( src/core/lib/iomgr/ev_epollsig_linux.c )
- s.files += %w( src/core/lib/iomgr/ev_poll_posix.c )
- s.files += %w( src/core/lib/iomgr/ev_posix.c )
- s.files += %w( src/core/lib/iomgr/ev_windows.c )
- s.files += %w( src/core/lib/iomgr/exec_ctx.c )
- s.files += %w( src/core/lib/iomgr/executor.c )
- s.files += %w( src/core/lib/iomgr/gethostname_fallback.c )
- s.files += %w( src/core/lib/iomgr/gethostname_host_name_max.c )
- s.files += %w( src/core/lib/iomgr/gethostname_sysconf.c )
- s.files += %w( src/core/lib/iomgr/iocp_windows.c )
- s.files += %w( src/core/lib/iomgr/iomgr.c )
- s.files += %w( src/core/lib/iomgr/iomgr_posix.c )
- s.files += %w( src/core/lib/iomgr/iomgr_uv.c )
- s.files += %w( src/core/lib/iomgr/iomgr_windows.c )
- s.files += %w( src/core/lib/iomgr/is_epollexclusive_available.c )
- s.files += %w( src/core/lib/iomgr/load_file.c )
- s.files += %w( src/core/lib/iomgr/lockfree_event.c )
- s.files += %w( src/core/lib/iomgr/network_status_tracker.c )
- s.files += %w( src/core/lib/iomgr/polling_entity.c )
- s.files += %w( src/core/lib/iomgr/pollset_set_uv.c )
- s.files += %w( src/core/lib/iomgr/pollset_set_windows.c )
- s.files += %w( src/core/lib/iomgr/pollset_uv.c )
- s.files += %w( src/core/lib/iomgr/pollset_windows.c )
- s.files += %w( src/core/lib/iomgr/resolve_address_posix.c )
- s.files += %w( src/core/lib/iomgr/resolve_address_uv.c )
- s.files += %w( src/core/lib/iomgr/resolve_address_windows.c )
- s.files += %w( src/core/lib/iomgr/resource_quota.c )
- s.files += %w( src/core/lib/iomgr/sockaddr_utils.c )
- s.files += %w( src/core/lib/iomgr/socket_factory_posix.c )
- s.files += %w( src/core/lib/iomgr/socket_mutator.c )
- s.files += %w( src/core/lib/iomgr/socket_utils_common_posix.c )
- s.files += %w( src/core/lib/iomgr/socket_utils_linux.c )
- s.files += %w( src/core/lib/iomgr/socket_utils_posix.c )
- s.files += %w( src/core/lib/iomgr/socket_utils_uv.c )
- s.files += %w( src/core/lib/iomgr/socket_utils_windows.c )
- s.files += %w( src/core/lib/iomgr/socket_windows.c )
- s.files += %w( src/core/lib/iomgr/tcp_client_posix.c )
- s.files += %w( src/core/lib/iomgr/tcp_client_uv.c )
- s.files += %w( src/core/lib/iomgr/tcp_client_windows.c )
- s.files += %w( src/core/lib/iomgr/tcp_posix.c )
- s.files += %w( src/core/lib/iomgr/tcp_server_posix.c )
- s.files += %w( src/core/lib/iomgr/tcp_server_utils_posix_common.c )
- s.files += %w( src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c )
- s.files += %w( src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c )
- s.files += %w( src/core/lib/iomgr/tcp_server_uv.c )
- s.files += %w( src/core/lib/iomgr/tcp_server_windows.c )
- s.files += %w( src/core/lib/iomgr/tcp_uv.c )
- s.files += %w( src/core/lib/iomgr/tcp_windows.c )
- s.files += %w( src/core/lib/iomgr/time_averaged_stats.c )
- s.files += %w( src/core/lib/iomgr/timer_generic.c )
- s.files += %w( src/core/lib/iomgr/timer_heap.c )
- s.files += %w( src/core/lib/iomgr/timer_manager.c )
- s.files += %w( src/core/lib/iomgr/timer_uv.c )
- s.files += %w( src/core/lib/iomgr/udp_server.c )
- s.files += %w( src/core/lib/iomgr/unix_sockets_posix.c )
- s.files += %w( src/core/lib/iomgr/unix_sockets_posix_noop.c )
- s.files += %w( src/core/lib/iomgr/wakeup_fd_cv.c )
- s.files += %w( src/core/lib/iomgr/wakeup_fd_eventfd.c )
- s.files += %w( src/core/lib/iomgr/wakeup_fd_nospecial.c )
- s.files += %w( src/core/lib/iomgr/wakeup_fd_pipe.c )
- s.files += %w( src/core/lib/iomgr/wakeup_fd_posix.c )
- s.files += %w( src/core/lib/json/json.c )
- s.files += %w( src/core/lib/json/json_reader.c )
- s.files += %w( src/core/lib/json/json_string.c )
- s.files += %w( src/core/lib/json/json_writer.c )
- s.files += %w( src/core/lib/slice/b64.c )
- s.files += %w( src/core/lib/slice/percent_encoding.c )
- s.files += %w( src/core/lib/slice/slice.c )
- s.files += %w( src/core/lib/slice/slice_buffer.c )
- s.files += %w( src/core/lib/slice/slice_hash_table.c )
- s.files += %w( src/core/lib/slice/slice_intern.c )
- s.files += %w( src/core/lib/slice/slice_string_helpers.c )
- s.files += %w( src/core/lib/surface/alarm.c )
- s.files += %w( src/core/lib/surface/api_trace.c )
- s.files += %w( src/core/lib/surface/byte_buffer.c )
- s.files += %w( src/core/lib/surface/byte_buffer_reader.c )
- s.files += %w( src/core/lib/surface/call.c )
- s.files += %w( src/core/lib/surface/call_details.c )
- s.files += %w( src/core/lib/surface/call_log_batch.c )
- s.files += %w( src/core/lib/surface/channel.c )
- s.files += %w( src/core/lib/surface/channel_init.c )
- s.files += %w( src/core/lib/surface/channel_ping.c )
- s.files += %w( src/core/lib/surface/channel_stack_type.c )
- s.files += %w( src/core/lib/surface/completion_queue.c )
- s.files += %w( src/core/lib/surface/completion_queue_factory.c )
- s.files += %w( src/core/lib/surface/event_string.c )
+ s.files += %w( src/core/lib/surface/init.cc )
+ s.files += %w( src/core/lib/backoff/backoff.cc )
+ s.files += %w( src/core/lib/channel/channel_args.cc )
+ s.files += %w( src/core/lib/channel/channel_stack.cc )
+ s.files += %w( src/core/lib/channel/channel_stack_builder.cc )
+ s.files += %w( src/core/lib/channel/connected_channel.cc )
+ s.files += %w( src/core/lib/channel/handshaker.cc )
+ 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/message_compress.cc )
+ s.files += %w( src/core/lib/compression/stream_compression.cc )
+ s.files += %w( src/core/lib/compression/stream_compression_gzip.cc )
+ s.files += %w( src/core/lib/compression/stream_compression_identity.cc )
+ s.files += %w( src/core/lib/debug/stats.cc )
+ s.files += %w( src/core/lib/debug/stats_data.cc )
+ s.files += %w( src/core/lib/http/format_request.cc )
+ s.files += %w( src/core/lib/http/httpcli.cc )
+ s.files += %w( src/core/lib/http/parser.cc )
+ s.files += %w( src/core/lib/iomgr/call_combiner.cc )
+ s.files += %w( src/core/lib/iomgr/closure.cc )
+ s.files += %w( src/core/lib/iomgr/combiner.cc )
+ s.files += %w( src/core/lib/iomgr/endpoint.cc )
+ s.files += %w( src/core/lib/iomgr/endpoint_pair_posix.cc )
+ s.files += %w( src/core/lib/iomgr/endpoint_pair_uv.cc )
+ s.files += %w( src/core/lib/iomgr/endpoint_pair_windows.cc )
+ s.files += %w( src/core/lib/iomgr/error.cc )
+ s.files += %w( src/core/lib/iomgr/ev_epoll1_linux.cc )
+ s.files += %w( src/core/lib/iomgr/ev_epollex_linux.cc )
+ s.files += %w( src/core/lib/iomgr/ev_epollsig_linux.cc )
+ s.files += %w( src/core/lib/iomgr/ev_poll_posix.cc )
+ s.files += %w( src/core/lib/iomgr/ev_posix.cc )
+ s.files += %w( src/core/lib/iomgr/ev_windows.cc )
+ s.files += %w( src/core/lib/iomgr/exec_ctx.cc )
+ s.files += %w( src/core/lib/iomgr/executor.cc )
+ s.files += %w( src/core/lib/iomgr/gethostname_fallback.cc )
+ s.files += %w( src/core/lib/iomgr/gethostname_host_name_max.cc )
+ s.files += %w( src/core/lib/iomgr/gethostname_sysconf.cc )
+ s.files += %w( src/core/lib/iomgr/iocp_windows.cc )
+ s.files += %w( src/core/lib/iomgr/iomgr.cc )
+ s.files += %w( src/core/lib/iomgr/iomgr_posix.cc )
+ s.files += %w( src/core/lib/iomgr/iomgr_uv.cc )
+ s.files += %w( src/core/lib/iomgr/iomgr_windows.cc )
+ s.files += %w( src/core/lib/iomgr/is_epollexclusive_available.cc )
+ s.files += %w( src/core/lib/iomgr/load_file.cc )
+ s.files += %w( src/core/lib/iomgr/lockfree_event.cc )
+ s.files += %w( src/core/lib/iomgr/network_status_tracker.cc )
+ s.files += %w( src/core/lib/iomgr/polling_entity.cc )
+ s.files += %w( src/core/lib/iomgr/pollset_set_uv.cc )
+ s.files += %w( src/core/lib/iomgr/pollset_set_windows.cc )
+ s.files += %w( src/core/lib/iomgr/pollset_uv.cc )
+ s.files += %w( src/core/lib/iomgr/pollset_windows.cc )
+ s.files += %w( src/core/lib/iomgr/resolve_address_posix.cc )
+ s.files += %w( src/core/lib/iomgr/resolve_address_uv.cc )
+ s.files += %w( src/core/lib/iomgr/resolve_address_windows.cc )
+ s.files += %w( src/core/lib/iomgr/resource_quota.cc )
+ s.files += %w( src/core/lib/iomgr/sockaddr_utils.cc )
+ s.files += %w( src/core/lib/iomgr/socket_factory_posix.cc )
+ s.files += %w( src/core/lib/iomgr/socket_mutator.cc )
+ s.files += %w( src/core/lib/iomgr/socket_utils_common_posix.cc )
+ s.files += %w( src/core/lib/iomgr/socket_utils_linux.cc )
+ s.files += %w( src/core/lib/iomgr/socket_utils_posix.cc )
+ s.files += %w( src/core/lib/iomgr/socket_utils_uv.cc )
+ s.files += %w( src/core/lib/iomgr/socket_utils_windows.cc )
+ s.files += %w( src/core/lib/iomgr/socket_windows.cc )
+ s.files += %w( src/core/lib/iomgr/tcp_client_posix.cc )
+ s.files += %w( src/core/lib/iomgr/tcp_client_uv.cc )
+ s.files += %w( src/core/lib/iomgr/tcp_client_windows.cc )
+ s.files += %w( src/core/lib/iomgr/tcp_posix.cc )
+ s.files += %w( src/core/lib/iomgr/tcp_server_posix.cc )
+ s.files += %w( src/core/lib/iomgr/tcp_server_utils_posix_common.cc )
+ s.files += %w( src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc )
+ s.files += %w( src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc )
+ s.files += %w( src/core/lib/iomgr/tcp_server_uv.cc )
+ s.files += %w( src/core/lib/iomgr/tcp_server_windows.cc )
+ s.files += %w( src/core/lib/iomgr/tcp_uv.cc )
+ s.files += %w( src/core/lib/iomgr/tcp_windows.cc )
+ s.files += %w( src/core/lib/iomgr/time_averaged_stats.cc )
+ s.files += %w( src/core/lib/iomgr/timer_generic.cc )
+ s.files += %w( src/core/lib/iomgr/timer_heap.cc )
+ s.files += %w( src/core/lib/iomgr/timer_manager.cc )
+ s.files += %w( src/core/lib/iomgr/timer_uv.cc )
+ s.files += %w( src/core/lib/iomgr/udp_server.cc )
+ s.files += %w( src/core/lib/iomgr/unix_sockets_posix.cc )
+ s.files += %w( src/core/lib/iomgr/unix_sockets_posix_noop.cc )
+ s.files += %w( src/core/lib/iomgr/wakeup_fd_cv.cc )
+ s.files += %w( src/core/lib/iomgr/wakeup_fd_eventfd.cc )
+ s.files += %w( src/core/lib/iomgr/wakeup_fd_nospecial.cc )
+ s.files += %w( src/core/lib/iomgr/wakeup_fd_pipe.cc )
+ s.files += %w( src/core/lib/iomgr/wakeup_fd_posix.cc )
+ s.files += %w( src/core/lib/json/json.cc )
+ s.files += %w( src/core/lib/json/json_reader.cc )
+ s.files += %w( src/core/lib/json/json_string.cc )
+ s.files += %w( src/core/lib/json/json_writer.cc )
+ s.files += %w( src/core/lib/slice/b64.cc )
+ s.files += %w( src/core/lib/slice/percent_encoding.cc )
+ s.files += %w( src/core/lib/slice/slice.cc )
+ s.files += %w( src/core/lib/slice/slice_buffer.cc )
+ s.files += %w( src/core/lib/slice/slice_hash_table.cc )
+ s.files += %w( src/core/lib/slice/slice_intern.cc )
+ s.files += %w( src/core/lib/slice/slice_string_helpers.cc )
+ s.files += %w( src/core/lib/surface/alarm.cc )
+ s.files += %w( src/core/lib/surface/api_trace.cc )
+ s.files += %w( src/core/lib/surface/byte_buffer.cc )
+ s.files += %w( src/core/lib/surface/byte_buffer_reader.cc )
+ s.files += %w( src/core/lib/surface/call.cc )
+ s.files += %w( src/core/lib/surface/call_details.cc )
+ s.files += %w( src/core/lib/surface/call_log_batch.cc )
+ s.files += %w( src/core/lib/surface/channel.cc )
+ s.files += %w( src/core/lib/surface/channel_init.cc )
+ s.files += %w( src/core/lib/surface/channel_ping.cc )
+ s.files += %w( src/core/lib/surface/channel_stack_type.cc )
+ s.files += %w( src/core/lib/surface/completion_queue.cc )
+ s.files += %w( src/core/lib/surface/completion_queue_factory.cc )
+ s.files += %w( src/core/lib/surface/event_string.cc )
s.files += %w( src/core/lib/surface/lame_client.cc )
- s.files += %w( src/core/lib/surface/metadata_array.c )
- s.files += %w( src/core/lib/surface/server.c )
- s.files += %w( src/core/lib/surface/validate_metadata.c )
- s.files += %w( src/core/lib/surface/version.c )
- s.files += %w( src/core/lib/transport/bdp_estimator.c )
- s.files += %w( src/core/lib/transport/byte_stream.c )
- s.files += %w( src/core/lib/transport/connectivity_state.c )
- s.files += %w( src/core/lib/transport/error_utils.c )
- s.files += %w( src/core/lib/transport/metadata.c )
- s.files += %w( src/core/lib/transport/metadata_batch.c )
- s.files += %w( src/core/lib/transport/pid_controller.c )
- s.files += %w( src/core/lib/transport/service_config.c )
- s.files += %w( src/core/lib/transport/static_metadata.c )
- s.files += %w( src/core/lib/transport/status_conversion.c )
- s.files += %w( src/core/lib/transport/timeout_encoding.c )
- s.files += %w( src/core/lib/transport/transport.c )
- s.files += %w( src/core/lib/transport/transport_op_string.c )
- s.files += %w( src/core/lib/debug/trace.c )
- s.files += %w( src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/bin_decoder.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/bin_encoder.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_plugin.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_transport.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/flow_control.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/frame_data.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/frame_goaway.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/frame_ping.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/frame_rst_stream.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/frame_settings.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/frame_window_update.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/hpack_encoder.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/hpack_parser.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/hpack_table.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/http2_settings.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/huffsyms.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/incoming_metadata.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/parsing.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/stream_lists.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/stream_map.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/varint.c )
- s.files += %w( src/core/ext/transport/chttp2/transport/writing.c )
- s.files += %w( src/core/ext/transport/chttp2/alpn/alpn.c )
- s.files += %w( src/core/ext/filters/http/client/http_client_filter.c )
- s.files += %w( src/core/ext/filters/http/http_filters_plugin.c )
- s.files += %w( src/core/ext/filters/http/message_compress/message_compress_filter.c )
- s.files += %w( src/core/ext/filters/http/server/http_server_filter.c )
- s.files += %w( src/core/lib/http/httpcli_security_connector.c )
- s.files += %w( src/core/lib/security/context/security_context.c )
- s.files += %w( src/core/lib/security/credentials/composite/composite_credentials.c )
- s.files += %w( src/core/lib/security/credentials/credentials.c )
- s.files += %w( src/core/lib/security/credentials/credentials_metadata.c )
- s.files += %w( src/core/lib/security/credentials/fake/fake_credentials.c )
- s.files += %w( src/core/lib/security/credentials/google_default/credentials_generic.c )
- s.files += %w( src/core/lib/security/credentials/google_default/google_default_credentials.c )
- s.files += %w( src/core/lib/security/credentials/iam/iam_credentials.c )
- s.files += %w( src/core/lib/security/credentials/jwt/json_token.c )
- s.files += %w( src/core/lib/security/credentials/jwt/jwt_credentials.c )
- s.files += %w( src/core/lib/security/credentials/jwt/jwt_verifier.c )
- s.files += %w( src/core/lib/security/credentials/oauth2/oauth2_credentials.c )
- s.files += %w( src/core/lib/security/credentials/plugin/plugin_credentials.c )
- s.files += %w( src/core/lib/security/credentials/ssl/ssl_credentials.c )
- s.files += %w( src/core/lib/security/transport/client_auth_filter.c )
- s.files += %w( src/core/lib/security/transport/lb_targets_info.c )
- s.files += %w( src/core/lib/security/transport/secure_endpoint.c )
- s.files += %w( src/core/lib/security/transport/security_connector.c )
- s.files += %w( src/core/lib/security/transport/security_handshaker.c )
- s.files += %w( src/core/lib/security/transport/server_auth_filter.c )
- s.files += %w( src/core/lib/security/transport/tsi_error.c )
- s.files += %w( src/core/lib/security/util/json_util.c )
- s.files += %w( src/core/lib/surface/init_secure.c )
- s.files += %w( src/core/tsi/fake_transport_security.c )
- s.files += %w( src/core/tsi/gts_transport_security.c )
- s.files += %w( src/core/tsi/ssl_transport_security.c )
- s.files += %w( src/core/tsi/transport_security_grpc.c )
- s.files += %w( src/core/tsi/transport_security.c )
- s.files += %w( src/core/tsi/transport_security_adapter.c )
- s.files += %w( src/core/ext/transport/chttp2/server/chttp2_server.c )
- s.files += %w( src/core/ext/transport/chttp2/client/secure/secure_channel_create.c )
- s.files += %w( src/core/ext/filters/client_channel/channel_connectivity.c )
- s.files += %w( src/core/ext/filters/client_channel/client_channel.c )
- s.files += %w( src/core/ext/filters/client_channel/client_channel_factory.c )
- s.files += %w( src/core/ext/filters/client_channel/client_channel_plugin.c )
- s.files += %w( src/core/ext/filters/client_channel/connector.c )
- s.files += %w( src/core/ext/filters/client_channel/http_connect_handshaker.c )
- s.files += %w( src/core/ext/filters/client_channel/http_proxy.c )
- s.files += %w( src/core/ext/filters/client_channel/lb_policy.c )
- s.files += %w( src/core/ext/filters/client_channel/lb_policy_factory.c )
- s.files += %w( src/core/ext/filters/client_channel/lb_policy_registry.c )
- s.files += %w( src/core/ext/filters/client_channel/parse_address.c )
- s.files += %w( src/core/ext/filters/client_channel/proxy_mapper.c )
- s.files += %w( src/core/ext/filters/client_channel/proxy_mapper_registry.c )
- s.files += %w( src/core/ext/filters/client_channel/resolver.c )
- s.files += %w( src/core/ext/filters/client_channel/resolver_factory.c )
- s.files += %w( src/core/ext/filters/client_channel/resolver_registry.c )
- s.files += %w( src/core/ext/filters/client_channel/retry_throttle.c )
- s.files += %w( src/core/ext/filters/client_channel/subchannel.c )
- s.files += %w( src/core/ext/filters/client_channel/subchannel_index.c )
- s.files += %w( src/core/ext/filters/client_channel/uri_parser.c )
- s.files += %w( src/core/ext/filters/deadline/deadline_filter.c )
- s.files += %w( src/core/ext/transport/chttp2/client/chttp2_connector.c )
- s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2.c )
- s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c )
- s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.c )
- s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c )
- s.files += %w( src/core/ext/transport/inproc/inproc_plugin.c )
- s.files += %w( src/core/ext/transport/inproc/inproc_transport.c )
- s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c )
- s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c )
- s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c )
- s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c )
- s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c )
+ s.files += %w( src/core/lib/surface/metadata_array.cc )
+ s.files += %w( src/core/lib/surface/server.cc )
+ s.files += %w( src/core/lib/surface/validate_metadata.cc )
+ s.files += %w( src/core/lib/surface/version.cc )
+ s.files += %w( src/core/lib/transport/bdp_estimator.cc )
+ s.files += %w( src/core/lib/transport/byte_stream.cc )
+ s.files += %w( src/core/lib/transport/connectivity_state.cc )
+ s.files += %w( src/core/lib/transport/error_utils.cc )
+ s.files += %w( src/core/lib/transport/metadata.cc )
+ s.files += %w( src/core/lib/transport/metadata_batch.cc )
+ s.files += %w( src/core/lib/transport/pid_controller.cc )
+ s.files += %w( src/core/lib/transport/service_config.cc )
+ s.files += %w( src/core/lib/transport/static_metadata.cc )
+ s.files += %w( src/core/lib/transport/status_conversion.cc )
+ s.files += %w( src/core/lib/transport/timeout_encoding.cc )
+ s.files += %w( src/core/lib/transport/transport.cc )
+ s.files += %w( src/core/lib/transport/transport_op_string.cc )
+ s.files += %w( src/core/lib/debug/trace.cc )
+ s.files += %w( src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/bin_decoder.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/bin_encoder.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_plugin.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_transport.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/flow_control.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/frame_data.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/frame_goaway.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/frame_ping.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/frame_rst_stream.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/frame_settings.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/frame_window_update.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/hpack_encoder.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/hpack_parser.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/hpack_table.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/http2_settings.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/huffsyms.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/incoming_metadata.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/parsing.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/stream_lists.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/stream_map.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/varint.cc )
+ s.files += %w( src/core/ext/transport/chttp2/transport/writing.cc )
+ s.files += %w( src/core/ext/transport/chttp2/alpn/alpn.cc )
+ s.files += %w( src/core/ext/filters/http/client/http_client_filter.cc )
+ s.files += %w( src/core/ext/filters/http/http_filters_plugin.cc )
+ s.files += %w( src/core/ext/filters/http/message_compress/message_compress_filter.cc )
+ s.files += %w( src/core/ext/filters/http/server/http_server_filter.cc )
+ s.files += %w( src/core/lib/http/httpcli_security_connector.cc )
+ s.files += %w( src/core/lib/security/context/security_context.cc )
+ s.files += %w( src/core/lib/security/credentials/composite/composite_credentials.cc )
+ s.files += %w( src/core/lib/security/credentials/credentials.cc )
+ s.files += %w( src/core/lib/security/credentials/credentials_metadata.cc )
+ s.files += %w( src/core/lib/security/credentials/fake/fake_credentials.cc )
+ s.files += %w( src/core/lib/security/credentials/google_default/credentials_generic.cc )
+ s.files += %w( src/core/lib/security/credentials/google_default/google_default_credentials.cc )
+ s.files += %w( src/core/lib/security/credentials/iam/iam_credentials.cc )
+ s.files += %w( src/core/lib/security/credentials/jwt/json_token.cc )
+ s.files += %w( src/core/lib/security/credentials/jwt/jwt_credentials.cc )
+ s.files += %w( src/core/lib/security/credentials/jwt/jwt_verifier.cc )
+ s.files += %w( src/core/lib/security/credentials/oauth2/oauth2_credentials.cc )
+ s.files += %w( src/core/lib/security/credentials/plugin/plugin_credentials.cc )
+ s.files += %w( src/core/lib/security/credentials/ssl/ssl_credentials.cc )
+ s.files += %w( src/core/lib/security/transport/client_auth_filter.cc )
+ s.files += %w( src/core/lib/security/transport/lb_targets_info.cc )
+ s.files += %w( src/core/lib/security/transport/secure_endpoint.cc )
+ s.files += %w( src/core/lib/security/transport/security_connector.cc )
+ s.files += %w( src/core/lib/security/transport/security_handshaker.cc )
+ s.files += %w( src/core/lib/security/transport/server_auth_filter.cc )
+ 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/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 )
+ s.files += %w( src/core/tsi/transport_security_adapter.cc )
+ s.files += %w( src/core/ext/transport/chttp2/server/chttp2_server.cc )
+ s.files += %w( src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc )
+ s.files += %w( src/core/ext/filters/client_channel/channel_connectivity.cc )
+ s.files += %w( src/core/ext/filters/client_channel/client_channel.cc )
+ s.files += %w( src/core/ext/filters/client_channel/client_channel_factory.cc )
+ s.files += %w( src/core/ext/filters/client_channel/client_channel_plugin.cc )
+ s.files += %w( src/core/ext/filters/client_channel/connector.cc )
+ s.files += %w( src/core/ext/filters/client_channel/http_connect_handshaker.cc )
+ s.files += %w( src/core/ext/filters/client_channel/http_proxy.cc )
+ s.files += %w( src/core/ext/filters/client_channel/lb_policy.cc )
+ s.files += %w( src/core/ext/filters/client_channel/lb_policy_factory.cc )
+ s.files += %w( src/core/ext/filters/client_channel/lb_policy_registry.cc )
+ s.files += %w( src/core/ext/filters/client_channel/parse_address.cc )
+ s.files += %w( src/core/ext/filters/client_channel/proxy_mapper.cc )
+ s.files += %w( src/core/ext/filters/client_channel/proxy_mapper_registry.cc )
+ s.files += %w( src/core/ext/filters/client_channel/resolver.cc )
+ s.files += %w( src/core/ext/filters/client_channel/resolver_factory.cc )
+ s.files += %w( src/core/ext/filters/client_channel/resolver_registry.cc )
+ s.files += %w( src/core/ext/filters/client_channel/retry_throttle.cc )
+ s.files += %w( src/core/ext/filters/client_channel/subchannel.cc )
+ s.files += %w( src/core/ext/filters/client_channel/subchannel_index.cc )
+ s.files += %w( src/core/ext/filters/client_channel/uri_parser.cc )
+ s.files += %w( src/core/ext/filters/deadline/deadline_filter.cc )
+ s.files += %w( src/core/ext/transport/chttp2/client/chttp2_connector.cc )
+ s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc )
+ s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc )
+ s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.cc )
+ s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc )
+ s.files += %w( src/core/ext/transport/inproc/inproc_plugin.cc )
+ s.files += %w( src/core/ext/transport/inproc/inproc_transport.cc )
+ s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc )
+ s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc )
+ s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc )
+ s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc )
+ s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc )
s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c )
s.files += %w( third_party/nanopb/pb_common.c )
s.files += %w( third_party/nanopb/pb_decode.c )
s.files += %w( third_party/nanopb/pb_encode.c )
- s.files += %w( src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c )
- s.files += %w( src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c )
- s.files += %w( src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c )
- s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c )
- s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c )
- s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c )
- s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c )
- s.files += %w( src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c )
- s.files += %w( src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c )
- s.files += %w( src/core/ext/filters/load_reporting/server_load_reporting_filter.c )
- s.files += %w( src/core/ext/filters/load_reporting/server_load_reporting_plugin.c )
- s.files += %w( src/core/ext/census/base_resources.c )
- s.files += %w( src/core/ext/census/context.c )
+ s.files += %w( src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc )
+ s.files += %w( src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc )
+ s.files += %w( src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc )
+ s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc )
+ s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc )
+ s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc )
+ s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc )
+ s.files += %w( src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc )
+ s.files += %w( src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc )
+ s.files += %w( src/core/ext/filters/load_reporting/server_load_reporting_filter.cc )
+ s.files += %w( src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc )
+ s.files += %w( src/core/ext/census/base_resources.cc )
+ s.files += %w( src/core/ext/census/context.cc )
s.files += %w( src/core/ext/census/gen/census.pb.c )
s.files += %w( src/core/ext/census/gen/trace_context.pb.c )
- s.files += %w( src/core/ext/census/grpc_context.c )
- s.files += %w( src/core/ext/census/grpc_filter.c )
- s.files += %w( src/core/ext/census/grpc_plugin.c )
- s.files += %w( src/core/ext/census/initialize.c )
- s.files += %w( src/core/ext/census/intrusive_hash_map.c )
- s.files += %w( src/core/ext/census/mlog.c )
- s.files += %w( src/core/ext/census/operation.c )
- s.files += %w( src/core/ext/census/placeholders.c )
- s.files += %w( src/core/ext/census/resource.c )
- s.files += %w( src/core/ext/census/trace_context.c )
- s.files += %w( src/core/ext/census/tracing.c )
- s.files += %w( src/core/ext/filters/max_age/max_age_filter.c )
- s.files += %w( src/core/ext/filters/message_size/message_size_filter.c )
- s.files += %w( src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c )
- s.files += %w( src/core/ext/filters/workarounds/workaround_utils.c )
- s.files += %w( src/core/plugin_registry/grpc_plugin_registry.c )
+ s.files += %w( src/core/ext/census/grpc_context.cc )
+ s.files += %w( src/core/ext/census/grpc_filter.cc )
+ s.files += %w( src/core/ext/census/grpc_plugin.cc )
+ s.files += %w( src/core/ext/census/initialize.cc )
+ s.files += %w( src/core/ext/census/intrusive_hash_map.cc )
+ s.files += %w( src/core/ext/census/mlog.cc )
+ s.files += %w( src/core/ext/census/operation.cc )
+ s.files += %w( src/core/ext/census/placeholders.cc )
+ s.files += %w( src/core/ext/census/resource.cc )
+ s.files += %w( src/core/ext/census/trace_context.cc )
+ s.files += %w( src/core/ext/census/tracing.cc )
+ s.files += %w( src/core/ext/filters/max_age/max_age_filter.cc )
+ s.files += %w( src/core/ext/filters/message_size/message_size_filter.cc )
+ 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 )
diff --git a/grpc.gyp b/grpc.gyp
index 2cad4a7bbc..14eecdd185 100644
--- a/grpc.gyp
+++ b/grpc.gyp
@@ -98,6 +98,7 @@
'-fprofile-arcs',
'-ftest-coverage',
'-rdynamic',
+ '-lstdc++',
],
}],
['grpc_alpine=="true"', {
@@ -157,52 +158,51 @@
'dependencies': [
],
'sources': [
- 'src/core/lib/profiling/basic_timers.c',
- 'src/core/lib/profiling/stap_timers.c',
- 'src/core/lib/support/alloc.c',
- 'src/core/lib/support/arena.c',
- 'src/core/lib/support/atm.c',
- 'src/core/lib/support/avl.c',
- 'src/core/lib/support/backoff.c',
- 'src/core/lib/support/cmdline.c',
- 'src/core/lib/support/cpu_iphone.c',
- 'src/core/lib/support/cpu_linux.c',
- 'src/core/lib/support/cpu_posix.c',
- 'src/core/lib/support/cpu_windows.c',
- 'src/core/lib/support/env_linux.c',
- 'src/core/lib/support/env_posix.c',
- 'src/core/lib/support/env_windows.c',
- 'src/core/lib/support/histogram.c',
- 'src/core/lib/support/host_port.c',
- 'src/core/lib/support/log.c',
- 'src/core/lib/support/log_android.c',
- 'src/core/lib/support/log_linux.c',
- 'src/core/lib/support/log_posix.c',
- 'src/core/lib/support/log_windows.c',
- 'src/core/lib/support/mpscq.c',
- 'src/core/lib/support/murmur_hash.c',
- 'src/core/lib/support/stack_lockfree.c',
- 'src/core/lib/support/string.c',
- 'src/core/lib/support/string_posix.c',
- 'src/core/lib/support/string_util_windows.c',
- 'src/core/lib/support/string_windows.c',
- 'src/core/lib/support/subprocess_posix.c',
- 'src/core/lib/support/subprocess_windows.c',
- 'src/core/lib/support/sync.c',
- 'src/core/lib/support/sync_posix.c',
- 'src/core/lib/support/sync_windows.c',
- 'src/core/lib/support/thd.c',
- 'src/core/lib/support/thd_posix.c',
- 'src/core/lib/support/thd_windows.c',
- 'src/core/lib/support/time.c',
- 'src/core/lib/support/time_posix.c',
- 'src/core/lib/support/time_precise.c',
- 'src/core/lib/support/time_windows.c',
- 'src/core/lib/support/tls_pthread.c',
- 'src/core/lib/support/tmpfile_msys.c',
- 'src/core/lib/support/tmpfile_posix.c',
- 'src/core/lib/support/tmpfile_windows.c',
- 'src/core/lib/support/wrap_memcpy.c',
+ 'src/core/lib/profiling/basic_timers.cc',
+ 'src/core/lib/profiling/stap_timers.cc',
+ 'src/core/lib/support/alloc.cc',
+ 'src/core/lib/support/arena.cc',
+ 'src/core/lib/support/atm.cc',
+ 'src/core/lib/support/avl.cc',
+ 'src/core/lib/support/cmdline.cc',
+ 'src/core/lib/support/cpu_iphone.cc',
+ 'src/core/lib/support/cpu_linux.cc',
+ 'src/core/lib/support/cpu_posix.cc',
+ 'src/core/lib/support/cpu_windows.cc',
+ 'src/core/lib/support/env_linux.cc',
+ 'src/core/lib/support/env_posix.cc',
+ 'src/core/lib/support/env_windows.cc',
+ 'src/core/lib/support/histogram.cc',
+ 'src/core/lib/support/host_port.cc',
+ 'src/core/lib/support/log.cc',
+ 'src/core/lib/support/log_android.cc',
+ 'src/core/lib/support/log_linux.cc',
+ 'src/core/lib/support/log_posix.cc',
+ 'src/core/lib/support/log_windows.cc',
+ 'src/core/lib/support/mpscq.cc',
+ 'src/core/lib/support/murmur_hash.cc',
+ 'src/core/lib/support/stack_lockfree.cc',
+ 'src/core/lib/support/string.cc',
+ 'src/core/lib/support/string_posix.cc',
+ 'src/core/lib/support/string_util_windows.cc',
+ 'src/core/lib/support/string_windows.cc',
+ 'src/core/lib/support/subprocess_posix.cc',
+ 'src/core/lib/support/subprocess_windows.cc',
+ 'src/core/lib/support/sync.cc',
+ 'src/core/lib/support/sync_posix.cc',
+ 'src/core/lib/support/sync_windows.cc',
+ 'src/core/lib/support/thd.cc',
+ 'src/core/lib/support/thd_posix.cc',
+ 'src/core/lib/support/thd_windows.cc',
+ 'src/core/lib/support/time.cc',
+ 'src/core/lib/support/time_posix.cc',
+ 'src/core/lib/support/time_precise.cc',
+ 'src/core/lib/support/time_windows.cc',
+ 'src/core/lib/support/tls_pthread.cc',
+ 'src/core/lib/support/tmpfile_msys.cc',
+ 'src/core/lib/support/tmpfile_posix.cc',
+ 'src/core/lib/support/tmpfile_windows.cc',
+ 'src/core/lib/support/wrap_memcpy.cc',
],
},
{
@@ -222,268 +222,269 @@
'gpr',
],
'sources': [
- 'src/core/lib/surface/init.c',
- 'src/core/lib/channel/channel_args.c',
- 'src/core/lib/channel/channel_stack.c',
- 'src/core/lib/channel/channel_stack_builder.c',
- 'src/core/lib/channel/connected_channel.c',
- 'src/core/lib/channel/handshaker.c',
- 'src/core/lib/channel/handshaker_factory.c',
- 'src/core/lib/channel/handshaker_registry.c',
- 'src/core/lib/compression/compression.c',
- 'src/core/lib/compression/compression_internal.c',
- 'src/core/lib/compression/message_compress.c',
- 'src/core/lib/compression/stream_compression.c',
- 'src/core/lib/compression/stream_compression_gzip.c',
- 'src/core/lib/compression/stream_compression_identity.c',
- 'src/core/lib/debug/stats.c',
- 'src/core/lib/debug/stats_data.c',
- 'src/core/lib/http/format_request.c',
- 'src/core/lib/http/httpcli.c',
- 'src/core/lib/http/parser.c',
- 'src/core/lib/iomgr/call_combiner.c',
- 'src/core/lib/iomgr/closure.c',
- 'src/core/lib/iomgr/combiner.c',
- 'src/core/lib/iomgr/endpoint.c',
- 'src/core/lib/iomgr/endpoint_pair_posix.c',
- 'src/core/lib/iomgr/endpoint_pair_uv.c',
- 'src/core/lib/iomgr/endpoint_pair_windows.c',
- 'src/core/lib/iomgr/error.c',
- 'src/core/lib/iomgr/ev_epoll1_linux.c',
- 'src/core/lib/iomgr/ev_epollex_linux.c',
- 'src/core/lib/iomgr/ev_epollsig_linux.c',
- 'src/core/lib/iomgr/ev_poll_posix.c',
- 'src/core/lib/iomgr/ev_posix.c',
- 'src/core/lib/iomgr/ev_windows.c',
- 'src/core/lib/iomgr/exec_ctx.c',
- 'src/core/lib/iomgr/executor.c',
- 'src/core/lib/iomgr/gethostname_fallback.c',
- 'src/core/lib/iomgr/gethostname_host_name_max.c',
- 'src/core/lib/iomgr/gethostname_sysconf.c',
- 'src/core/lib/iomgr/iocp_windows.c',
- 'src/core/lib/iomgr/iomgr.c',
- 'src/core/lib/iomgr/iomgr_posix.c',
- 'src/core/lib/iomgr/iomgr_uv.c',
- 'src/core/lib/iomgr/iomgr_windows.c',
- 'src/core/lib/iomgr/is_epollexclusive_available.c',
- 'src/core/lib/iomgr/load_file.c',
- 'src/core/lib/iomgr/lockfree_event.c',
- 'src/core/lib/iomgr/network_status_tracker.c',
- 'src/core/lib/iomgr/polling_entity.c',
- 'src/core/lib/iomgr/pollset_set_uv.c',
- 'src/core/lib/iomgr/pollset_set_windows.c',
- 'src/core/lib/iomgr/pollset_uv.c',
- 'src/core/lib/iomgr/pollset_windows.c',
- 'src/core/lib/iomgr/resolve_address_posix.c',
- 'src/core/lib/iomgr/resolve_address_uv.c',
- 'src/core/lib/iomgr/resolve_address_windows.c',
- 'src/core/lib/iomgr/resource_quota.c',
- 'src/core/lib/iomgr/sockaddr_utils.c',
- 'src/core/lib/iomgr/socket_factory_posix.c',
- 'src/core/lib/iomgr/socket_mutator.c',
- 'src/core/lib/iomgr/socket_utils_common_posix.c',
- 'src/core/lib/iomgr/socket_utils_linux.c',
- 'src/core/lib/iomgr/socket_utils_posix.c',
- 'src/core/lib/iomgr/socket_utils_uv.c',
- 'src/core/lib/iomgr/socket_utils_windows.c',
- 'src/core/lib/iomgr/socket_windows.c',
- 'src/core/lib/iomgr/tcp_client_posix.c',
- 'src/core/lib/iomgr/tcp_client_uv.c',
- 'src/core/lib/iomgr/tcp_client_windows.c',
- 'src/core/lib/iomgr/tcp_posix.c',
- 'src/core/lib/iomgr/tcp_server_posix.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_common.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c',
- 'src/core/lib/iomgr/tcp_server_uv.c',
- 'src/core/lib/iomgr/tcp_server_windows.c',
- 'src/core/lib/iomgr/tcp_uv.c',
- 'src/core/lib/iomgr/tcp_windows.c',
- 'src/core/lib/iomgr/time_averaged_stats.c',
- 'src/core/lib/iomgr/timer_generic.c',
- 'src/core/lib/iomgr/timer_heap.c',
- 'src/core/lib/iomgr/timer_manager.c',
- 'src/core/lib/iomgr/timer_uv.c',
- 'src/core/lib/iomgr/udp_server.c',
- 'src/core/lib/iomgr/unix_sockets_posix.c',
- 'src/core/lib/iomgr/unix_sockets_posix_noop.c',
- 'src/core/lib/iomgr/wakeup_fd_cv.c',
- 'src/core/lib/iomgr/wakeup_fd_eventfd.c',
- 'src/core/lib/iomgr/wakeup_fd_nospecial.c',
- 'src/core/lib/iomgr/wakeup_fd_pipe.c',
- 'src/core/lib/iomgr/wakeup_fd_posix.c',
- 'src/core/lib/json/json.c',
- 'src/core/lib/json/json_reader.c',
- 'src/core/lib/json/json_string.c',
- 'src/core/lib/json/json_writer.c',
- 'src/core/lib/slice/b64.c',
- 'src/core/lib/slice/percent_encoding.c',
- 'src/core/lib/slice/slice.c',
- 'src/core/lib/slice/slice_buffer.c',
- 'src/core/lib/slice/slice_hash_table.c',
- 'src/core/lib/slice/slice_intern.c',
- 'src/core/lib/slice/slice_string_helpers.c',
- 'src/core/lib/surface/alarm.c',
- 'src/core/lib/surface/api_trace.c',
- 'src/core/lib/surface/byte_buffer.c',
- 'src/core/lib/surface/byte_buffer_reader.c',
- 'src/core/lib/surface/call.c',
- 'src/core/lib/surface/call_details.c',
- 'src/core/lib/surface/call_log_batch.c',
- 'src/core/lib/surface/channel.c',
- 'src/core/lib/surface/channel_init.c',
- 'src/core/lib/surface/channel_ping.c',
- 'src/core/lib/surface/channel_stack_type.c',
- 'src/core/lib/surface/completion_queue.c',
- 'src/core/lib/surface/completion_queue_factory.c',
- 'src/core/lib/surface/event_string.c',
+ 'src/core/lib/surface/init.cc',
+ 'src/core/lib/backoff/backoff.cc',
+ 'src/core/lib/channel/channel_args.cc',
+ 'src/core/lib/channel/channel_stack.cc',
+ 'src/core/lib/channel/channel_stack_builder.cc',
+ 'src/core/lib/channel/connected_channel.cc',
+ 'src/core/lib/channel/handshaker.cc',
+ '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/message_compress.cc',
+ 'src/core/lib/compression/stream_compression.cc',
+ 'src/core/lib/compression/stream_compression_gzip.cc',
+ 'src/core/lib/compression/stream_compression_identity.cc',
+ 'src/core/lib/debug/stats.cc',
+ 'src/core/lib/debug/stats_data.cc',
+ 'src/core/lib/http/format_request.cc',
+ 'src/core/lib/http/httpcli.cc',
+ 'src/core/lib/http/parser.cc',
+ 'src/core/lib/iomgr/call_combiner.cc',
+ 'src/core/lib/iomgr/closure.cc',
+ 'src/core/lib/iomgr/combiner.cc',
+ 'src/core/lib/iomgr/endpoint.cc',
+ 'src/core/lib/iomgr/endpoint_pair_posix.cc',
+ 'src/core/lib/iomgr/endpoint_pair_uv.cc',
+ 'src/core/lib/iomgr/endpoint_pair_windows.cc',
+ 'src/core/lib/iomgr/error.cc',
+ 'src/core/lib/iomgr/ev_epoll1_linux.cc',
+ 'src/core/lib/iomgr/ev_epollex_linux.cc',
+ 'src/core/lib/iomgr/ev_epollsig_linux.cc',
+ 'src/core/lib/iomgr/ev_poll_posix.cc',
+ 'src/core/lib/iomgr/ev_posix.cc',
+ 'src/core/lib/iomgr/ev_windows.cc',
+ 'src/core/lib/iomgr/exec_ctx.cc',
+ 'src/core/lib/iomgr/executor.cc',
+ 'src/core/lib/iomgr/gethostname_fallback.cc',
+ 'src/core/lib/iomgr/gethostname_host_name_max.cc',
+ 'src/core/lib/iomgr/gethostname_sysconf.cc',
+ 'src/core/lib/iomgr/iocp_windows.cc',
+ 'src/core/lib/iomgr/iomgr.cc',
+ 'src/core/lib/iomgr/iomgr_posix.cc',
+ 'src/core/lib/iomgr/iomgr_uv.cc',
+ 'src/core/lib/iomgr/iomgr_windows.cc',
+ 'src/core/lib/iomgr/is_epollexclusive_available.cc',
+ 'src/core/lib/iomgr/load_file.cc',
+ 'src/core/lib/iomgr/lockfree_event.cc',
+ 'src/core/lib/iomgr/network_status_tracker.cc',
+ 'src/core/lib/iomgr/polling_entity.cc',
+ 'src/core/lib/iomgr/pollset_set_uv.cc',
+ 'src/core/lib/iomgr/pollset_set_windows.cc',
+ 'src/core/lib/iomgr/pollset_uv.cc',
+ 'src/core/lib/iomgr/pollset_windows.cc',
+ 'src/core/lib/iomgr/resolve_address_posix.cc',
+ 'src/core/lib/iomgr/resolve_address_uv.cc',
+ 'src/core/lib/iomgr/resolve_address_windows.cc',
+ 'src/core/lib/iomgr/resource_quota.cc',
+ 'src/core/lib/iomgr/sockaddr_utils.cc',
+ 'src/core/lib/iomgr/socket_factory_posix.cc',
+ 'src/core/lib/iomgr/socket_mutator.cc',
+ 'src/core/lib/iomgr/socket_utils_common_posix.cc',
+ 'src/core/lib/iomgr/socket_utils_linux.cc',
+ 'src/core/lib/iomgr/socket_utils_posix.cc',
+ 'src/core/lib/iomgr/socket_utils_uv.cc',
+ 'src/core/lib/iomgr/socket_utils_windows.cc',
+ 'src/core/lib/iomgr/socket_windows.cc',
+ 'src/core/lib/iomgr/tcp_client_posix.cc',
+ 'src/core/lib/iomgr/tcp_client_uv.cc',
+ 'src/core/lib/iomgr/tcp_client_windows.cc',
+ 'src/core/lib/iomgr/tcp_posix.cc',
+ 'src/core/lib/iomgr/tcp_server_posix.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_common.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
+ 'src/core/lib/iomgr/tcp_server_uv.cc',
+ 'src/core/lib/iomgr/tcp_server_windows.cc',
+ 'src/core/lib/iomgr/tcp_uv.cc',
+ 'src/core/lib/iomgr/tcp_windows.cc',
+ 'src/core/lib/iomgr/time_averaged_stats.cc',
+ 'src/core/lib/iomgr/timer_generic.cc',
+ 'src/core/lib/iomgr/timer_heap.cc',
+ 'src/core/lib/iomgr/timer_manager.cc',
+ 'src/core/lib/iomgr/timer_uv.cc',
+ 'src/core/lib/iomgr/udp_server.cc',
+ 'src/core/lib/iomgr/unix_sockets_posix.cc',
+ 'src/core/lib/iomgr/unix_sockets_posix_noop.cc',
+ 'src/core/lib/iomgr/wakeup_fd_cv.cc',
+ 'src/core/lib/iomgr/wakeup_fd_eventfd.cc',
+ 'src/core/lib/iomgr/wakeup_fd_nospecial.cc',
+ 'src/core/lib/iomgr/wakeup_fd_pipe.cc',
+ 'src/core/lib/iomgr/wakeup_fd_posix.cc',
+ 'src/core/lib/json/json.cc',
+ 'src/core/lib/json/json_reader.cc',
+ 'src/core/lib/json/json_string.cc',
+ 'src/core/lib/json/json_writer.cc',
+ 'src/core/lib/slice/b64.cc',
+ 'src/core/lib/slice/percent_encoding.cc',
+ 'src/core/lib/slice/slice.cc',
+ 'src/core/lib/slice/slice_buffer.cc',
+ 'src/core/lib/slice/slice_hash_table.cc',
+ 'src/core/lib/slice/slice_intern.cc',
+ 'src/core/lib/slice/slice_string_helpers.cc',
+ 'src/core/lib/surface/alarm.cc',
+ 'src/core/lib/surface/api_trace.cc',
+ 'src/core/lib/surface/byte_buffer.cc',
+ 'src/core/lib/surface/byte_buffer_reader.cc',
+ 'src/core/lib/surface/call.cc',
+ 'src/core/lib/surface/call_details.cc',
+ 'src/core/lib/surface/call_log_batch.cc',
+ 'src/core/lib/surface/channel.cc',
+ 'src/core/lib/surface/channel_init.cc',
+ 'src/core/lib/surface/channel_ping.cc',
+ 'src/core/lib/surface/channel_stack_type.cc',
+ 'src/core/lib/surface/completion_queue.cc',
+ 'src/core/lib/surface/completion_queue_factory.cc',
+ 'src/core/lib/surface/event_string.cc',
'src/core/lib/surface/lame_client.cc',
- 'src/core/lib/surface/metadata_array.c',
- 'src/core/lib/surface/server.c',
- 'src/core/lib/surface/validate_metadata.c',
- 'src/core/lib/surface/version.c',
- 'src/core/lib/transport/bdp_estimator.c',
- 'src/core/lib/transport/byte_stream.c',
- 'src/core/lib/transport/connectivity_state.c',
- 'src/core/lib/transport/error_utils.c',
- 'src/core/lib/transport/metadata.c',
- 'src/core/lib/transport/metadata_batch.c',
- 'src/core/lib/transport/pid_controller.c',
- 'src/core/lib/transport/service_config.c',
- 'src/core/lib/transport/static_metadata.c',
- 'src/core/lib/transport/status_conversion.c',
- 'src/core/lib/transport/timeout_encoding.c',
- 'src/core/lib/transport/transport.c',
- 'src/core/lib/transport/transport_op_string.c',
- 'src/core/lib/debug/trace.c',
- 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c',
- 'src/core/ext/transport/chttp2/transport/bin_decoder.c',
- 'src/core/ext/transport/chttp2/transport/bin_encoder.c',
- 'src/core/ext/transport/chttp2/transport/chttp2_plugin.c',
- 'src/core/ext/transport/chttp2/transport/chttp2_transport.c',
- 'src/core/ext/transport/chttp2/transport/flow_control.c',
- 'src/core/ext/transport/chttp2/transport/frame_data.c',
- 'src/core/ext/transport/chttp2/transport/frame_goaway.c',
- 'src/core/ext/transport/chttp2/transport/frame_ping.c',
- 'src/core/ext/transport/chttp2/transport/frame_rst_stream.c',
- 'src/core/ext/transport/chttp2/transport/frame_settings.c',
- 'src/core/ext/transport/chttp2/transport/frame_window_update.c',
- 'src/core/ext/transport/chttp2/transport/hpack_encoder.c',
- 'src/core/ext/transport/chttp2/transport/hpack_parser.c',
- 'src/core/ext/transport/chttp2/transport/hpack_table.c',
- 'src/core/ext/transport/chttp2/transport/http2_settings.c',
- 'src/core/ext/transport/chttp2/transport/huffsyms.c',
- 'src/core/ext/transport/chttp2/transport/incoming_metadata.c',
- 'src/core/ext/transport/chttp2/transport/parsing.c',
- 'src/core/ext/transport/chttp2/transport/stream_lists.c',
- 'src/core/ext/transport/chttp2/transport/stream_map.c',
- 'src/core/ext/transport/chttp2/transport/varint.c',
- 'src/core/ext/transport/chttp2/transport/writing.c',
- 'src/core/ext/transport/chttp2/alpn/alpn.c',
- 'src/core/ext/filters/http/client/http_client_filter.c',
- 'src/core/ext/filters/http/http_filters_plugin.c',
- 'src/core/ext/filters/http/message_compress/message_compress_filter.c',
- 'src/core/ext/filters/http/server/http_server_filter.c',
- 'src/core/lib/http/httpcli_security_connector.c',
- 'src/core/lib/security/context/security_context.c',
- 'src/core/lib/security/credentials/composite/composite_credentials.c',
- 'src/core/lib/security/credentials/credentials.c',
- 'src/core/lib/security/credentials/credentials_metadata.c',
- 'src/core/lib/security/credentials/fake/fake_credentials.c',
- 'src/core/lib/security/credentials/google_default/credentials_generic.c',
- 'src/core/lib/security/credentials/google_default/google_default_credentials.c',
- 'src/core/lib/security/credentials/iam/iam_credentials.c',
- 'src/core/lib/security/credentials/jwt/json_token.c',
- 'src/core/lib/security/credentials/jwt/jwt_credentials.c',
- 'src/core/lib/security/credentials/jwt/jwt_verifier.c',
- 'src/core/lib/security/credentials/oauth2/oauth2_credentials.c',
- 'src/core/lib/security/credentials/plugin/plugin_credentials.c',
- 'src/core/lib/security/credentials/ssl/ssl_credentials.c',
- 'src/core/lib/security/transport/client_auth_filter.c',
- 'src/core/lib/security/transport/lb_targets_info.c',
- 'src/core/lib/security/transport/secure_endpoint.c',
- 'src/core/lib/security/transport/security_connector.c',
- 'src/core/lib/security/transport/security_handshaker.c',
- 'src/core/lib/security/transport/server_auth_filter.c',
- 'src/core/lib/security/transport/tsi_error.c',
- 'src/core/lib/security/util/json_util.c',
- 'src/core/lib/surface/init_secure.c',
- 'src/core/tsi/fake_transport_security.c',
- 'src/core/tsi/gts_transport_security.c',
- 'src/core/tsi/ssl_transport_security.c',
- 'src/core/tsi/transport_security_grpc.c',
- 'src/core/tsi/transport_security.c',
- 'src/core/tsi/transport_security_adapter.c',
- 'src/core/ext/transport/chttp2/server/chttp2_server.c',
- 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c',
- 'src/core/ext/filters/client_channel/channel_connectivity.c',
- 'src/core/ext/filters/client_channel/client_channel.c',
- 'src/core/ext/filters/client_channel/client_channel_factory.c',
- 'src/core/ext/filters/client_channel/client_channel_plugin.c',
- 'src/core/ext/filters/client_channel/connector.c',
- 'src/core/ext/filters/client_channel/http_connect_handshaker.c',
- 'src/core/ext/filters/client_channel/http_proxy.c',
- 'src/core/ext/filters/client_channel/lb_policy.c',
- 'src/core/ext/filters/client_channel/lb_policy_factory.c',
- 'src/core/ext/filters/client_channel/lb_policy_registry.c',
- 'src/core/ext/filters/client_channel/parse_address.c',
- 'src/core/ext/filters/client_channel/proxy_mapper.c',
- 'src/core/ext/filters/client_channel/proxy_mapper_registry.c',
- 'src/core/ext/filters/client_channel/resolver.c',
- 'src/core/ext/filters/client_channel/resolver_factory.c',
- 'src/core/ext/filters/client_channel/resolver_registry.c',
- 'src/core/ext/filters/client_channel/retry_throttle.c',
- 'src/core/ext/filters/client_channel/subchannel.c',
- 'src/core/ext/filters/client_channel/subchannel_index.c',
- 'src/core/ext/filters/client_channel/uri_parser.c',
- 'src/core/ext/filters/deadline/deadline_filter.c',
- 'src/core/ext/transport/chttp2/client/chttp2_connector.c',
- 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c',
- 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c',
- 'src/core/ext/transport/chttp2/client/insecure/channel_create.c',
- 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c',
- 'src/core/ext/transport/inproc/inproc_plugin.c',
- 'src/core/ext/transport/inproc/inproc_transport.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c',
+ 'src/core/lib/surface/metadata_array.cc',
+ 'src/core/lib/surface/server.cc',
+ 'src/core/lib/surface/validate_metadata.cc',
+ 'src/core/lib/surface/version.cc',
+ 'src/core/lib/transport/bdp_estimator.cc',
+ 'src/core/lib/transport/byte_stream.cc',
+ 'src/core/lib/transport/connectivity_state.cc',
+ 'src/core/lib/transport/error_utils.cc',
+ 'src/core/lib/transport/metadata.cc',
+ 'src/core/lib/transport/metadata_batch.cc',
+ 'src/core/lib/transport/pid_controller.cc',
+ 'src/core/lib/transport/service_config.cc',
+ 'src/core/lib/transport/static_metadata.cc',
+ 'src/core/lib/transport/status_conversion.cc',
+ 'src/core/lib/transport/timeout_encoding.cc',
+ 'src/core/lib/transport/transport.cc',
+ 'src/core/lib/transport/transport_op_string.cc',
+ 'src/core/lib/debug/trace.cc',
+ 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc',
+ 'src/core/ext/transport/chttp2/transport/bin_decoder.cc',
+ 'src/core/ext/transport/chttp2/transport/bin_encoder.cc',
+ 'src/core/ext/transport/chttp2/transport/chttp2_plugin.cc',
+ 'src/core/ext/transport/chttp2/transport/chttp2_transport.cc',
+ 'src/core/ext/transport/chttp2/transport/flow_control.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_data.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_goaway.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_ping.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_rst_stream.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_settings.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_window_update.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_encoder.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_parser.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_table.cc',
+ 'src/core/ext/transport/chttp2/transport/http2_settings.cc',
+ 'src/core/ext/transport/chttp2/transport/huffsyms.cc',
+ 'src/core/ext/transport/chttp2/transport/incoming_metadata.cc',
+ 'src/core/ext/transport/chttp2/transport/parsing.cc',
+ 'src/core/ext/transport/chttp2/transport/stream_lists.cc',
+ 'src/core/ext/transport/chttp2/transport/stream_map.cc',
+ 'src/core/ext/transport/chttp2/transport/varint.cc',
+ 'src/core/ext/transport/chttp2/transport/writing.cc',
+ 'src/core/ext/transport/chttp2/alpn/alpn.cc',
+ 'src/core/ext/filters/http/client/http_client_filter.cc',
+ 'src/core/ext/filters/http/http_filters_plugin.cc',
+ 'src/core/ext/filters/http/message_compress/message_compress_filter.cc',
+ 'src/core/ext/filters/http/server/http_server_filter.cc',
+ 'src/core/lib/http/httpcli_security_connector.cc',
+ 'src/core/lib/security/context/security_context.cc',
+ 'src/core/lib/security/credentials/composite/composite_credentials.cc',
+ 'src/core/lib/security/credentials/credentials.cc',
+ 'src/core/lib/security/credentials/credentials_metadata.cc',
+ 'src/core/lib/security/credentials/fake/fake_credentials.cc',
+ 'src/core/lib/security/credentials/google_default/credentials_generic.cc',
+ 'src/core/lib/security/credentials/google_default/google_default_credentials.cc',
+ 'src/core/lib/security/credentials/iam/iam_credentials.cc',
+ 'src/core/lib/security/credentials/jwt/json_token.cc',
+ 'src/core/lib/security/credentials/jwt/jwt_credentials.cc',
+ 'src/core/lib/security/credentials/jwt/jwt_verifier.cc',
+ 'src/core/lib/security/credentials/oauth2/oauth2_credentials.cc',
+ 'src/core/lib/security/credentials/plugin/plugin_credentials.cc',
+ 'src/core/lib/security/credentials/ssl/ssl_credentials.cc',
+ 'src/core/lib/security/transport/client_auth_filter.cc',
+ 'src/core/lib/security/transport/lb_targets_info.cc',
+ 'src/core/lib/security/transport/secure_endpoint.cc',
+ 'src/core/lib/security/transport/security_connector.cc',
+ 'src/core/lib/security/transport/security_handshaker.cc',
+ 'src/core/lib/security/transport/server_auth_filter.cc',
+ '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/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',
+ 'src/core/tsi/transport_security_adapter.cc',
+ 'src/core/ext/transport/chttp2/server/chttp2_server.cc',
+ 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc',
+ 'src/core/ext/filters/client_channel/channel_connectivity.cc',
+ 'src/core/ext/filters/client_channel/client_channel.cc',
+ 'src/core/ext/filters/client_channel/client_channel_factory.cc',
+ 'src/core/ext/filters/client_channel/client_channel_plugin.cc',
+ 'src/core/ext/filters/client_channel/connector.cc',
+ 'src/core/ext/filters/client_channel/http_connect_handshaker.cc',
+ 'src/core/ext/filters/client_channel/http_proxy.cc',
+ 'src/core/ext/filters/client_channel/lb_policy.cc',
+ 'src/core/ext/filters/client_channel/lb_policy_factory.cc',
+ 'src/core/ext/filters/client_channel/lb_policy_registry.cc',
+ 'src/core/ext/filters/client_channel/parse_address.cc',
+ 'src/core/ext/filters/client_channel/proxy_mapper.cc',
+ 'src/core/ext/filters/client_channel/proxy_mapper_registry.cc',
+ 'src/core/ext/filters/client_channel/resolver.cc',
+ 'src/core/ext/filters/client_channel/resolver_factory.cc',
+ 'src/core/ext/filters/client_channel/resolver_registry.cc',
+ 'src/core/ext/filters/client_channel/retry_throttle.cc',
+ 'src/core/ext/filters/client_channel/subchannel.cc',
+ 'src/core/ext/filters/client_channel/subchannel_index.cc',
+ 'src/core/ext/filters/client_channel/uri_parser.cc',
+ 'src/core/ext/filters/deadline/deadline_filter.cc',
+ 'src/core/ext/transport/chttp2/client/chttp2_connector.cc',
+ 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc',
+ 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc',
+ 'src/core/ext/transport/chttp2/client/insecure/channel_create.cc',
+ 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc',
+ 'src/core/ext/transport/inproc/inproc_plugin.cc',
+ 'src/core/ext/transport/inproc/inproc_transport.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
'third_party/nanopb/pb_common.c',
'third_party/nanopb/pb_decode.c',
'third_party/nanopb/pb_encode.c',
- 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c',
- 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c',
- 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c',
- 'src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c',
- 'src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c',
- 'src/core/ext/filters/load_reporting/server_load_reporting_filter.c',
- 'src/core/ext/filters/load_reporting/server_load_reporting_plugin.c',
- 'src/core/ext/census/base_resources.c',
- 'src/core/ext/census/context.c',
+ 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc',
+ 'src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc',
+ 'src/core/ext/filters/load_reporting/server_load_reporting_filter.cc',
+ 'src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc',
+ 'src/core/ext/census/base_resources.cc',
+ 'src/core/ext/census/context.cc',
'src/core/ext/census/gen/census.pb.c',
'src/core/ext/census/gen/trace_context.pb.c',
- 'src/core/ext/census/grpc_context.c',
- 'src/core/ext/census/grpc_filter.c',
- 'src/core/ext/census/grpc_plugin.c',
- 'src/core/ext/census/initialize.c',
- 'src/core/ext/census/intrusive_hash_map.c',
- 'src/core/ext/census/mlog.c',
- 'src/core/ext/census/operation.c',
- 'src/core/ext/census/placeholders.c',
- 'src/core/ext/census/resource.c',
- 'src/core/ext/census/trace_context.c',
- 'src/core/ext/census/tracing.c',
- 'src/core/ext/filters/max_age/max_age_filter.c',
- 'src/core/ext/filters/message_size/message_size_filter.c',
- 'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c',
- 'src/core/ext/filters/workarounds/workaround_utils.c',
- 'src/core/plugin_registry/grpc_plugin_registry.c',
+ 'src/core/ext/census/grpc_context.cc',
+ 'src/core/ext/census/grpc_filter.cc',
+ 'src/core/ext/census/grpc_plugin.cc',
+ 'src/core/ext/census/initialize.cc',
+ 'src/core/ext/census/intrusive_hash_map.cc',
+ 'src/core/ext/census/mlog.cc',
+ 'src/core/ext/census/operation.cc',
+ 'src/core/ext/census/placeholders.cc',
+ 'src/core/ext/census/resource.cc',
+ 'src/core/ext/census/trace_context.cc',
+ 'src/core/ext/census/tracing.cc',
+ 'src/core/ext/filters/max_age/max_age_filter.cc',
+ 'src/core/ext/filters/message_size/message_size_filter.cc',
+ 'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc',
+ 'src/core/ext/filters/workarounds/workaround_utils.cc',
+ 'src/core/plugin_registry/grpc_plugin_registry.cc',
],
},
{
@@ -510,7 +511,7 @@
'test/core/end2end/data/server1_key.c',
'test/core/end2end/data/test_root_cert.c',
'test/core/security/oauth2_utils.c',
- 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c',
+ 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc',
'test/core/end2end/cq_verifier.c',
'test/core/end2end/fixtures/http_proxy_fixture.c',
'test/core/end2end/fixtures/proxy.c',
@@ -525,187 +526,188 @@
'test/core/util/port_server_client.c',
'test/core/util/slice_splitter.c',
'test/core/util/trickle_endpoint.c',
- 'src/core/lib/channel/channel_args.c',
- 'src/core/lib/channel/channel_stack.c',
- 'src/core/lib/channel/channel_stack_builder.c',
- 'src/core/lib/channel/connected_channel.c',
- 'src/core/lib/channel/handshaker.c',
- 'src/core/lib/channel/handshaker_factory.c',
- 'src/core/lib/channel/handshaker_registry.c',
- 'src/core/lib/compression/compression.c',
- 'src/core/lib/compression/compression_internal.c',
- 'src/core/lib/compression/message_compress.c',
- 'src/core/lib/compression/stream_compression.c',
- 'src/core/lib/compression/stream_compression_gzip.c',
- 'src/core/lib/compression/stream_compression_identity.c',
- 'src/core/lib/debug/stats.c',
- 'src/core/lib/debug/stats_data.c',
- 'src/core/lib/http/format_request.c',
- 'src/core/lib/http/httpcli.c',
- 'src/core/lib/http/parser.c',
- 'src/core/lib/iomgr/call_combiner.c',
- 'src/core/lib/iomgr/closure.c',
- 'src/core/lib/iomgr/combiner.c',
- 'src/core/lib/iomgr/endpoint.c',
- 'src/core/lib/iomgr/endpoint_pair_posix.c',
- 'src/core/lib/iomgr/endpoint_pair_uv.c',
- 'src/core/lib/iomgr/endpoint_pair_windows.c',
- 'src/core/lib/iomgr/error.c',
- 'src/core/lib/iomgr/ev_epoll1_linux.c',
- 'src/core/lib/iomgr/ev_epollex_linux.c',
- 'src/core/lib/iomgr/ev_epollsig_linux.c',
- 'src/core/lib/iomgr/ev_poll_posix.c',
- 'src/core/lib/iomgr/ev_posix.c',
- 'src/core/lib/iomgr/ev_windows.c',
- 'src/core/lib/iomgr/exec_ctx.c',
- 'src/core/lib/iomgr/executor.c',
- 'src/core/lib/iomgr/gethostname_fallback.c',
- 'src/core/lib/iomgr/gethostname_host_name_max.c',
- 'src/core/lib/iomgr/gethostname_sysconf.c',
- 'src/core/lib/iomgr/iocp_windows.c',
- 'src/core/lib/iomgr/iomgr.c',
- 'src/core/lib/iomgr/iomgr_posix.c',
- 'src/core/lib/iomgr/iomgr_uv.c',
- 'src/core/lib/iomgr/iomgr_windows.c',
- 'src/core/lib/iomgr/is_epollexclusive_available.c',
- 'src/core/lib/iomgr/load_file.c',
- 'src/core/lib/iomgr/lockfree_event.c',
- 'src/core/lib/iomgr/network_status_tracker.c',
- 'src/core/lib/iomgr/polling_entity.c',
- 'src/core/lib/iomgr/pollset_set_uv.c',
- 'src/core/lib/iomgr/pollset_set_windows.c',
- 'src/core/lib/iomgr/pollset_uv.c',
- 'src/core/lib/iomgr/pollset_windows.c',
- 'src/core/lib/iomgr/resolve_address_posix.c',
- 'src/core/lib/iomgr/resolve_address_uv.c',
- 'src/core/lib/iomgr/resolve_address_windows.c',
- 'src/core/lib/iomgr/resource_quota.c',
- 'src/core/lib/iomgr/sockaddr_utils.c',
- 'src/core/lib/iomgr/socket_factory_posix.c',
- 'src/core/lib/iomgr/socket_mutator.c',
- 'src/core/lib/iomgr/socket_utils_common_posix.c',
- 'src/core/lib/iomgr/socket_utils_linux.c',
- 'src/core/lib/iomgr/socket_utils_posix.c',
- 'src/core/lib/iomgr/socket_utils_uv.c',
- 'src/core/lib/iomgr/socket_utils_windows.c',
- 'src/core/lib/iomgr/socket_windows.c',
- 'src/core/lib/iomgr/tcp_client_posix.c',
- 'src/core/lib/iomgr/tcp_client_uv.c',
- 'src/core/lib/iomgr/tcp_client_windows.c',
- 'src/core/lib/iomgr/tcp_posix.c',
- 'src/core/lib/iomgr/tcp_server_posix.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_common.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c',
- 'src/core/lib/iomgr/tcp_server_uv.c',
- 'src/core/lib/iomgr/tcp_server_windows.c',
- 'src/core/lib/iomgr/tcp_uv.c',
- 'src/core/lib/iomgr/tcp_windows.c',
- 'src/core/lib/iomgr/time_averaged_stats.c',
- 'src/core/lib/iomgr/timer_generic.c',
- 'src/core/lib/iomgr/timer_heap.c',
- 'src/core/lib/iomgr/timer_manager.c',
- 'src/core/lib/iomgr/timer_uv.c',
- 'src/core/lib/iomgr/udp_server.c',
- 'src/core/lib/iomgr/unix_sockets_posix.c',
- 'src/core/lib/iomgr/unix_sockets_posix_noop.c',
- 'src/core/lib/iomgr/wakeup_fd_cv.c',
- 'src/core/lib/iomgr/wakeup_fd_eventfd.c',
- 'src/core/lib/iomgr/wakeup_fd_nospecial.c',
- 'src/core/lib/iomgr/wakeup_fd_pipe.c',
- 'src/core/lib/iomgr/wakeup_fd_posix.c',
- 'src/core/lib/json/json.c',
- 'src/core/lib/json/json_reader.c',
- 'src/core/lib/json/json_string.c',
- 'src/core/lib/json/json_writer.c',
- 'src/core/lib/slice/b64.c',
- 'src/core/lib/slice/percent_encoding.c',
- 'src/core/lib/slice/slice.c',
- 'src/core/lib/slice/slice_buffer.c',
- 'src/core/lib/slice/slice_hash_table.c',
- 'src/core/lib/slice/slice_intern.c',
- 'src/core/lib/slice/slice_string_helpers.c',
- 'src/core/lib/surface/alarm.c',
- 'src/core/lib/surface/api_trace.c',
- 'src/core/lib/surface/byte_buffer.c',
- 'src/core/lib/surface/byte_buffer_reader.c',
- 'src/core/lib/surface/call.c',
- 'src/core/lib/surface/call_details.c',
- 'src/core/lib/surface/call_log_batch.c',
- 'src/core/lib/surface/channel.c',
- 'src/core/lib/surface/channel_init.c',
- 'src/core/lib/surface/channel_ping.c',
- 'src/core/lib/surface/channel_stack_type.c',
- 'src/core/lib/surface/completion_queue.c',
- 'src/core/lib/surface/completion_queue_factory.c',
- 'src/core/lib/surface/event_string.c',
+ 'src/core/lib/backoff/backoff.cc',
+ 'src/core/lib/channel/channel_args.cc',
+ 'src/core/lib/channel/channel_stack.cc',
+ 'src/core/lib/channel/channel_stack_builder.cc',
+ 'src/core/lib/channel/connected_channel.cc',
+ 'src/core/lib/channel/handshaker.cc',
+ '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/message_compress.cc',
+ 'src/core/lib/compression/stream_compression.cc',
+ 'src/core/lib/compression/stream_compression_gzip.cc',
+ 'src/core/lib/compression/stream_compression_identity.cc',
+ 'src/core/lib/debug/stats.cc',
+ 'src/core/lib/debug/stats_data.cc',
+ 'src/core/lib/http/format_request.cc',
+ 'src/core/lib/http/httpcli.cc',
+ 'src/core/lib/http/parser.cc',
+ 'src/core/lib/iomgr/call_combiner.cc',
+ 'src/core/lib/iomgr/closure.cc',
+ 'src/core/lib/iomgr/combiner.cc',
+ 'src/core/lib/iomgr/endpoint.cc',
+ 'src/core/lib/iomgr/endpoint_pair_posix.cc',
+ 'src/core/lib/iomgr/endpoint_pair_uv.cc',
+ 'src/core/lib/iomgr/endpoint_pair_windows.cc',
+ 'src/core/lib/iomgr/error.cc',
+ 'src/core/lib/iomgr/ev_epoll1_linux.cc',
+ 'src/core/lib/iomgr/ev_epollex_linux.cc',
+ 'src/core/lib/iomgr/ev_epollsig_linux.cc',
+ 'src/core/lib/iomgr/ev_poll_posix.cc',
+ 'src/core/lib/iomgr/ev_posix.cc',
+ 'src/core/lib/iomgr/ev_windows.cc',
+ 'src/core/lib/iomgr/exec_ctx.cc',
+ 'src/core/lib/iomgr/executor.cc',
+ 'src/core/lib/iomgr/gethostname_fallback.cc',
+ 'src/core/lib/iomgr/gethostname_host_name_max.cc',
+ 'src/core/lib/iomgr/gethostname_sysconf.cc',
+ 'src/core/lib/iomgr/iocp_windows.cc',
+ 'src/core/lib/iomgr/iomgr.cc',
+ 'src/core/lib/iomgr/iomgr_posix.cc',
+ 'src/core/lib/iomgr/iomgr_uv.cc',
+ 'src/core/lib/iomgr/iomgr_windows.cc',
+ 'src/core/lib/iomgr/is_epollexclusive_available.cc',
+ 'src/core/lib/iomgr/load_file.cc',
+ 'src/core/lib/iomgr/lockfree_event.cc',
+ 'src/core/lib/iomgr/network_status_tracker.cc',
+ 'src/core/lib/iomgr/polling_entity.cc',
+ 'src/core/lib/iomgr/pollset_set_uv.cc',
+ 'src/core/lib/iomgr/pollset_set_windows.cc',
+ 'src/core/lib/iomgr/pollset_uv.cc',
+ 'src/core/lib/iomgr/pollset_windows.cc',
+ 'src/core/lib/iomgr/resolve_address_posix.cc',
+ 'src/core/lib/iomgr/resolve_address_uv.cc',
+ 'src/core/lib/iomgr/resolve_address_windows.cc',
+ 'src/core/lib/iomgr/resource_quota.cc',
+ 'src/core/lib/iomgr/sockaddr_utils.cc',
+ 'src/core/lib/iomgr/socket_factory_posix.cc',
+ 'src/core/lib/iomgr/socket_mutator.cc',
+ 'src/core/lib/iomgr/socket_utils_common_posix.cc',
+ 'src/core/lib/iomgr/socket_utils_linux.cc',
+ 'src/core/lib/iomgr/socket_utils_posix.cc',
+ 'src/core/lib/iomgr/socket_utils_uv.cc',
+ 'src/core/lib/iomgr/socket_utils_windows.cc',
+ 'src/core/lib/iomgr/socket_windows.cc',
+ 'src/core/lib/iomgr/tcp_client_posix.cc',
+ 'src/core/lib/iomgr/tcp_client_uv.cc',
+ 'src/core/lib/iomgr/tcp_client_windows.cc',
+ 'src/core/lib/iomgr/tcp_posix.cc',
+ 'src/core/lib/iomgr/tcp_server_posix.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_common.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
+ 'src/core/lib/iomgr/tcp_server_uv.cc',
+ 'src/core/lib/iomgr/tcp_server_windows.cc',
+ 'src/core/lib/iomgr/tcp_uv.cc',
+ 'src/core/lib/iomgr/tcp_windows.cc',
+ 'src/core/lib/iomgr/time_averaged_stats.cc',
+ 'src/core/lib/iomgr/timer_generic.cc',
+ 'src/core/lib/iomgr/timer_heap.cc',
+ 'src/core/lib/iomgr/timer_manager.cc',
+ 'src/core/lib/iomgr/timer_uv.cc',
+ 'src/core/lib/iomgr/udp_server.cc',
+ 'src/core/lib/iomgr/unix_sockets_posix.cc',
+ 'src/core/lib/iomgr/unix_sockets_posix_noop.cc',
+ 'src/core/lib/iomgr/wakeup_fd_cv.cc',
+ 'src/core/lib/iomgr/wakeup_fd_eventfd.cc',
+ 'src/core/lib/iomgr/wakeup_fd_nospecial.cc',
+ 'src/core/lib/iomgr/wakeup_fd_pipe.cc',
+ 'src/core/lib/iomgr/wakeup_fd_posix.cc',
+ 'src/core/lib/json/json.cc',
+ 'src/core/lib/json/json_reader.cc',
+ 'src/core/lib/json/json_string.cc',
+ 'src/core/lib/json/json_writer.cc',
+ 'src/core/lib/slice/b64.cc',
+ 'src/core/lib/slice/percent_encoding.cc',
+ 'src/core/lib/slice/slice.cc',
+ 'src/core/lib/slice/slice_buffer.cc',
+ 'src/core/lib/slice/slice_hash_table.cc',
+ 'src/core/lib/slice/slice_intern.cc',
+ 'src/core/lib/slice/slice_string_helpers.cc',
+ 'src/core/lib/surface/alarm.cc',
+ 'src/core/lib/surface/api_trace.cc',
+ 'src/core/lib/surface/byte_buffer.cc',
+ 'src/core/lib/surface/byte_buffer_reader.cc',
+ 'src/core/lib/surface/call.cc',
+ 'src/core/lib/surface/call_details.cc',
+ 'src/core/lib/surface/call_log_batch.cc',
+ 'src/core/lib/surface/channel.cc',
+ 'src/core/lib/surface/channel_init.cc',
+ 'src/core/lib/surface/channel_ping.cc',
+ 'src/core/lib/surface/channel_stack_type.cc',
+ 'src/core/lib/surface/completion_queue.cc',
+ 'src/core/lib/surface/completion_queue_factory.cc',
+ 'src/core/lib/surface/event_string.cc',
'src/core/lib/surface/lame_client.cc',
- 'src/core/lib/surface/metadata_array.c',
- 'src/core/lib/surface/server.c',
- 'src/core/lib/surface/validate_metadata.c',
- 'src/core/lib/surface/version.c',
- 'src/core/lib/transport/bdp_estimator.c',
- 'src/core/lib/transport/byte_stream.c',
- 'src/core/lib/transport/connectivity_state.c',
- 'src/core/lib/transport/error_utils.c',
- 'src/core/lib/transport/metadata.c',
- 'src/core/lib/transport/metadata_batch.c',
- 'src/core/lib/transport/pid_controller.c',
- 'src/core/lib/transport/service_config.c',
- 'src/core/lib/transport/static_metadata.c',
- 'src/core/lib/transport/status_conversion.c',
- 'src/core/lib/transport/timeout_encoding.c',
- 'src/core/lib/transport/transport.c',
- 'src/core/lib/transport/transport_op_string.c',
- 'src/core/lib/debug/trace.c',
- 'src/core/ext/filters/client_channel/channel_connectivity.c',
- 'src/core/ext/filters/client_channel/client_channel.c',
- 'src/core/ext/filters/client_channel/client_channel_factory.c',
- 'src/core/ext/filters/client_channel/client_channel_plugin.c',
- 'src/core/ext/filters/client_channel/connector.c',
- 'src/core/ext/filters/client_channel/http_connect_handshaker.c',
- 'src/core/ext/filters/client_channel/http_proxy.c',
- 'src/core/ext/filters/client_channel/lb_policy.c',
- 'src/core/ext/filters/client_channel/lb_policy_factory.c',
- 'src/core/ext/filters/client_channel/lb_policy_registry.c',
- 'src/core/ext/filters/client_channel/parse_address.c',
- 'src/core/ext/filters/client_channel/proxy_mapper.c',
- 'src/core/ext/filters/client_channel/proxy_mapper_registry.c',
- 'src/core/ext/filters/client_channel/resolver.c',
- 'src/core/ext/filters/client_channel/resolver_factory.c',
- 'src/core/ext/filters/client_channel/resolver_registry.c',
- 'src/core/ext/filters/client_channel/retry_throttle.c',
- 'src/core/ext/filters/client_channel/subchannel.c',
- 'src/core/ext/filters/client_channel/subchannel_index.c',
- 'src/core/ext/filters/client_channel/uri_parser.c',
- 'src/core/ext/filters/deadline/deadline_filter.c',
- 'src/core/ext/transport/chttp2/transport/bin_decoder.c',
- 'src/core/ext/transport/chttp2/transport/bin_encoder.c',
- 'src/core/ext/transport/chttp2/transport/chttp2_plugin.c',
- 'src/core/ext/transport/chttp2/transport/chttp2_transport.c',
- 'src/core/ext/transport/chttp2/transport/flow_control.c',
- 'src/core/ext/transport/chttp2/transport/frame_data.c',
- 'src/core/ext/transport/chttp2/transport/frame_goaway.c',
- 'src/core/ext/transport/chttp2/transport/frame_ping.c',
- 'src/core/ext/transport/chttp2/transport/frame_rst_stream.c',
- 'src/core/ext/transport/chttp2/transport/frame_settings.c',
- 'src/core/ext/transport/chttp2/transport/frame_window_update.c',
- 'src/core/ext/transport/chttp2/transport/hpack_encoder.c',
- 'src/core/ext/transport/chttp2/transport/hpack_parser.c',
- 'src/core/ext/transport/chttp2/transport/hpack_table.c',
- 'src/core/ext/transport/chttp2/transport/http2_settings.c',
- 'src/core/ext/transport/chttp2/transport/huffsyms.c',
- 'src/core/ext/transport/chttp2/transport/incoming_metadata.c',
- 'src/core/ext/transport/chttp2/transport/parsing.c',
- 'src/core/ext/transport/chttp2/transport/stream_lists.c',
- 'src/core/ext/transport/chttp2/transport/stream_map.c',
- 'src/core/ext/transport/chttp2/transport/varint.c',
- 'src/core/ext/transport/chttp2/transport/writing.c',
- 'src/core/ext/transport/chttp2/alpn/alpn.c',
- 'src/core/ext/filters/http/client/http_client_filter.c',
- 'src/core/ext/filters/http/http_filters_plugin.c',
- 'src/core/ext/filters/http/message_compress/message_compress_filter.c',
- 'src/core/ext/filters/http/server/http_server_filter.c',
+ 'src/core/lib/surface/metadata_array.cc',
+ 'src/core/lib/surface/server.cc',
+ 'src/core/lib/surface/validate_metadata.cc',
+ 'src/core/lib/surface/version.cc',
+ 'src/core/lib/transport/bdp_estimator.cc',
+ 'src/core/lib/transport/byte_stream.cc',
+ 'src/core/lib/transport/connectivity_state.cc',
+ 'src/core/lib/transport/error_utils.cc',
+ 'src/core/lib/transport/metadata.cc',
+ 'src/core/lib/transport/metadata_batch.cc',
+ 'src/core/lib/transport/pid_controller.cc',
+ 'src/core/lib/transport/service_config.cc',
+ 'src/core/lib/transport/static_metadata.cc',
+ 'src/core/lib/transport/status_conversion.cc',
+ 'src/core/lib/transport/timeout_encoding.cc',
+ 'src/core/lib/transport/transport.cc',
+ 'src/core/lib/transport/transport_op_string.cc',
+ 'src/core/lib/debug/trace.cc',
+ 'src/core/ext/filters/client_channel/channel_connectivity.cc',
+ 'src/core/ext/filters/client_channel/client_channel.cc',
+ 'src/core/ext/filters/client_channel/client_channel_factory.cc',
+ 'src/core/ext/filters/client_channel/client_channel_plugin.cc',
+ 'src/core/ext/filters/client_channel/connector.cc',
+ 'src/core/ext/filters/client_channel/http_connect_handshaker.cc',
+ 'src/core/ext/filters/client_channel/http_proxy.cc',
+ 'src/core/ext/filters/client_channel/lb_policy.cc',
+ 'src/core/ext/filters/client_channel/lb_policy_factory.cc',
+ 'src/core/ext/filters/client_channel/lb_policy_registry.cc',
+ 'src/core/ext/filters/client_channel/parse_address.cc',
+ 'src/core/ext/filters/client_channel/proxy_mapper.cc',
+ 'src/core/ext/filters/client_channel/proxy_mapper_registry.cc',
+ 'src/core/ext/filters/client_channel/resolver.cc',
+ 'src/core/ext/filters/client_channel/resolver_factory.cc',
+ 'src/core/ext/filters/client_channel/resolver_registry.cc',
+ 'src/core/ext/filters/client_channel/retry_throttle.cc',
+ 'src/core/ext/filters/client_channel/subchannel.cc',
+ 'src/core/ext/filters/client_channel/subchannel_index.cc',
+ 'src/core/ext/filters/client_channel/uri_parser.cc',
+ 'src/core/ext/filters/deadline/deadline_filter.cc',
+ 'src/core/ext/transport/chttp2/transport/bin_decoder.cc',
+ 'src/core/ext/transport/chttp2/transport/bin_encoder.cc',
+ 'src/core/ext/transport/chttp2/transport/chttp2_plugin.cc',
+ 'src/core/ext/transport/chttp2/transport/chttp2_transport.cc',
+ 'src/core/ext/transport/chttp2/transport/flow_control.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_data.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_goaway.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_ping.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_rst_stream.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_settings.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_window_update.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_encoder.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_parser.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_table.cc',
+ 'src/core/ext/transport/chttp2/transport/http2_settings.cc',
+ 'src/core/ext/transport/chttp2/transport/huffsyms.cc',
+ 'src/core/ext/transport/chttp2/transport/incoming_metadata.cc',
+ 'src/core/ext/transport/chttp2/transport/parsing.cc',
+ 'src/core/ext/transport/chttp2/transport/stream_lists.cc',
+ 'src/core/ext/transport/chttp2/transport/stream_map.cc',
+ 'src/core/ext/transport/chttp2/transport/varint.cc',
+ 'src/core/ext/transport/chttp2/transport/writing.cc',
+ 'src/core/ext/transport/chttp2/alpn/alpn.cc',
+ 'src/core/ext/filters/http/client/http_client_filter.cc',
+ 'src/core/ext/filters/http/http_filters_plugin.cc',
+ 'src/core/ext/filters/http/message_compress/message_compress_filter.cc',
+ 'src/core/ext/filters/http/server/http_server_filter.cc',
],
},
{
@@ -717,7 +719,7 @@
'grpc_unsecure',
],
'sources': [
- 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c',
+ 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc',
'test/core/end2end/cq_verifier.c',
'test/core/end2end/fixtures/http_proxy_fixture.c',
'test/core/end2end/fixtures/proxy.c',
@@ -732,187 +734,188 @@
'test/core/util/port_server_client.c',
'test/core/util/slice_splitter.c',
'test/core/util/trickle_endpoint.c',
- 'src/core/lib/channel/channel_args.c',
- 'src/core/lib/channel/channel_stack.c',
- 'src/core/lib/channel/channel_stack_builder.c',
- 'src/core/lib/channel/connected_channel.c',
- 'src/core/lib/channel/handshaker.c',
- 'src/core/lib/channel/handshaker_factory.c',
- 'src/core/lib/channel/handshaker_registry.c',
- 'src/core/lib/compression/compression.c',
- 'src/core/lib/compression/compression_internal.c',
- 'src/core/lib/compression/message_compress.c',
- 'src/core/lib/compression/stream_compression.c',
- 'src/core/lib/compression/stream_compression_gzip.c',
- 'src/core/lib/compression/stream_compression_identity.c',
- 'src/core/lib/debug/stats.c',
- 'src/core/lib/debug/stats_data.c',
- 'src/core/lib/http/format_request.c',
- 'src/core/lib/http/httpcli.c',
- 'src/core/lib/http/parser.c',
- 'src/core/lib/iomgr/call_combiner.c',
- 'src/core/lib/iomgr/closure.c',
- 'src/core/lib/iomgr/combiner.c',
- 'src/core/lib/iomgr/endpoint.c',
- 'src/core/lib/iomgr/endpoint_pair_posix.c',
- 'src/core/lib/iomgr/endpoint_pair_uv.c',
- 'src/core/lib/iomgr/endpoint_pair_windows.c',
- 'src/core/lib/iomgr/error.c',
- 'src/core/lib/iomgr/ev_epoll1_linux.c',
- 'src/core/lib/iomgr/ev_epollex_linux.c',
- 'src/core/lib/iomgr/ev_epollsig_linux.c',
- 'src/core/lib/iomgr/ev_poll_posix.c',
- 'src/core/lib/iomgr/ev_posix.c',
- 'src/core/lib/iomgr/ev_windows.c',
- 'src/core/lib/iomgr/exec_ctx.c',
- 'src/core/lib/iomgr/executor.c',
- 'src/core/lib/iomgr/gethostname_fallback.c',
- 'src/core/lib/iomgr/gethostname_host_name_max.c',
- 'src/core/lib/iomgr/gethostname_sysconf.c',
- 'src/core/lib/iomgr/iocp_windows.c',
- 'src/core/lib/iomgr/iomgr.c',
- 'src/core/lib/iomgr/iomgr_posix.c',
- 'src/core/lib/iomgr/iomgr_uv.c',
- 'src/core/lib/iomgr/iomgr_windows.c',
- 'src/core/lib/iomgr/is_epollexclusive_available.c',
- 'src/core/lib/iomgr/load_file.c',
- 'src/core/lib/iomgr/lockfree_event.c',
- 'src/core/lib/iomgr/network_status_tracker.c',
- 'src/core/lib/iomgr/polling_entity.c',
- 'src/core/lib/iomgr/pollset_set_uv.c',
- 'src/core/lib/iomgr/pollset_set_windows.c',
- 'src/core/lib/iomgr/pollset_uv.c',
- 'src/core/lib/iomgr/pollset_windows.c',
- 'src/core/lib/iomgr/resolve_address_posix.c',
- 'src/core/lib/iomgr/resolve_address_uv.c',
- 'src/core/lib/iomgr/resolve_address_windows.c',
- 'src/core/lib/iomgr/resource_quota.c',
- 'src/core/lib/iomgr/sockaddr_utils.c',
- 'src/core/lib/iomgr/socket_factory_posix.c',
- 'src/core/lib/iomgr/socket_mutator.c',
- 'src/core/lib/iomgr/socket_utils_common_posix.c',
- 'src/core/lib/iomgr/socket_utils_linux.c',
- 'src/core/lib/iomgr/socket_utils_posix.c',
- 'src/core/lib/iomgr/socket_utils_uv.c',
- 'src/core/lib/iomgr/socket_utils_windows.c',
- 'src/core/lib/iomgr/socket_windows.c',
- 'src/core/lib/iomgr/tcp_client_posix.c',
- 'src/core/lib/iomgr/tcp_client_uv.c',
- 'src/core/lib/iomgr/tcp_client_windows.c',
- 'src/core/lib/iomgr/tcp_posix.c',
- 'src/core/lib/iomgr/tcp_server_posix.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_common.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c',
- 'src/core/lib/iomgr/tcp_server_uv.c',
- 'src/core/lib/iomgr/tcp_server_windows.c',
- 'src/core/lib/iomgr/tcp_uv.c',
- 'src/core/lib/iomgr/tcp_windows.c',
- 'src/core/lib/iomgr/time_averaged_stats.c',
- 'src/core/lib/iomgr/timer_generic.c',
- 'src/core/lib/iomgr/timer_heap.c',
- 'src/core/lib/iomgr/timer_manager.c',
- 'src/core/lib/iomgr/timer_uv.c',
- 'src/core/lib/iomgr/udp_server.c',
- 'src/core/lib/iomgr/unix_sockets_posix.c',
- 'src/core/lib/iomgr/unix_sockets_posix_noop.c',
- 'src/core/lib/iomgr/wakeup_fd_cv.c',
- 'src/core/lib/iomgr/wakeup_fd_eventfd.c',
- 'src/core/lib/iomgr/wakeup_fd_nospecial.c',
- 'src/core/lib/iomgr/wakeup_fd_pipe.c',
- 'src/core/lib/iomgr/wakeup_fd_posix.c',
- 'src/core/lib/json/json.c',
- 'src/core/lib/json/json_reader.c',
- 'src/core/lib/json/json_string.c',
- 'src/core/lib/json/json_writer.c',
- 'src/core/lib/slice/b64.c',
- 'src/core/lib/slice/percent_encoding.c',
- 'src/core/lib/slice/slice.c',
- 'src/core/lib/slice/slice_buffer.c',
- 'src/core/lib/slice/slice_hash_table.c',
- 'src/core/lib/slice/slice_intern.c',
- 'src/core/lib/slice/slice_string_helpers.c',
- 'src/core/lib/surface/alarm.c',
- 'src/core/lib/surface/api_trace.c',
- 'src/core/lib/surface/byte_buffer.c',
- 'src/core/lib/surface/byte_buffer_reader.c',
- 'src/core/lib/surface/call.c',
- 'src/core/lib/surface/call_details.c',
- 'src/core/lib/surface/call_log_batch.c',
- 'src/core/lib/surface/channel.c',
- 'src/core/lib/surface/channel_init.c',
- 'src/core/lib/surface/channel_ping.c',
- 'src/core/lib/surface/channel_stack_type.c',
- 'src/core/lib/surface/completion_queue.c',
- 'src/core/lib/surface/completion_queue_factory.c',
- 'src/core/lib/surface/event_string.c',
+ 'src/core/lib/backoff/backoff.cc',
+ 'src/core/lib/channel/channel_args.cc',
+ 'src/core/lib/channel/channel_stack.cc',
+ 'src/core/lib/channel/channel_stack_builder.cc',
+ 'src/core/lib/channel/connected_channel.cc',
+ 'src/core/lib/channel/handshaker.cc',
+ '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/message_compress.cc',
+ 'src/core/lib/compression/stream_compression.cc',
+ 'src/core/lib/compression/stream_compression_gzip.cc',
+ 'src/core/lib/compression/stream_compression_identity.cc',
+ 'src/core/lib/debug/stats.cc',
+ 'src/core/lib/debug/stats_data.cc',
+ 'src/core/lib/http/format_request.cc',
+ 'src/core/lib/http/httpcli.cc',
+ 'src/core/lib/http/parser.cc',
+ 'src/core/lib/iomgr/call_combiner.cc',
+ 'src/core/lib/iomgr/closure.cc',
+ 'src/core/lib/iomgr/combiner.cc',
+ 'src/core/lib/iomgr/endpoint.cc',
+ 'src/core/lib/iomgr/endpoint_pair_posix.cc',
+ 'src/core/lib/iomgr/endpoint_pair_uv.cc',
+ 'src/core/lib/iomgr/endpoint_pair_windows.cc',
+ 'src/core/lib/iomgr/error.cc',
+ 'src/core/lib/iomgr/ev_epoll1_linux.cc',
+ 'src/core/lib/iomgr/ev_epollex_linux.cc',
+ 'src/core/lib/iomgr/ev_epollsig_linux.cc',
+ 'src/core/lib/iomgr/ev_poll_posix.cc',
+ 'src/core/lib/iomgr/ev_posix.cc',
+ 'src/core/lib/iomgr/ev_windows.cc',
+ 'src/core/lib/iomgr/exec_ctx.cc',
+ 'src/core/lib/iomgr/executor.cc',
+ 'src/core/lib/iomgr/gethostname_fallback.cc',
+ 'src/core/lib/iomgr/gethostname_host_name_max.cc',
+ 'src/core/lib/iomgr/gethostname_sysconf.cc',
+ 'src/core/lib/iomgr/iocp_windows.cc',
+ 'src/core/lib/iomgr/iomgr.cc',
+ 'src/core/lib/iomgr/iomgr_posix.cc',
+ 'src/core/lib/iomgr/iomgr_uv.cc',
+ 'src/core/lib/iomgr/iomgr_windows.cc',
+ 'src/core/lib/iomgr/is_epollexclusive_available.cc',
+ 'src/core/lib/iomgr/load_file.cc',
+ 'src/core/lib/iomgr/lockfree_event.cc',
+ 'src/core/lib/iomgr/network_status_tracker.cc',
+ 'src/core/lib/iomgr/polling_entity.cc',
+ 'src/core/lib/iomgr/pollset_set_uv.cc',
+ 'src/core/lib/iomgr/pollset_set_windows.cc',
+ 'src/core/lib/iomgr/pollset_uv.cc',
+ 'src/core/lib/iomgr/pollset_windows.cc',
+ 'src/core/lib/iomgr/resolve_address_posix.cc',
+ 'src/core/lib/iomgr/resolve_address_uv.cc',
+ 'src/core/lib/iomgr/resolve_address_windows.cc',
+ 'src/core/lib/iomgr/resource_quota.cc',
+ 'src/core/lib/iomgr/sockaddr_utils.cc',
+ 'src/core/lib/iomgr/socket_factory_posix.cc',
+ 'src/core/lib/iomgr/socket_mutator.cc',
+ 'src/core/lib/iomgr/socket_utils_common_posix.cc',
+ 'src/core/lib/iomgr/socket_utils_linux.cc',
+ 'src/core/lib/iomgr/socket_utils_posix.cc',
+ 'src/core/lib/iomgr/socket_utils_uv.cc',
+ 'src/core/lib/iomgr/socket_utils_windows.cc',
+ 'src/core/lib/iomgr/socket_windows.cc',
+ 'src/core/lib/iomgr/tcp_client_posix.cc',
+ 'src/core/lib/iomgr/tcp_client_uv.cc',
+ 'src/core/lib/iomgr/tcp_client_windows.cc',
+ 'src/core/lib/iomgr/tcp_posix.cc',
+ 'src/core/lib/iomgr/tcp_server_posix.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_common.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
+ 'src/core/lib/iomgr/tcp_server_uv.cc',
+ 'src/core/lib/iomgr/tcp_server_windows.cc',
+ 'src/core/lib/iomgr/tcp_uv.cc',
+ 'src/core/lib/iomgr/tcp_windows.cc',
+ 'src/core/lib/iomgr/time_averaged_stats.cc',
+ 'src/core/lib/iomgr/timer_generic.cc',
+ 'src/core/lib/iomgr/timer_heap.cc',
+ 'src/core/lib/iomgr/timer_manager.cc',
+ 'src/core/lib/iomgr/timer_uv.cc',
+ 'src/core/lib/iomgr/udp_server.cc',
+ 'src/core/lib/iomgr/unix_sockets_posix.cc',
+ 'src/core/lib/iomgr/unix_sockets_posix_noop.cc',
+ 'src/core/lib/iomgr/wakeup_fd_cv.cc',
+ 'src/core/lib/iomgr/wakeup_fd_eventfd.cc',
+ 'src/core/lib/iomgr/wakeup_fd_nospecial.cc',
+ 'src/core/lib/iomgr/wakeup_fd_pipe.cc',
+ 'src/core/lib/iomgr/wakeup_fd_posix.cc',
+ 'src/core/lib/json/json.cc',
+ 'src/core/lib/json/json_reader.cc',
+ 'src/core/lib/json/json_string.cc',
+ 'src/core/lib/json/json_writer.cc',
+ 'src/core/lib/slice/b64.cc',
+ 'src/core/lib/slice/percent_encoding.cc',
+ 'src/core/lib/slice/slice.cc',
+ 'src/core/lib/slice/slice_buffer.cc',
+ 'src/core/lib/slice/slice_hash_table.cc',
+ 'src/core/lib/slice/slice_intern.cc',
+ 'src/core/lib/slice/slice_string_helpers.cc',
+ 'src/core/lib/surface/alarm.cc',
+ 'src/core/lib/surface/api_trace.cc',
+ 'src/core/lib/surface/byte_buffer.cc',
+ 'src/core/lib/surface/byte_buffer_reader.cc',
+ 'src/core/lib/surface/call.cc',
+ 'src/core/lib/surface/call_details.cc',
+ 'src/core/lib/surface/call_log_batch.cc',
+ 'src/core/lib/surface/channel.cc',
+ 'src/core/lib/surface/channel_init.cc',
+ 'src/core/lib/surface/channel_ping.cc',
+ 'src/core/lib/surface/channel_stack_type.cc',
+ 'src/core/lib/surface/completion_queue.cc',
+ 'src/core/lib/surface/completion_queue_factory.cc',
+ 'src/core/lib/surface/event_string.cc',
'src/core/lib/surface/lame_client.cc',
- 'src/core/lib/surface/metadata_array.c',
- 'src/core/lib/surface/server.c',
- 'src/core/lib/surface/validate_metadata.c',
- 'src/core/lib/surface/version.c',
- 'src/core/lib/transport/bdp_estimator.c',
- 'src/core/lib/transport/byte_stream.c',
- 'src/core/lib/transport/connectivity_state.c',
- 'src/core/lib/transport/error_utils.c',
- 'src/core/lib/transport/metadata.c',
- 'src/core/lib/transport/metadata_batch.c',
- 'src/core/lib/transport/pid_controller.c',
- 'src/core/lib/transport/service_config.c',
- 'src/core/lib/transport/static_metadata.c',
- 'src/core/lib/transport/status_conversion.c',
- 'src/core/lib/transport/timeout_encoding.c',
- 'src/core/lib/transport/transport.c',
- 'src/core/lib/transport/transport_op_string.c',
- 'src/core/lib/debug/trace.c',
- 'src/core/ext/filters/client_channel/channel_connectivity.c',
- 'src/core/ext/filters/client_channel/client_channel.c',
- 'src/core/ext/filters/client_channel/client_channel_factory.c',
- 'src/core/ext/filters/client_channel/client_channel_plugin.c',
- 'src/core/ext/filters/client_channel/connector.c',
- 'src/core/ext/filters/client_channel/http_connect_handshaker.c',
- 'src/core/ext/filters/client_channel/http_proxy.c',
- 'src/core/ext/filters/client_channel/lb_policy.c',
- 'src/core/ext/filters/client_channel/lb_policy_factory.c',
- 'src/core/ext/filters/client_channel/lb_policy_registry.c',
- 'src/core/ext/filters/client_channel/parse_address.c',
- 'src/core/ext/filters/client_channel/proxy_mapper.c',
- 'src/core/ext/filters/client_channel/proxy_mapper_registry.c',
- 'src/core/ext/filters/client_channel/resolver.c',
- 'src/core/ext/filters/client_channel/resolver_factory.c',
- 'src/core/ext/filters/client_channel/resolver_registry.c',
- 'src/core/ext/filters/client_channel/retry_throttle.c',
- 'src/core/ext/filters/client_channel/subchannel.c',
- 'src/core/ext/filters/client_channel/subchannel_index.c',
- 'src/core/ext/filters/client_channel/uri_parser.c',
- 'src/core/ext/filters/deadline/deadline_filter.c',
- 'src/core/ext/transport/chttp2/transport/bin_decoder.c',
- 'src/core/ext/transport/chttp2/transport/bin_encoder.c',
- 'src/core/ext/transport/chttp2/transport/chttp2_plugin.c',
- 'src/core/ext/transport/chttp2/transport/chttp2_transport.c',
- 'src/core/ext/transport/chttp2/transport/flow_control.c',
- 'src/core/ext/transport/chttp2/transport/frame_data.c',
- 'src/core/ext/transport/chttp2/transport/frame_goaway.c',
- 'src/core/ext/transport/chttp2/transport/frame_ping.c',
- 'src/core/ext/transport/chttp2/transport/frame_rst_stream.c',
- 'src/core/ext/transport/chttp2/transport/frame_settings.c',
- 'src/core/ext/transport/chttp2/transport/frame_window_update.c',
- 'src/core/ext/transport/chttp2/transport/hpack_encoder.c',
- 'src/core/ext/transport/chttp2/transport/hpack_parser.c',
- 'src/core/ext/transport/chttp2/transport/hpack_table.c',
- 'src/core/ext/transport/chttp2/transport/http2_settings.c',
- 'src/core/ext/transport/chttp2/transport/huffsyms.c',
- 'src/core/ext/transport/chttp2/transport/incoming_metadata.c',
- 'src/core/ext/transport/chttp2/transport/parsing.c',
- 'src/core/ext/transport/chttp2/transport/stream_lists.c',
- 'src/core/ext/transport/chttp2/transport/stream_map.c',
- 'src/core/ext/transport/chttp2/transport/varint.c',
- 'src/core/ext/transport/chttp2/transport/writing.c',
- 'src/core/ext/transport/chttp2/alpn/alpn.c',
- 'src/core/ext/filters/http/client/http_client_filter.c',
- 'src/core/ext/filters/http/http_filters_plugin.c',
- 'src/core/ext/filters/http/message_compress/message_compress_filter.c',
- 'src/core/ext/filters/http/server/http_server_filter.c',
+ 'src/core/lib/surface/metadata_array.cc',
+ 'src/core/lib/surface/server.cc',
+ 'src/core/lib/surface/validate_metadata.cc',
+ 'src/core/lib/surface/version.cc',
+ 'src/core/lib/transport/bdp_estimator.cc',
+ 'src/core/lib/transport/byte_stream.cc',
+ 'src/core/lib/transport/connectivity_state.cc',
+ 'src/core/lib/transport/error_utils.cc',
+ 'src/core/lib/transport/metadata.cc',
+ 'src/core/lib/transport/metadata_batch.cc',
+ 'src/core/lib/transport/pid_controller.cc',
+ 'src/core/lib/transport/service_config.cc',
+ 'src/core/lib/transport/static_metadata.cc',
+ 'src/core/lib/transport/status_conversion.cc',
+ 'src/core/lib/transport/timeout_encoding.cc',
+ 'src/core/lib/transport/transport.cc',
+ 'src/core/lib/transport/transport_op_string.cc',
+ 'src/core/lib/debug/trace.cc',
+ 'src/core/ext/filters/client_channel/channel_connectivity.cc',
+ 'src/core/ext/filters/client_channel/client_channel.cc',
+ 'src/core/ext/filters/client_channel/client_channel_factory.cc',
+ 'src/core/ext/filters/client_channel/client_channel_plugin.cc',
+ 'src/core/ext/filters/client_channel/connector.cc',
+ 'src/core/ext/filters/client_channel/http_connect_handshaker.cc',
+ 'src/core/ext/filters/client_channel/http_proxy.cc',
+ 'src/core/ext/filters/client_channel/lb_policy.cc',
+ 'src/core/ext/filters/client_channel/lb_policy_factory.cc',
+ 'src/core/ext/filters/client_channel/lb_policy_registry.cc',
+ 'src/core/ext/filters/client_channel/parse_address.cc',
+ 'src/core/ext/filters/client_channel/proxy_mapper.cc',
+ 'src/core/ext/filters/client_channel/proxy_mapper_registry.cc',
+ 'src/core/ext/filters/client_channel/resolver.cc',
+ 'src/core/ext/filters/client_channel/resolver_factory.cc',
+ 'src/core/ext/filters/client_channel/resolver_registry.cc',
+ 'src/core/ext/filters/client_channel/retry_throttle.cc',
+ 'src/core/ext/filters/client_channel/subchannel.cc',
+ 'src/core/ext/filters/client_channel/subchannel_index.cc',
+ 'src/core/ext/filters/client_channel/uri_parser.cc',
+ 'src/core/ext/filters/deadline/deadline_filter.cc',
+ 'src/core/ext/transport/chttp2/transport/bin_decoder.cc',
+ 'src/core/ext/transport/chttp2/transport/bin_encoder.cc',
+ 'src/core/ext/transport/chttp2/transport/chttp2_plugin.cc',
+ 'src/core/ext/transport/chttp2/transport/chttp2_transport.cc',
+ 'src/core/ext/transport/chttp2/transport/flow_control.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_data.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_goaway.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_ping.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_rst_stream.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_settings.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_window_update.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_encoder.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_parser.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_table.cc',
+ 'src/core/ext/transport/chttp2/transport/http2_settings.cc',
+ 'src/core/ext/transport/chttp2/transport/huffsyms.cc',
+ 'src/core/ext/transport/chttp2/transport/incoming_metadata.cc',
+ 'src/core/ext/transport/chttp2/transport/parsing.cc',
+ 'src/core/ext/transport/chttp2/transport/stream_lists.cc',
+ 'src/core/ext/transport/chttp2/transport/stream_map.cc',
+ 'src/core/ext/transport/chttp2/transport/varint.cc',
+ 'src/core/ext/transport/chttp2/transport/writing.cc',
+ 'src/core/ext/transport/chttp2/alpn/alpn.cc',
+ 'src/core/ext/filters/http/client/http_client_filter.cc',
+ 'src/core/ext/filters/http/http_filters_plugin.cc',
+ 'src/core/ext/filters/http/message_compress/message_compress_filter.cc',
+ 'src/core/ext/filters/http/server/http_server_filter.cc',
],
},
{
@@ -922,237 +925,238 @@
'gpr',
],
'sources': [
- 'src/core/lib/surface/init.c',
- 'src/core/lib/surface/init_unsecure.c',
- 'src/core/lib/channel/channel_args.c',
- 'src/core/lib/channel/channel_stack.c',
- 'src/core/lib/channel/channel_stack_builder.c',
- 'src/core/lib/channel/connected_channel.c',
- 'src/core/lib/channel/handshaker.c',
- 'src/core/lib/channel/handshaker_factory.c',
- 'src/core/lib/channel/handshaker_registry.c',
- 'src/core/lib/compression/compression.c',
- 'src/core/lib/compression/compression_internal.c',
- 'src/core/lib/compression/message_compress.c',
- 'src/core/lib/compression/stream_compression.c',
- 'src/core/lib/compression/stream_compression_gzip.c',
- 'src/core/lib/compression/stream_compression_identity.c',
- 'src/core/lib/debug/stats.c',
- 'src/core/lib/debug/stats_data.c',
- 'src/core/lib/http/format_request.c',
- 'src/core/lib/http/httpcli.c',
- 'src/core/lib/http/parser.c',
- 'src/core/lib/iomgr/call_combiner.c',
- 'src/core/lib/iomgr/closure.c',
- 'src/core/lib/iomgr/combiner.c',
- 'src/core/lib/iomgr/endpoint.c',
- 'src/core/lib/iomgr/endpoint_pair_posix.c',
- 'src/core/lib/iomgr/endpoint_pair_uv.c',
- 'src/core/lib/iomgr/endpoint_pair_windows.c',
- 'src/core/lib/iomgr/error.c',
- 'src/core/lib/iomgr/ev_epoll1_linux.c',
- 'src/core/lib/iomgr/ev_epollex_linux.c',
- 'src/core/lib/iomgr/ev_epollsig_linux.c',
- 'src/core/lib/iomgr/ev_poll_posix.c',
- 'src/core/lib/iomgr/ev_posix.c',
- 'src/core/lib/iomgr/ev_windows.c',
- 'src/core/lib/iomgr/exec_ctx.c',
- 'src/core/lib/iomgr/executor.c',
- 'src/core/lib/iomgr/gethostname_fallback.c',
- 'src/core/lib/iomgr/gethostname_host_name_max.c',
- 'src/core/lib/iomgr/gethostname_sysconf.c',
- 'src/core/lib/iomgr/iocp_windows.c',
- 'src/core/lib/iomgr/iomgr.c',
- 'src/core/lib/iomgr/iomgr_posix.c',
- 'src/core/lib/iomgr/iomgr_uv.c',
- 'src/core/lib/iomgr/iomgr_windows.c',
- 'src/core/lib/iomgr/is_epollexclusive_available.c',
- 'src/core/lib/iomgr/load_file.c',
- 'src/core/lib/iomgr/lockfree_event.c',
- 'src/core/lib/iomgr/network_status_tracker.c',
- 'src/core/lib/iomgr/polling_entity.c',
- 'src/core/lib/iomgr/pollset_set_uv.c',
- 'src/core/lib/iomgr/pollset_set_windows.c',
- 'src/core/lib/iomgr/pollset_uv.c',
- 'src/core/lib/iomgr/pollset_windows.c',
- 'src/core/lib/iomgr/resolve_address_posix.c',
- 'src/core/lib/iomgr/resolve_address_uv.c',
- 'src/core/lib/iomgr/resolve_address_windows.c',
- 'src/core/lib/iomgr/resource_quota.c',
- 'src/core/lib/iomgr/sockaddr_utils.c',
- 'src/core/lib/iomgr/socket_factory_posix.c',
- 'src/core/lib/iomgr/socket_mutator.c',
- 'src/core/lib/iomgr/socket_utils_common_posix.c',
- 'src/core/lib/iomgr/socket_utils_linux.c',
- 'src/core/lib/iomgr/socket_utils_posix.c',
- 'src/core/lib/iomgr/socket_utils_uv.c',
- 'src/core/lib/iomgr/socket_utils_windows.c',
- 'src/core/lib/iomgr/socket_windows.c',
- 'src/core/lib/iomgr/tcp_client_posix.c',
- 'src/core/lib/iomgr/tcp_client_uv.c',
- 'src/core/lib/iomgr/tcp_client_windows.c',
- 'src/core/lib/iomgr/tcp_posix.c',
- 'src/core/lib/iomgr/tcp_server_posix.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_common.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c',
- 'src/core/lib/iomgr/tcp_server_uv.c',
- 'src/core/lib/iomgr/tcp_server_windows.c',
- 'src/core/lib/iomgr/tcp_uv.c',
- 'src/core/lib/iomgr/tcp_windows.c',
- 'src/core/lib/iomgr/time_averaged_stats.c',
- 'src/core/lib/iomgr/timer_generic.c',
- 'src/core/lib/iomgr/timer_heap.c',
- 'src/core/lib/iomgr/timer_manager.c',
- 'src/core/lib/iomgr/timer_uv.c',
- 'src/core/lib/iomgr/udp_server.c',
- 'src/core/lib/iomgr/unix_sockets_posix.c',
- 'src/core/lib/iomgr/unix_sockets_posix_noop.c',
- 'src/core/lib/iomgr/wakeup_fd_cv.c',
- 'src/core/lib/iomgr/wakeup_fd_eventfd.c',
- 'src/core/lib/iomgr/wakeup_fd_nospecial.c',
- 'src/core/lib/iomgr/wakeup_fd_pipe.c',
- 'src/core/lib/iomgr/wakeup_fd_posix.c',
- 'src/core/lib/json/json.c',
- 'src/core/lib/json/json_reader.c',
- 'src/core/lib/json/json_string.c',
- 'src/core/lib/json/json_writer.c',
- 'src/core/lib/slice/b64.c',
- 'src/core/lib/slice/percent_encoding.c',
- 'src/core/lib/slice/slice.c',
- 'src/core/lib/slice/slice_buffer.c',
- 'src/core/lib/slice/slice_hash_table.c',
- 'src/core/lib/slice/slice_intern.c',
- 'src/core/lib/slice/slice_string_helpers.c',
- 'src/core/lib/surface/alarm.c',
- 'src/core/lib/surface/api_trace.c',
- 'src/core/lib/surface/byte_buffer.c',
- 'src/core/lib/surface/byte_buffer_reader.c',
- 'src/core/lib/surface/call.c',
- 'src/core/lib/surface/call_details.c',
- 'src/core/lib/surface/call_log_batch.c',
- 'src/core/lib/surface/channel.c',
- 'src/core/lib/surface/channel_init.c',
- 'src/core/lib/surface/channel_ping.c',
- 'src/core/lib/surface/channel_stack_type.c',
- 'src/core/lib/surface/completion_queue.c',
- 'src/core/lib/surface/completion_queue_factory.c',
- 'src/core/lib/surface/event_string.c',
+ 'src/core/lib/surface/init.cc',
+ 'src/core/lib/surface/init_unsecure.cc',
+ 'src/core/lib/backoff/backoff.cc',
+ 'src/core/lib/channel/channel_args.cc',
+ 'src/core/lib/channel/channel_stack.cc',
+ 'src/core/lib/channel/channel_stack_builder.cc',
+ 'src/core/lib/channel/connected_channel.cc',
+ 'src/core/lib/channel/handshaker.cc',
+ '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/message_compress.cc',
+ 'src/core/lib/compression/stream_compression.cc',
+ 'src/core/lib/compression/stream_compression_gzip.cc',
+ 'src/core/lib/compression/stream_compression_identity.cc',
+ 'src/core/lib/debug/stats.cc',
+ 'src/core/lib/debug/stats_data.cc',
+ 'src/core/lib/http/format_request.cc',
+ 'src/core/lib/http/httpcli.cc',
+ 'src/core/lib/http/parser.cc',
+ 'src/core/lib/iomgr/call_combiner.cc',
+ 'src/core/lib/iomgr/closure.cc',
+ 'src/core/lib/iomgr/combiner.cc',
+ 'src/core/lib/iomgr/endpoint.cc',
+ 'src/core/lib/iomgr/endpoint_pair_posix.cc',
+ 'src/core/lib/iomgr/endpoint_pair_uv.cc',
+ 'src/core/lib/iomgr/endpoint_pair_windows.cc',
+ 'src/core/lib/iomgr/error.cc',
+ 'src/core/lib/iomgr/ev_epoll1_linux.cc',
+ 'src/core/lib/iomgr/ev_epollex_linux.cc',
+ 'src/core/lib/iomgr/ev_epollsig_linux.cc',
+ 'src/core/lib/iomgr/ev_poll_posix.cc',
+ 'src/core/lib/iomgr/ev_posix.cc',
+ 'src/core/lib/iomgr/ev_windows.cc',
+ 'src/core/lib/iomgr/exec_ctx.cc',
+ 'src/core/lib/iomgr/executor.cc',
+ 'src/core/lib/iomgr/gethostname_fallback.cc',
+ 'src/core/lib/iomgr/gethostname_host_name_max.cc',
+ 'src/core/lib/iomgr/gethostname_sysconf.cc',
+ 'src/core/lib/iomgr/iocp_windows.cc',
+ 'src/core/lib/iomgr/iomgr.cc',
+ 'src/core/lib/iomgr/iomgr_posix.cc',
+ 'src/core/lib/iomgr/iomgr_uv.cc',
+ 'src/core/lib/iomgr/iomgr_windows.cc',
+ 'src/core/lib/iomgr/is_epollexclusive_available.cc',
+ 'src/core/lib/iomgr/load_file.cc',
+ 'src/core/lib/iomgr/lockfree_event.cc',
+ 'src/core/lib/iomgr/network_status_tracker.cc',
+ 'src/core/lib/iomgr/polling_entity.cc',
+ 'src/core/lib/iomgr/pollset_set_uv.cc',
+ 'src/core/lib/iomgr/pollset_set_windows.cc',
+ 'src/core/lib/iomgr/pollset_uv.cc',
+ 'src/core/lib/iomgr/pollset_windows.cc',
+ 'src/core/lib/iomgr/resolve_address_posix.cc',
+ 'src/core/lib/iomgr/resolve_address_uv.cc',
+ 'src/core/lib/iomgr/resolve_address_windows.cc',
+ 'src/core/lib/iomgr/resource_quota.cc',
+ 'src/core/lib/iomgr/sockaddr_utils.cc',
+ 'src/core/lib/iomgr/socket_factory_posix.cc',
+ 'src/core/lib/iomgr/socket_mutator.cc',
+ 'src/core/lib/iomgr/socket_utils_common_posix.cc',
+ 'src/core/lib/iomgr/socket_utils_linux.cc',
+ 'src/core/lib/iomgr/socket_utils_posix.cc',
+ 'src/core/lib/iomgr/socket_utils_uv.cc',
+ 'src/core/lib/iomgr/socket_utils_windows.cc',
+ 'src/core/lib/iomgr/socket_windows.cc',
+ 'src/core/lib/iomgr/tcp_client_posix.cc',
+ 'src/core/lib/iomgr/tcp_client_uv.cc',
+ 'src/core/lib/iomgr/tcp_client_windows.cc',
+ 'src/core/lib/iomgr/tcp_posix.cc',
+ 'src/core/lib/iomgr/tcp_server_posix.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_common.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
+ 'src/core/lib/iomgr/tcp_server_uv.cc',
+ 'src/core/lib/iomgr/tcp_server_windows.cc',
+ 'src/core/lib/iomgr/tcp_uv.cc',
+ 'src/core/lib/iomgr/tcp_windows.cc',
+ 'src/core/lib/iomgr/time_averaged_stats.cc',
+ 'src/core/lib/iomgr/timer_generic.cc',
+ 'src/core/lib/iomgr/timer_heap.cc',
+ 'src/core/lib/iomgr/timer_manager.cc',
+ 'src/core/lib/iomgr/timer_uv.cc',
+ 'src/core/lib/iomgr/udp_server.cc',
+ 'src/core/lib/iomgr/unix_sockets_posix.cc',
+ 'src/core/lib/iomgr/unix_sockets_posix_noop.cc',
+ 'src/core/lib/iomgr/wakeup_fd_cv.cc',
+ 'src/core/lib/iomgr/wakeup_fd_eventfd.cc',
+ 'src/core/lib/iomgr/wakeup_fd_nospecial.cc',
+ 'src/core/lib/iomgr/wakeup_fd_pipe.cc',
+ 'src/core/lib/iomgr/wakeup_fd_posix.cc',
+ 'src/core/lib/json/json.cc',
+ 'src/core/lib/json/json_reader.cc',
+ 'src/core/lib/json/json_string.cc',
+ 'src/core/lib/json/json_writer.cc',
+ 'src/core/lib/slice/b64.cc',
+ 'src/core/lib/slice/percent_encoding.cc',
+ 'src/core/lib/slice/slice.cc',
+ 'src/core/lib/slice/slice_buffer.cc',
+ 'src/core/lib/slice/slice_hash_table.cc',
+ 'src/core/lib/slice/slice_intern.cc',
+ 'src/core/lib/slice/slice_string_helpers.cc',
+ 'src/core/lib/surface/alarm.cc',
+ 'src/core/lib/surface/api_trace.cc',
+ 'src/core/lib/surface/byte_buffer.cc',
+ 'src/core/lib/surface/byte_buffer_reader.cc',
+ 'src/core/lib/surface/call.cc',
+ 'src/core/lib/surface/call_details.cc',
+ 'src/core/lib/surface/call_log_batch.cc',
+ 'src/core/lib/surface/channel.cc',
+ 'src/core/lib/surface/channel_init.cc',
+ 'src/core/lib/surface/channel_ping.cc',
+ 'src/core/lib/surface/channel_stack_type.cc',
+ 'src/core/lib/surface/completion_queue.cc',
+ 'src/core/lib/surface/completion_queue_factory.cc',
+ 'src/core/lib/surface/event_string.cc',
'src/core/lib/surface/lame_client.cc',
- 'src/core/lib/surface/metadata_array.c',
- 'src/core/lib/surface/server.c',
- 'src/core/lib/surface/validate_metadata.c',
- 'src/core/lib/surface/version.c',
- 'src/core/lib/transport/bdp_estimator.c',
- 'src/core/lib/transport/byte_stream.c',
- 'src/core/lib/transport/connectivity_state.c',
- 'src/core/lib/transport/error_utils.c',
- 'src/core/lib/transport/metadata.c',
- 'src/core/lib/transport/metadata_batch.c',
- 'src/core/lib/transport/pid_controller.c',
- 'src/core/lib/transport/service_config.c',
- 'src/core/lib/transport/static_metadata.c',
- 'src/core/lib/transport/status_conversion.c',
- 'src/core/lib/transport/timeout_encoding.c',
- 'src/core/lib/transport/transport.c',
- 'src/core/lib/transport/transport_op_string.c',
- 'src/core/lib/debug/trace.c',
- 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c',
- 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c',
- 'src/core/ext/transport/chttp2/transport/bin_decoder.c',
- 'src/core/ext/transport/chttp2/transport/bin_encoder.c',
- 'src/core/ext/transport/chttp2/transport/chttp2_plugin.c',
- 'src/core/ext/transport/chttp2/transport/chttp2_transport.c',
- 'src/core/ext/transport/chttp2/transport/flow_control.c',
- 'src/core/ext/transport/chttp2/transport/frame_data.c',
- 'src/core/ext/transport/chttp2/transport/frame_goaway.c',
- 'src/core/ext/transport/chttp2/transport/frame_ping.c',
- 'src/core/ext/transport/chttp2/transport/frame_rst_stream.c',
- 'src/core/ext/transport/chttp2/transport/frame_settings.c',
- 'src/core/ext/transport/chttp2/transport/frame_window_update.c',
- 'src/core/ext/transport/chttp2/transport/hpack_encoder.c',
- 'src/core/ext/transport/chttp2/transport/hpack_parser.c',
- 'src/core/ext/transport/chttp2/transport/hpack_table.c',
- 'src/core/ext/transport/chttp2/transport/http2_settings.c',
- 'src/core/ext/transport/chttp2/transport/huffsyms.c',
- 'src/core/ext/transport/chttp2/transport/incoming_metadata.c',
- 'src/core/ext/transport/chttp2/transport/parsing.c',
- 'src/core/ext/transport/chttp2/transport/stream_lists.c',
- 'src/core/ext/transport/chttp2/transport/stream_map.c',
- 'src/core/ext/transport/chttp2/transport/varint.c',
- 'src/core/ext/transport/chttp2/transport/writing.c',
- 'src/core/ext/transport/chttp2/alpn/alpn.c',
- 'src/core/ext/filters/http/client/http_client_filter.c',
- 'src/core/ext/filters/http/http_filters_plugin.c',
- 'src/core/ext/filters/http/message_compress/message_compress_filter.c',
- 'src/core/ext/filters/http/server/http_server_filter.c',
- 'src/core/ext/transport/chttp2/server/chttp2_server.c',
- 'src/core/ext/transport/chttp2/client/insecure/channel_create.c',
- 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c',
- 'src/core/ext/transport/chttp2/client/chttp2_connector.c',
- 'src/core/ext/filters/client_channel/channel_connectivity.c',
- 'src/core/ext/filters/client_channel/client_channel.c',
- 'src/core/ext/filters/client_channel/client_channel_factory.c',
- 'src/core/ext/filters/client_channel/client_channel_plugin.c',
- 'src/core/ext/filters/client_channel/connector.c',
- 'src/core/ext/filters/client_channel/http_connect_handshaker.c',
- 'src/core/ext/filters/client_channel/http_proxy.c',
- 'src/core/ext/filters/client_channel/lb_policy.c',
- 'src/core/ext/filters/client_channel/lb_policy_factory.c',
- 'src/core/ext/filters/client_channel/lb_policy_registry.c',
- 'src/core/ext/filters/client_channel/parse_address.c',
- 'src/core/ext/filters/client_channel/proxy_mapper.c',
- 'src/core/ext/filters/client_channel/proxy_mapper_registry.c',
- 'src/core/ext/filters/client_channel/resolver.c',
- 'src/core/ext/filters/client_channel/resolver_factory.c',
- 'src/core/ext/filters/client_channel/resolver_registry.c',
- 'src/core/ext/filters/client_channel/retry_throttle.c',
- 'src/core/ext/filters/client_channel/subchannel.c',
- 'src/core/ext/filters/client_channel/subchannel_index.c',
- 'src/core/ext/filters/client_channel/uri_parser.c',
- 'src/core/ext/filters/deadline/deadline_filter.c',
- 'src/core/ext/transport/inproc/inproc_plugin.c',
- 'src/core/ext/transport/inproc/inproc_transport.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c',
- 'src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c',
- 'src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c',
- 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c',
- 'src/core/ext/filters/load_reporting/server_load_reporting_filter.c',
- 'src/core/ext/filters/load_reporting/server_load_reporting_plugin.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c',
+ 'src/core/lib/surface/metadata_array.cc',
+ 'src/core/lib/surface/server.cc',
+ 'src/core/lib/surface/validate_metadata.cc',
+ 'src/core/lib/surface/version.cc',
+ 'src/core/lib/transport/bdp_estimator.cc',
+ 'src/core/lib/transport/byte_stream.cc',
+ 'src/core/lib/transport/connectivity_state.cc',
+ 'src/core/lib/transport/error_utils.cc',
+ 'src/core/lib/transport/metadata.cc',
+ 'src/core/lib/transport/metadata_batch.cc',
+ 'src/core/lib/transport/pid_controller.cc',
+ 'src/core/lib/transport/service_config.cc',
+ 'src/core/lib/transport/static_metadata.cc',
+ 'src/core/lib/transport/status_conversion.cc',
+ 'src/core/lib/transport/timeout_encoding.cc',
+ 'src/core/lib/transport/transport.cc',
+ 'src/core/lib/transport/transport_op_string.cc',
+ 'src/core/lib/debug/trace.cc',
+ 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc',
+ 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc',
+ 'src/core/ext/transport/chttp2/transport/bin_decoder.cc',
+ 'src/core/ext/transport/chttp2/transport/bin_encoder.cc',
+ 'src/core/ext/transport/chttp2/transport/chttp2_plugin.cc',
+ 'src/core/ext/transport/chttp2/transport/chttp2_transport.cc',
+ 'src/core/ext/transport/chttp2/transport/flow_control.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_data.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_goaway.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_ping.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_rst_stream.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_settings.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_window_update.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_encoder.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_parser.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_table.cc',
+ 'src/core/ext/transport/chttp2/transport/http2_settings.cc',
+ 'src/core/ext/transport/chttp2/transport/huffsyms.cc',
+ 'src/core/ext/transport/chttp2/transport/incoming_metadata.cc',
+ 'src/core/ext/transport/chttp2/transport/parsing.cc',
+ 'src/core/ext/transport/chttp2/transport/stream_lists.cc',
+ 'src/core/ext/transport/chttp2/transport/stream_map.cc',
+ 'src/core/ext/transport/chttp2/transport/varint.cc',
+ 'src/core/ext/transport/chttp2/transport/writing.cc',
+ 'src/core/ext/transport/chttp2/alpn/alpn.cc',
+ 'src/core/ext/filters/http/client/http_client_filter.cc',
+ 'src/core/ext/filters/http/http_filters_plugin.cc',
+ 'src/core/ext/filters/http/message_compress/message_compress_filter.cc',
+ 'src/core/ext/filters/http/server/http_server_filter.cc',
+ 'src/core/ext/transport/chttp2/server/chttp2_server.cc',
+ 'src/core/ext/transport/chttp2/client/insecure/channel_create.cc',
+ 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc',
+ 'src/core/ext/transport/chttp2/client/chttp2_connector.cc',
+ 'src/core/ext/filters/client_channel/channel_connectivity.cc',
+ 'src/core/ext/filters/client_channel/client_channel.cc',
+ 'src/core/ext/filters/client_channel/client_channel_factory.cc',
+ 'src/core/ext/filters/client_channel/client_channel_plugin.cc',
+ 'src/core/ext/filters/client_channel/connector.cc',
+ 'src/core/ext/filters/client_channel/http_connect_handshaker.cc',
+ 'src/core/ext/filters/client_channel/http_proxy.cc',
+ 'src/core/ext/filters/client_channel/lb_policy.cc',
+ 'src/core/ext/filters/client_channel/lb_policy_factory.cc',
+ 'src/core/ext/filters/client_channel/lb_policy_registry.cc',
+ 'src/core/ext/filters/client_channel/parse_address.cc',
+ 'src/core/ext/filters/client_channel/proxy_mapper.cc',
+ 'src/core/ext/filters/client_channel/proxy_mapper_registry.cc',
+ 'src/core/ext/filters/client_channel/resolver.cc',
+ 'src/core/ext/filters/client_channel/resolver_factory.cc',
+ 'src/core/ext/filters/client_channel/resolver_registry.cc',
+ 'src/core/ext/filters/client_channel/retry_throttle.cc',
+ 'src/core/ext/filters/client_channel/subchannel.cc',
+ 'src/core/ext/filters/client_channel/subchannel_index.cc',
+ 'src/core/ext/filters/client_channel/uri_parser.cc',
+ 'src/core/ext/filters/deadline/deadline_filter.cc',
+ 'src/core/ext/transport/inproc/inproc_plugin.cc',
+ 'src/core/ext/transport/inproc/inproc_transport.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc',
+ 'src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc',
+ 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc',
+ 'src/core/ext/filters/load_reporting/server_load_reporting_filter.cc',
+ 'src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
'third_party/nanopb/pb_common.c',
'third_party/nanopb/pb_decode.c',
'third_party/nanopb/pb_encode.c',
- 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c',
- 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c',
- 'src/core/ext/census/base_resources.c',
- 'src/core/ext/census/context.c',
+ 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc',
+ 'src/core/ext/census/base_resources.cc',
+ 'src/core/ext/census/context.cc',
'src/core/ext/census/gen/census.pb.c',
'src/core/ext/census/gen/trace_context.pb.c',
- 'src/core/ext/census/grpc_context.c',
- 'src/core/ext/census/grpc_filter.c',
- 'src/core/ext/census/grpc_plugin.c',
- 'src/core/ext/census/initialize.c',
- 'src/core/ext/census/intrusive_hash_map.c',
- 'src/core/ext/census/mlog.c',
- 'src/core/ext/census/operation.c',
- 'src/core/ext/census/placeholders.c',
- 'src/core/ext/census/resource.c',
- 'src/core/ext/census/trace_context.c',
- 'src/core/ext/census/tracing.c',
- 'src/core/ext/filters/max_age/max_age_filter.c',
- 'src/core/ext/filters/message_size/message_size_filter.c',
- 'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c',
- 'src/core/ext/filters/workarounds/workaround_utils.c',
- 'src/core/plugin_registry/grpc_unsecure_plugin_registry.c',
+ 'src/core/ext/census/grpc_context.cc',
+ 'src/core/ext/census/grpc_filter.cc',
+ 'src/core/ext/census/grpc_plugin.cc',
+ 'src/core/ext/census/initialize.cc',
+ 'src/core/ext/census/intrusive_hash_map.cc',
+ 'src/core/ext/census/mlog.cc',
+ 'src/core/ext/census/operation.cc',
+ 'src/core/ext/census/placeholders.cc',
+ 'src/core/ext/census/resource.cc',
+ 'src/core/ext/census/trace_context.cc',
+ 'src/core/ext/census/tracing.cc',
+ 'src/core/ext/filters/max_age/max_age_filter.cc',
+ 'src/core/ext/filters/message_size/message_size_filter.cc',
+ 'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc',
+ 'src/core/ext/filters/workarounds/workaround_utils.cc',
+ 'src/core/plugin_registry/grpc_unsecure_plugin_registry.cc',
],
},
{
diff --git a/include/grpc++/support/channel_arguments.h b/include/grpc++/support/channel_arguments.h
index 7b6befeaf1..9dc505f008 100644
--- a/include/grpc++/support/channel_arguments.h
+++ b/include/grpc++/support/channel_arguments.h
@@ -64,6 +64,12 @@ class ChannelArguments {
/// Set the compression algorithm for the channel.
void SetCompressionAlgorithm(grpc_compression_algorithm algorithm);
+ /// Set the grpclb fallback timeout (in ms) for the channel. If this amount
+ /// of time has passed but we have not gotten any non-empty \a serverlist from
+ /// the balancer, we will fall back to use the backend address(es) returned by
+ /// the resolver.
+ void SetGrpclbFallbackTimeout(int fallback_timeout);
+
/// Set the socket mutator for the channel.
void SetSocketMutator(grpc_socket_mutator* mutator);
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h
index fab7d438aa..1de289fba4 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -313,7 +313,7 @@ GRPCAPI grpc_call_error grpc_call_cancel_with_status(grpc_call *call,
void *reserved);
/** Ref a call.
- THREAD SAFETY: grpc_call_unref is thread-compatible */
+ THREAD SAFETY: grpc_call_ref is thread-compatible */
GRPCAPI void grpc_call_ref(grpc_call *call);
/** Unref a call.
diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h
index 2005e25df2..95b1447935 100644
--- a/include/grpc/grpc_security.h
+++ b/include/grpc/grpc_security.h
@@ -249,19 +249,40 @@ typedef struct {
void *reserved;
} grpc_auth_metadata_context;
+/** Maximum number of metadata entries returnable by a credentials plugin via
+ a synchronous return. */
+#define GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX 4
+
/** grpc_metadata_credentials plugin is an API user provided structure used to
create grpc_credentials objects that can be set on a channel (composed) or
a call. See grpc_credentials_metadata_create_from_plugin below.
The grpc client stack will call the get_metadata method of the plugin for
every call in scope for the credentials created from it. */
typedef struct {
- /** The implementation of this method has to be non-blocking.
- - context is the information that can be used by the plugin to create auth
- metadata.
- - cb is the callback that needs to be called when the metadata is ready.
- - user_data needs to be passed as the first parameter of the callback. */
- void (*get_metadata)(void *state, grpc_auth_metadata_context context,
- grpc_credentials_plugin_metadata_cb cb, void *user_data);
+ /** The implementation of this method has to be non-blocking, but can
+ be performed synchronously or asynchronously.
+
+ If processing occurs synchronously, returns non-zero and populates
+ creds_md, num_creds_md, status, and error_details. In this case,
+ the caller takes ownership of the entries in creds_md and of
+ error_details. Note that if the plugin needs to return more than
+ GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX entries in creds_md, it must
+ return asynchronously.
+
+ If processing occurs asynchronously, returns zero and invokes \a cb
+ when processing is completed. \a user_data will be passed as the
+ first parameter of the callback. NOTE: \a cb MUST be invoked in a
+ different thread, not from the thread in which \a get_metadata() is
+ invoked.
+
+ \a context is the information that can be used by the plugin to create
+ auth metadata. */
+ int (*get_metadata)(
+ void *state, grpc_auth_metadata_context context,
+ grpc_credentials_plugin_metadata_cb cb, void *user_data,
+ grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
+ size_t *num_creds_md, grpc_status_code *status,
+ const char **error_details);
/** Destroys the plugin state. */
void (*destroy)(void *state);
diff --git a/include/grpc/impl/codegen/atm_gcc_atomic.h b/include/grpc/impl/codegen/atm_gcc_atomic.h
index 1793ec22b8..76ce863914 100644
--- a/include/grpc/impl/codegen/atm_gcc_atomic.h
+++ b/include/grpc/impl/codegen/atm_gcc_atomic.h
@@ -25,6 +25,7 @@
typedef intptr_t gpr_atm;
#define GPR_ATM_MAX INTPTR_MAX
+#define GPR_ATM_MIN INTPTR_MIN
#ifdef GPR_LOW_LEVEL_COUNTERS
extern gpr_atm gpr_counter_atm_cas;
diff --git a/include/grpc/impl/codegen/atm_gcc_sync.h b/include/grpc/impl/codegen/atm_gcc_sync.h
index 27ae0f63d5..a9e4da3a0f 100644
--- a/include/grpc/impl/codegen/atm_gcc_sync.h
+++ b/include/grpc/impl/codegen/atm_gcc_sync.h
@@ -25,6 +25,7 @@
typedef intptr_t gpr_atm;
#define GPR_ATM_MAX INTPTR_MAX
+#define GPR_ATM_MIN INTPTR_MIN
#define GPR_ATM_COMPILE_BARRIER_() __asm__ __volatile__("" : : : "memory")
diff --git a/include/grpc/impl/codegen/atm_windows.h b/include/grpc/impl/codegen/atm_windows.h
index dfcaa4cc37..b868d79aef 100644
--- a/include/grpc/impl/codegen/atm_windows.h
+++ b/include/grpc/impl/codegen/atm_windows.h
@@ -24,6 +24,7 @@
typedef intptr_t gpr_atm;
#define GPR_ATM_MAX INTPTR_MAX
+#define GPR_ATM_MIN INTPTR_MIN
#define gpr_atm_full_barrier MemoryBarrier
diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h
index c4844f3fe2..31577e9c65 100644
--- a/include/grpc/impl/codegen/grpc_types.h
+++ b/include/grpc/impl/codegen/grpc_types.h
@@ -288,7 +288,11 @@ typedef struct {
"grpc.experimental.tcp_max_read_chunk_size"
/* Timeout in milliseconds to use for calls to the grpclb load balancer.
If 0 or unset, the balancer calls will have no deadline. */
-#define GRPC_ARG_GRPCLB_CALL_TIMEOUT_MS "grpc.grpclb_timeout_ms"
+#define GRPC_ARG_GRPCLB_CALL_TIMEOUT_MS "grpc.grpclb_call_timeout_ms"
+/* Timeout in milliseconds to wait for the serverlist from the grpclb load
+ balancer before using fallback backend addresses from the resolver.
+ If 0, fallback will never be used. */
+#define GRPC_ARG_GRPCLB_FALLBACK_TIMEOUT_MS "grpc.grpclb_fallback_timeout_ms"
/** If non-zero, grpc server's cronet compression workaround will be enabled */
#define GRPC_ARG_WORKAROUND_CRONET_COMPRESSION \
"grpc.workaround.cronet_compression"
diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h
index 1904c636f7..baea4bcf52 100644
--- a/include/grpc/impl/codegen/port_platform.h
+++ b/include/grpc/impl/codegen/port_platform.h
@@ -183,7 +183,6 @@
#define _BSD_SOURCE
#endif
#if TARGET_OS_IPHONE
-#define GPR_FORBID_UNREACHABLE_CODE 1
#define GPR_PLATFORM_STRING "ios"
#define GPR_CPU_IPHONE 1
#define GPR_PTHREAD_TLS 1
@@ -292,10 +291,6 @@
#endif
#ifdef _MSC_VER
-#ifdef _PYTHON_MSVC
-// The Python 3.5 Windows runtime is missing InetNtop
-#define GPR_WIN_INET_NTOP
-#endif // _PYTHON_MSVC
#if _MSC_VER < 1700
typedef __int8 int8_t;
typedef __int16 int16_t;
@@ -420,4 +415,8 @@ typedef unsigned __int64 uint64_t;
#endif /* GPR_ATTRIBUTE_NO_TSAN (2) */
#endif /* GPR_ATTRIBUTE_NO_TSAN (1) */
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS
+#endif
+
#endif /* GRPC_IMPL_CODEGEN_PORT_PLATFORM_H */
diff --git a/include/grpc/module.modulemap b/include/grpc/module.modulemap
index 51bfef2cc9..226cc6cf87 100644
--- a/include/grpc/module.modulemap
+++ b/include/grpc/module.modulemap
@@ -1,12 +1,69 @@
+
framework module grpc {
umbrella header "grpc.h"
- header "byte_buffer_reader.h"
- header "grpc_security.h"
- header "grpc_security_constants.h"
header "support/alloc.h"
+ header "support/atm.h"
+ header "support/atm_gcc_atomic.h"
+ header "support/avl.h"
+ header "support/cmdline.h"
+ header "support/cpu.h"
+ header "support/histogram.h"
+ header "support/host_port.h"
+ header "support/log.h"
+ header "support/log_windows.h"
header "support/port_platform.h"
header "support/string_util.h"
+ header "support/subprocess.h"
+ header "support/sync.h"
+ header "support/sync_custom.h"
+ header "support/sync_generic.h"
+ header "support/sync_posix.h"
+ header "support/thd.h"
+ header "support/time.h"
+ header "support/tls.h"
+ header "support/tls_pthread.h"
+ header "support/useful.h"
+ header "impl/codegen/atm.h"
+ header "impl/codegen/atm_gcc_atomic.h"
+ header "impl/codegen/gpr_slice.h"
+ header "impl/codegen/gpr_types.h"
+ header "impl/codegen/port_platform.h"
+ header "impl/codegen/sync.h"
+ header "impl/codegen/sync_custom.h"
+ header "impl/codegen/sync_generic.h"
+ header "impl/codegen/sync_posix.h"
+ header "impl/codegen/byte_buffer.h"
+ header "impl/codegen/byte_buffer_reader.h"
+ header "impl/codegen/compression_types.h"
+ header "impl/codegen/connectivity_state.h"
+ header "impl/codegen/exec_ctx_fwd.h"
+ header "impl/codegen/grpc_types.h"
+ header "impl/codegen/propagation_bits.h"
+ header "impl/codegen/slice.h"
+ header "impl/codegen/status.h"
+ header "impl/codegen/atm.h"
+ header "impl/codegen/atm_gcc_atomic.h"
+ header "impl/codegen/gpr_slice.h"
+ header "impl/codegen/gpr_types.h"
+ header "impl/codegen/port_platform.h"
+ header "impl/codegen/sync.h"
+ header "impl/codegen/sync_custom.h"
+ header "impl/codegen/sync_generic.h"
+ header "impl/codegen/sync_posix.h"
+ header "grpc_security.h"
+ header "byte_buffer.h"
+ header "byte_buffer_reader.h"
+ header "compression.h"
+ header "grpc.h"
+ header "grpc_posix.h"
+ header "grpc_security_constants.h"
+ header "load_reporting.h"
+ header "slice.h"
+ header "slice_buffer.h"
+ header "status.h"
+ header "support/workaround_list.h"
+ header "census.h"
export *
module * { export * }
diff --git a/include/grpc/support/avl.h b/include/grpc/support/avl.h
index d53ff5d904..d8a5efd2ad 100644
--- a/include/grpc/support/avl.h
+++ b/include/grpc/support/avl.h
@@ -21,6 +21,10 @@
#include <grpc/support/sync.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** internal node of an AVL tree */
typedef struct gpr_avl_node {
gpr_refcount refs;
@@ -91,4 +95,8 @@ GPRAPI int gpr_avl_maybe_get(gpr_avl avl, void *key, void **value,
/** Return 1 if avl is empty, 0 otherwise */
GPRAPI int gpr_avl_is_empty(gpr_avl avl);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_SUPPORT_AVL_H */
diff --git a/package.json b/package.json
index 2e31275bf0..a0f0ff1710 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "grpc",
- "version": "1.7.0-dev",
+ "version": "1.8.0-dev",
"author": "Google Inc.",
"description": "gRPC Library for Node",
"homepage": "https://grpc.io/",
diff --git a/package.xml b/package.xml
index a26f162c35..4c2bf0ed7d 100644
--- a/package.xml
+++ b/package.xml
@@ -13,8 +13,8 @@
<date>2017-08-24</date>
<time>16:06:07</time>
<version>
- <release>1.7.0dev</release>
- <api>1.7.0dev</api>
+ <release>1.8.0dev</release>
+ <api>1.8.0dev</api>
</version>
<stability>
<release>beta</release>
@@ -100,8 +100,6 @@
<file baseinstalldir="/" name="src/core/lib/support/atomic.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/atomic_with_atm.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/atomic_with_std.h" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/backoff.h" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/block_annotate.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/env.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/memory.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/mpscq.h" role="src" />
@@ -112,52 +110,51 @@
<file baseinstalldir="/" name="src/core/lib/support/string_windows.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/time_precise.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/support/tmpfile.h" role="src" />
- <file baseinstalldir="/" name="src/core/lib/profiling/basic_timers.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/profiling/stap_timers.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/alloc.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/arena.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/atm.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/avl.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/backoff.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/cmdline.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/cpu_iphone.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/cpu_linux.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/cpu_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/cpu_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/env_linux.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/env_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/env_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/histogram.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/host_port.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/log.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/log_android.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/log_linux.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/log_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/log_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/mpscq.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/murmur_hash.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/stack_lockfree.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/string.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/string_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/string_util_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/string_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/subprocess_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/subprocess_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/sync.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/sync_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/sync_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/thd.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/thd_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/thd_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/time.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/time_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/time_precise.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/time_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/tls_pthread.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/tmpfile_msys.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/tmpfile_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/tmpfile_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/support/wrap_memcpy.c" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/profiling/basic_timers.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/profiling/stap_timers.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/alloc.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/arena.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/atm.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/avl.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/cmdline.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/cpu_iphone.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/cpu_linux.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/cpu_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/cpu_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/env_linux.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/env_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/env_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/histogram.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/host_port.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/log.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/log_android.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/log_linux.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/log_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/log_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/mpscq.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/murmur_hash.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/stack_lockfree.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/string.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/string_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/string_util_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/string_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/subprocess_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/subprocess_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/sync.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/sync_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/sync_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/thd.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/thd_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/thd_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/time.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/time_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/time_precise.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/time_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/tls_pthread.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/tmpfile_msys.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/tmpfile_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/tmpfile_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/support/wrap_memcpy.cc" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/byte_buffer.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/byte_buffer_reader.h" role="src" />
<file baseinstalldir="/" name="include/grpc/impl/codegen/compression_types.h" role="src" />
@@ -264,6 +261,7 @@
<file baseinstalldir="/" name="src/core/ext/filters/deadline/deadline_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/chttp2_connector.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/transport/inproc/inproc_transport.h" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/backoff/backoff.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channel_args.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channel_stack.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channel_stack_builder.h" role="src" />
@@ -283,6 +281,7 @@
<file baseinstalldir="/" name="src/core/lib/http/format_request.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/http/httpcli.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/http/parser.h" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/block_annotate.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/call_combiner.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/closure.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/combiner.h" role="src" />
@@ -420,268 +419,269 @@
<file baseinstalldir="/" name="src/core/ext/filters/message_size/message_size_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/workarounds/workaround_utils.h" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/init.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/channel/channel_args.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/channel/channel_stack.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/channel/channel_stack_builder.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/channel/connected_channel.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/channel/handshaker.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/channel/handshaker_factory.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/channel/handshaker_registry.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/compression/compression.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/compression/compression_internal.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/compression/message_compress.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/compression/stream_compression.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/compression/stream_compression_gzip.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/compression/stream_compression_identity.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/debug/stats.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/debug/stats_data.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/http/format_request.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/http/httpcli.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/http/parser.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/call_combiner.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/closure.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/combiner.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_uv.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/error.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/ev_epoll1_linux.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/ev_epollex_linux.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/ev_epollsig_linux.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/ev_poll_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/ev_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/ev_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/exec_ctx.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/executor.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/gethostname_fallback.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/gethostname_host_name_max.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/gethostname_sysconf.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/iocp_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_uv.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/is_epollexclusive_available.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/load_file.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/lockfree_event.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/network_status_tracker.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/polling_entity.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_uv.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_uv.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address_uv.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/resource_quota.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_utils.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/socket_factory_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/socket_mutator.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_common_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_linux.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_uv.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/socket_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client_uv.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_utils_posix_common.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_uv.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_uv.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_windows.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/time_averaged_stats.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/timer_generic.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/timer_heap.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/timer_manager.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/timer_uv.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/udp_server.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/unix_sockets_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/unix_sockets_posix_noop.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/wakeup_fd_cv.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/wakeup_fd_eventfd.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/wakeup_fd_nospecial.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/wakeup_fd_pipe.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/iomgr/wakeup_fd_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/json/json.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/json/json_reader.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/json/json_string.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/json/json_writer.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/slice/b64.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/slice/percent_encoding.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/slice/slice.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/slice/slice_buffer.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/slice/slice_hash_table.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/slice/slice_intern.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/slice/slice_string_helpers.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/alarm.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/api_trace.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/byte_buffer.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/byte_buffer_reader.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/call.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/call_details.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/call_log_batch.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/channel.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/channel_init.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/channel_ping.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/channel_stack_type.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/completion_queue.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/completion_queue_factory.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/event_string.c" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/surface/init.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/backoff/backoff.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/channel/channel_args.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/channel/channel_stack.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/channel/channel_stack_builder.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/channel/connected_channel.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/channel/handshaker.cc" role="src" />
+ <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/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" />
+ <file baseinstalldir="/" name="src/core/lib/compression/stream_compression_identity.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/debug/stats.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/debug/stats_data.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/http/format_request.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/http/httpcli.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/http/parser.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/call_combiner.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/closure.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/combiner.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_uv.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/error.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/ev_epoll1_linux.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/ev_epollex_linux.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/ev_epollsig_linux.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/ev_poll_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/ev_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/ev_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/exec_ctx.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/executor.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/gethostname_fallback.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/gethostname_host_name_max.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/gethostname_sysconf.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/iocp_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_uv.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/iomgr_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/is_epollexclusive_available.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/load_file.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/lockfree_event.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/network_status_tracker.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/polling_entity.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_uv.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_set_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_uv.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/pollset_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address_uv.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/resolve_address_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/resource_quota.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/sockaddr_utils.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/socket_factory_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/socket_mutator.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_common_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_linux.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_uv.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/socket_utils_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/socket_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client_uv.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_client_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_utils_posix_common.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_uv.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_server_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_uv.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/tcp_windows.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/time_averaged_stats.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/timer_generic.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/timer_heap.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/timer_manager.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/timer_uv.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/udp_server.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/unix_sockets_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/unix_sockets_posix_noop.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/wakeup_fd_cv.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/wakeup_fd_eventfd.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/wakeup_fd_nospecial.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/wakeup_fd_pipe.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/iomgr/wakeup_fd_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/json/json.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/json/json_reader.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/json/json_string.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/json/json_writer.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/slice/b64.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/slice/percent_encoding.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/slice/slice.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/slice/slice_buffer.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/slice/slice_hash_table.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/slice/slice_intern.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/slice/slice_string_helpers.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/surface/alarm.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/surface/api_trace.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/surface/byte_buffer.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/surface/byte_buffer_reader.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/surface/call.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/surface/call_details.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/surface/call_log_batch.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/surface/channel.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/surface/channel_init.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/surface/channel_ping.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/surface/channel_stack_type.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/surface/completion_queue.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/surface/completion_queue_factory.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/surface/event_string.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/lame_client.cc" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/metadata_array.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/server.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/validate_metadata.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/version.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/transport/bdp_estimator.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/transport/byte_stream.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/transport/connectivity_state.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/transport/error_utils.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/transport/metadata.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/transport/metadata_batch.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/transport/pid_controller.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/transport/service_config.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/transport/static_metadata.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/transport/status_conversion.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/transport/timeout_encoding.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/transport/transport.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/transport/transport_op_string.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/debug/trace.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/bin_decoder.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/bin_encoder.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/chttp2_plugin.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/chttp2_transport.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/flow_control.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/frame_data.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/frame_goaway.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/frame_ping.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/frame_rst_stream.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/frame_settings.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/frame_window_update.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/hpack_encoder.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/hpack_parser.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/hpack_table.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/http2_settings.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/huffsyms.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/incoming_metadata.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/parsing.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/stream_lists.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/stream_map.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/varint.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/writing.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/alpn/alpn.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/http/client/http_client_filter.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/http/http_filters_plugin.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/http/message_compress/message_compress_filter.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/http/server/http_server_filter.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/http/httpcli_security_connector.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/context/security_context.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/credentials/composite/composite_credentials.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/credentials/credentials.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/credentials/credentials_metadata.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/credentials/fake/fake_credentials.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/credentials/google_default/credentials_generic.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/credentials/google_default/google_default_credentials.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/credentials/iam/iam_credentials.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/credentials/jwt/json_token.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/credentials/jwt/jwt_credentials.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/credentials/jwt/jwt_verifier.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/credentials/oauth2/oauth2_credentials.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/credentials/plugin/plugin_credentials.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/credentials/ssl/ssl_credentials.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/transport/client_auth_filter.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/transport/lb_targets_info.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/transport/secure_endpoint.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/transport/security_connector.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/transport/security_handshaker.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/transport/server_auth_filter.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/transport/tsi_error.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/security/util/json_util.c" role="src" />
- <file baseinstalldir="/" name="src/core/lib/surface/init_secure.c" role="src" />
- <file baseinstalldir="/" name="src/core/tsi/fake_transport_security.c" role="src" />
- <file baseinstalldir="/" name="src/core/tsi/gts_transport_security.c" role="src" />
- <file baseinstalldir="/" name="src/core/tsi/ssl_transport_security.c" role="src" />
- <file baseinstalldir="/" name="src/core/tsi/transport_security_grpc.c" role="src" />
- <file baseinstalldir="/" name="src/core/tsi/transport_security.c" role="src" />
- <file baseinstalldir="/" name="src/core/tsi/transport_security_adapter.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/server/chttp2_server.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/secure/secure_channel_create.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/channel_connectivity.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/client_channel.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/client_channel_factory.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/client_channel_plugin.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/connector.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/http_connect_handshaker.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/http_proxy.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy_factory.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy_registry.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/parse_address.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/proxy_mapper.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/proxy_mapper_registry.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver_factory.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver_registry.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/retry_throttle.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/subchannel.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/subchannel_index.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/uri_parser.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/deadline/deadline_filter.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/chttp2_connector.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/server/insecure/server_chttp2.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/insecure/channel_create.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/inproc/inproc_plugin.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/transport/inproc/inproc_transport.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/surface/metadata_array.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/surface/server.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/surface/validate_metadata.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/surface/version.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/transport/bdp_estimator.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/transport/byte_stream.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/transport/connectivity_state.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/transport/error_utils.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/transport/metadata.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/transport/metadata_batch.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/transport/pid_controller.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/transport/service_config.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/transport/static_metadata.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/transport/status_conversion.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/transport/timeout_encoding.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/transport/transport.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/transport/transport_op_string.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/debug/trace.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/bin_decoder.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/bin_encoder.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/chttp2_plugin.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/chttp2_transport.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/flow_control.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/frame_data.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/frame_goaway.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/frame_ping.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/frame_rst_stream.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/frame_settings.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/frame_window_update.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/hpack_encoder.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/hpack_parser.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/hpack_table.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/http2_settings.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/huffsyms.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/incoming_metadata.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/parsing.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/stream_lists.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/stream_map.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/varint.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/writing.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/alpn/alpn.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/http/client/http_client_filter.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/http/http_filters_plugin.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/http/message_compress/message_compress_filter.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/http/server/http_server_filter.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/http/httpcli_security_connector.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/context/security_context.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/credentials/composite/composite_credentials.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/credentials/credentials.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/credentials/credentials_metadata.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/credentials/fake/fake_credentials.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/credentials/google_default/credentials_generic.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/credentials/google_default/google_default_credentials.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/credentials/iam/iam_credentials.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/credentials/jwt/json_token.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/credentials/jwt/jwt_credentials.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/credentials/jwt/jwt_verifier.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/credentials/oauth2/oauth2_credentials.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/credentials/plugin/plugin_credentials.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/credentials/ssl/ssl_credentials.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/transport/client_auth_filter.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/transport/lb_targets_info.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/transport/secure_endpoint.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/transport/security_connector.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/transport/security_handshaker.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/lib/security/transport/server_auth_filter.cc" role="src" />
+ <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/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" />
+ <file baseinstalldir="/" name="src/core/tsi/transport_security_adapter.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/server/chttp2_server.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/channel_connectivity.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/client_channel.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/client_channel_factory.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/client_channel_plugin.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/connector.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/http_connect_handshaker.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/http_proxy.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy_factory.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy_registry.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/parse_address.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/proxy_mapper.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/proxy_mapper_registry.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver_factory.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver_registry.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/retry_throttle.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/subchannel.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/subchannel_index.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/uri_parser.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/deadline/deadline_filter.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/chttp2_connector.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/insecure/channel_create.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/inproc/inproc_plugin.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/transport/inproc/inproc_transport.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb_common.c" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb_decode.c" role="src" />
<file baseinstalldir="/" name="third_party/nanopb/pb_encode.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/load_reporting/server_load_reporting_filter.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/load_reporting/server_load_reporting_plugin.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/census/base_resources.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/census/context.c" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/load_reporting/server_load_reporting_filter.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/census/base_resources.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/census/context.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/gen/census.pb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/gen/trace_context.pb.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/census/grpc_context.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/census/grpc_filter.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/census/grpc_plugin.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/census/initialize.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/census/intrusive_hash_map.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/census/mlog.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/census/operation.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/census/placeholders.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/census/resource.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/census/trace_context.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/census/tracing.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/max_age/max_age_filter.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/message_size/message_size_filter.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c" role="src" />
- <file baseinstalldir="/" name="src/core/ext/filters/workarounds/workaround_utils.c" role="src" />
- <file baseinstalldir="/" name="src/core/plugin_registry/grpc_plugin_registry.c" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/census/grpc_context.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/census/grpc_filter.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/census/grpc_plugin.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/census/initialize.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/census/intrusive_hash_map.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/census/mlog.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/census/operation.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/census/placeholders.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/census/resource.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/census/trace_context.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/census/tracing.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/max_age/max_age_filter.cc" role="src" />
+ <file baseinstalldir="/" name="src/core/ext/filters/message_size/message_size_filter.cc" role="src" />
+ <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" />
diff --git a/setup.py b/setup.py
index 12882413ce..90c9316b0d 100644
--- a/setup.py
+++ b/setup.py
@@ -110,8 +110,6 @@ if EXTRA_ENV_COMPILE_ARGS is None:
EXTRA_ENV_COMPILE_ARGS += ' -D_ftime=_ftime32 -D_timeb=__timeb32 -D_ftime_s=_ftime32_s'
else:
EXTRA_ENV_COMPILE_ARGS += ' -D_ftime=_ftime64 -D_timeb=__timeb64'
- elif 'win32' in sys.platform:
- EXTRA_ENV_COMPILE_ARGS += ' -D_PYTHON_MSVC'
elif "linux" in sys.platform:
EXTRA_ENV_COMPILE_ARGS += ' -std=c++11 -std=gnu99 -fvisibility=hidden -fno-wrapv -fno-exceptions'
elif "darwin" in sys.platform:
@@ -163,7 +161,7 @@ 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),)
+ ('GRPC_ARES', 0), ('NTDDI_VERSION', 0x06000000),)
if '64bit' in platform.architecture()[0]:
DEFINE_MACROS += (('MS_WIN64', 1),)
elif sys.version_info >= (3, 5):
diff --git a/src/compiler/objective_c_generator.cc b/src/compiler/objective_c_generator.cc
index c05d15375b..33b5fedd5c 100644
--- a/src/compiler/objective_c_generator.cc
+++ b/src/compiler/objective_c_generator.cc
@@ -17,6 +17,7 @@
*/
#include <map>
+#include <set>
#include <sstream>
#include "src/compiler/config.h"
@@ -29,7 +30,9 @@ using ::google::protobuf::compiler::objectivec::ClassName;
using ::grpc::protobuf::io::Printer;
using ::grpc::protobuf::MethodDescriptor;
using ::grpc::protobuf::ServiceDescriptor;
+using ::grpc::protobuf::FileDescriptor;
using ::std::map;
+using ::std::set;
namespace grpc_objective_c_generator {
namespace {
@@ -190,6 +193,24 @@ void PrintMethodImplementations(Printer *printer,
} // namespace
+::grpc::string GetAllMessageClasses(const FileDescriptor *file) {
+ ::grpc::string output;
+ set< ::grpc::string> classes;
+ for (int i = 0; i < file->service_count(); i++) {
+ const auto service = file->service(i);
+ for (int i = 0; i < service->method_count(); i++) {
+ const auto method = service->method(i);
+ classes.insert(ClassName(method->input_type()));
+ classes.insert(ClassName(method->output_type()));
+ }
+ }
+ for (auto one_class : classes) {
+ output += " @class " + one_class + ";\n";
+ }
+
+ return output;
+}
+
::grpc::string GetHeader(const ServiceDescriptor *service) {
::grpc::string output;
{
diff --git a/src/compiler/objective_c_generator.h b/src/compiler/objective_c_generator.h
index edbee7ff52..e912a52415 100644
--- a/src/compiler/objective_c_generator.h
+++ b/src/compiler/objective_c_generator.h
@@ -24,8 +24,12 @@
namespace grpc_objective_c_generator {
using ::grpc::protobuf::ServiceDescriptor;
+using ::grpc::protobuf::FileDescriptor;
using ::grpc::string;
+// Returns forward declaration of classes in the generated header file.
+string GetAllMessageClasses(const FileDescriptor *file);
+
// Returns the content to be included in the "global_scope" insertion point of
// the generated header file.
string GetHeader(const ServiceDescriptor *service);
diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc
index 96a3375e96..e751d0562e 100644
--- a/src/compiler/objective_c_plugin.cc
+++ b/src/compiler/objective_c_plugin.cc
@@ -58,9 +58,10 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
"#import <RxLibrary/GRXWriteable.h>\n"
"#import <RxLibrary/GRXWriter.h>\n";
- // TODO(jcanizales): Instead forward-declare the input and output types
- // and import the files in the .pbrpc.m
::grpc::string proto_imports;
+ proto_imports += "#if GPB_GRPC_FORWARD_DECLARE_MESSAGE_PROTO\n" +
+ grpc_objective_c_generator::GetAllMessageClasses(file) +
+ "#else\n";
for (int i = 0; i < file->dependency_count(); i++) {
::grpc::string header =
grpc_objective_c_generator::MessageHeaderName(file->dependency(i));
@@ -70,19 +71,20 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
grpc_generator::StripPrefix(&base_name, "google/protobuf/");
// create the import code snippet
proto_imports +=
- "#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS\n"
- " #import <" +
+ " #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS\n"
+ " #import <" +
::grpc::string(ProtobufLibraryFrameworkName) + "/" + base_name +
">\n"
- "#else\n"
- " #import \"" +
+ " #else\n"
+ " #import \"" +
header +
"\"\n"
- "#endif\n";
+ " #endif\n";
} else {
- proto_imports += ::grpc::string("#import \"") + header + "\"\n";
+ proto_imports += ::grpc::string(" #import \"") + header + "\"\n";
}
}
+ proto_imports += "#endif\n";
::grpc::string declarations;
for (int i = 0; i < file->service_count(); i++) {
@@ -106,6 +108,28 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
".pbrpc.h\"\n\n"
"#import <ProtoRPC/ProtoRPC.h>\n"
"#import <RxLibrary/GRXWriter+Immediate.h>\n";
+ for (int i = 0; i < file->dependency_count(); i++) {
+ ::grpc::string header =
+ grpc_objective_c_generator::MessageHeaderName(file->dependency(i));
+ const grpc::protobuf::FileDescriptor *dependency = file->dependency(i);
+ if (IsProtobufLibraryBundledProtoFile(dependency)) {
+ ::grpc::string base_name = header;
+ grpc_generator::StripPrefix(&base_name, "google/protobuf/");
+ // create the import code snippet
+ imports +=
+ "#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS\n"
+ " #import <" +
+ ::grpc::string(ProtobufLibraryFrameworkName) + "/" + base_name +
+ ">\n"
+ "#else\n"
+ " #import \"" +
+ header +
+ "\"\n"
+ "#endif\n";
+ } else {
+ imports += ::grpc::string("#import \"") + header + "\"\n";
+ }
+ }
::grpc::string definitions;
for (int i = 0; i < file->service_count(); i++) {
diff --git a/src/core/ext/census/base_resources.c b/src/core/ext/census/base_resources.cc
index 1f2bb39fe0..3697c6f0e0 100644
--- a/src/core/ext/census/base_resources.c
+++ b/src/core/ext/census/base_resources.cc
@@ -45,12 +45,12 @@ void define_base_resources() {
0, // n_denominators
NULL}; // denominators
define_resource(&r);
- r = (resource){(char *)"server_rpc_latency", // name
- (char *)"Server RPC latency in seconds", // description
- 0, // prefix
- 1, // n_numerators
- &numerator, // numerators
- 0, // n_denominators
- NULL}; // denominators
+ r = {(char *)"server_rpc_latency", // name
+ (char *)"Server RPC latency in seconds", // description
+ 0, // prefix
+ 1, // n_numerators
+ &numerator, // numerators
+ 0, // n_denominators
+ NULL}; // denominators
define_resource(&r);
}
diff --git a/src/core/ext/census/base_resources.h b/src/core/ext/census/base_resources.h
index 78a4d1fae5..4b1b988e3f 100644
--- a/src/core/ext/census/base_resources.h
+++ b/src/core/ext/census/base_resources.h
@@ -18,7 +18,15 @@
#ifndef GRPC_CORE_EXT_CENSUS_BASE_RESOURCES_H
#define GRPC_CORE_EXT_CENSUS_BASE_RESOURCES_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Define all base resources. This should be called by census initialization. */
void define_base_resources();
-#endif /* GRPC_CORE_EXT_CENSUS_BASE_RESOURCES_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_CENSUS_BASE_RESOURCES_H */ \ No newline at end of file
diff --git a/src/core/ext/census/census_init.c b/src/core/ext/census/census_init.cc
index d7f719ff8c..d7f719ff8c 100644
--- a/src/core/ext/census/census_init.c
+++ b/src/core/ext/census/census_init.cc
diff --git a/src/core/ext/census/census_interface.h b/src/core/ext/census/census_interface.h
index a42b68ad65..12438e3c0a 100644
--- a/src/core/ext/census/census_interface.h
+++ b/src/core/ext/census/census_interface.h
@@ -24,6 +24,10 @@
/* Maximum length of an individual census trace annotation. */
#define CENSUS_MAX_ANNOTATION_LENGTH 200
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Structure of a census op id. Define as structure because 64bit integer is not
available on every platform for C89. */
typedef struct census_op_id {
@@ -58,4 +62,8 @@ census_op_id census_tracing_start_op(void);
/* Ends tracing. Calling this function will invalidate the input op_id. */
void census_tracing_end_op(census_op_id op_id);
-#endif /* GRPC_CORE_EXT_CENSUS_CENSUS_INTERFACE_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_CENSUS_CENSUS_INTERFACE_H */ \ No newline at end of file
diff --git a/src/core/ext/census/census_log.c b/src/core/ext/census/census_log.cc
index 100047f12b..100047f12b 100644
--- a/src/core/ext/census/census_log.c
+++ b/src/core/ext/census/census_log.cc
diff --git a/src/core/ext/census/census_log.h b/src/core/ext/census/census_log.h
index 6b68b6bd37..cc9e008907 100644
--- a/src/core/ext/census/census_log.h
+++ b/src/core/ext/census/census_log.h
@@ -25,6 +25,10 @@
#define CENSUS_LOG_2_MAX_RECORD_SIZE 14 /* 2^14 = 16KB */
#define CENSUS_LOG_MAX_RECORD_SIZE (1 << CENSUS_LOG_2_MAX_RECORD_SIZE)
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Initialize the statistics logging subsystem with the given log size. A log
size of 0 will result in the smallest possible log for the platform
(approximately CENSUS_LOG_MAX_RECORD_SIZE * gpr_cpu_num_cores()). If
@@ -73,4 +77,8 @@ size_t census_log_remaining_space(void);
out-of-space. */
int census_log_out_of_space_count(void);
-#endif /* GRPC_CORE_EXT_CENSUS_CENSUS_LOG_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_CENSUS_CENSUS_LOG_H */ \ No newline at end of file
diff --git a/src/core/ext/census/census_rpc_stats.c b/src/core/ext/census/census_rpc_stats.cc
index 0aca1f109e..0aca1f109e 100644
--- a/src/core/ext/census/census_rpc_stats.c
+++ b/src/core/ext/census/census_rpc_stats.cc
diff --git a/src/core/ext/census/census_tracing.c b/src/core/ext/census/census_tracing.cc
index 199b260dd1..199b260dd1 100644
--- a/src/core/ext/census/census_tracing.c
+++ b/src/core/ext/census/census_tracing.cc
diff --git a/src/core/ext/census/context.c b/src/core/ext/census/context.cc
index 9b25a32e36..9b25a32e36 100644
--- a/src/core/ext/census/context.c
+++ b/src/core/ext/census/context.cc
diff --git a/src/core/ext/census/grpc_context.c b/src/core/ext/census/grpc_context.cc
index 0bfba63a5e..0bfba63a5e 100644
--- a/src/core/ext/census/grpc_context.c
+++ b/src/core/ext/census/grpc_context.cc
diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.cc
index b37ab90389..b37ab90389 100644
--- a/src/core/ext/census/grpc_filter.c
+++ b/src/core/ext/census/grpc_filter.cc
diff --git a/src/core/ext/census/grpc_filter.h b/src/core/ext/census/grpc_filter.h
index baa7bb931a..7940363061 100644
--- a/src/core/ext/census/grpc_filter.h
+++ b/src/core/ext/census/grpc_filter.h
@@ -21,9 +21,17 @@
#include "src/core/lib/channel/channel_stack.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Census filters: provides tracing and stats collection functionalities. It
needs to reside right below the surface filter in the channel stack. */
extern const grpc_channel_filter grpc_client_census_filter;
extern const grpc_channel_filter grpc_server_census_filter;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_CENSUS_GRPC_FILTER_H */
diff --git a/src/core/ext/census/grpc_plugin.c b/src/core/ext/census/grpc_plugin.cc
index c0efe5afb8..22b16c6c63 100644
--- a/src/core/ext/census/grpc_plugin.c
+++ b/src/core/ext/census/grpc_plugin.cc
@@ -50,7 +50,7 @@ static bool maybe_add_census_filter(grpc_exec_ctx *exec_ctx,
return true;
}
-void census_grpc_plugin_init(void) {
+extern "C" void census_grpc_plugin_init(void) {
/* Only initialize census if no one else has and some features are
* available. */
if (census_enabled() == CENSUS_FEATURE_NONE &&
@@ -67,4 +67,4 @@ void census_grpc_plugin_init(void) {
(void *)&grpc_server_census_filter);
}
-void census_grpc_plugin_shutdown(void) { census_shutdown(); }
+extern "C" void census_grpc_plugin_shutdown(void) { census_shutdown(); }
diff --git a/src/core/ext/census/hash_table.c b/src/core/ext/census/hash_table.cc
index 545b0857c7..545b0857c7 100644
--- a/src/core/ext/census/hash_table.c
+++ b/src/core/ext/census/hash_table.cc
diff --git a/src/core/ext/census/hash_table.h b/src/core/ext/census/hash_table.h
index 75770641c5..c22ba8df9d 100644
--- a/src/core/ext/census/hash_table.h
+++ b/src/core/ext/census/hash_table.h
@@ -23,6 +23,10 @@
#include <grpc/support/port_platform.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* A chain based hash table with fixed number of buckets.
Your probably shouldn't use this code directly. It is implemented for the
use case in census trace store and stats store, where number of entries in
@@ -113,4 +117,8 @@ typedef void (*census_ht_itr_cb)(census_ht_key key, const void *val_ptr,
should not invalidate data entries. */
uint64_t census_ht_for_all(const census_ht *ht, census_ht_itr_cb);
-#endif /* GRPC_CORE_EXT_CENSUS_HASH_TABLE_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_CENSUS_HASH_TABLE_H */ \ No newline at end of file
diff --git a/src/core/ext/census/initialize.c b/src/core/ext/census/initialize.cc
index 165a1221d4..165a1221d4 100644
--- a/src/core/ext/census/initialize.c
+++ b/src/core/ext/census/initialize.cc
diff --git a/src/core/ext/census/intrusive_hash_map.c b/src/core/ext/census/intrusive_hash_map.cc
index 7930486963..7930486963 100644
--- a/src/core/ext/census/intrusive_hash_map.c
+++ b/src/core/ext/census/intrusive_hash_map.cc
diff --git a/src/core/ext/census/intrusive_hash_map.h b/src/core/ext/census/intrusive_hash_map.h
index f50de4fab4..2c7baa31fb 100644
--- a/src/core/ext/census/intrusive_hash_map.h
+++ b/src/core/ext/census/intrusive_hash_map.h
@@ -21,6 +21,10 @@
#include "src/core/ext/census/intrusive_hash_map_internal.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* intrusive_hash_map is a fast chained hash table. This hash map is faster than
* a dense hash map when the application calls insert and erase more often than
* find. When the workload is dominated by find() a dense hash map may be
@@ -149,4 +153,8 @@ void intrusive_hash_map_clear(intrusive_hash_map *hash_map,
void intrusive_hash_map_free(intrusive_hash_map *hash_map,
void (*free_object)(void *));
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_CENSUS_INTRUSIVE_HASH_MAP_H */
diff --git a/src/core/ext/census/mlog.c b/src/core/ext/census/mlog.cc
index 4b8c8466b3..4b8c8466b3 100644
--- a/src/core/ext/census/mlog.c
+++ b/src/core/ext/census/mlog.cc
diff --git a/src/core/ext/census/mlog.h b/src/core/ext/census/mlog.h
index 6f3125944f..7b4d39272b 100644
--- a/src/core/ext/census/mlog.h
+++ b/src/core/ext/census/mlog.h
@@ -28,6 +28,10 @@
#define CENSUS_LOG_2_MAX_RECORD_SIZE 14 /* 2^14 = 16KB */
#define CENSUS_LOG_MAX_RECORD_SIZE (1 << CENSUS_LOG_2_MAX_RECORD_SIZE)
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Initialize the statistics logging subsystem with the given log size. A log
size of 0 will result in the smallest possible log for the platform
(approximately CENSUS_LOG_MAX_RECORD_SIZE * gpr_cpu_num_cores()). If
@@ -77,4 +81,8 @@ size_t census_log_remaining_space(void);
out-of-space. */
int64_t census_log_out_of_space_count(void);
-#endif /* GRPC_CORE_EXT_CENSUS_MLOG_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_CENSUS_MLOG_H */ \ No newline at end of file
diff --git a/src/core/ext/census/operation.c b/src/core/ext/census/operation.cc
index be88ac74e6..be88ac74e6 100644
--- a/src/core/ext/census/operation.c
+++ b/src/core/ext/census/operation.cc
diff --git a/src/core/ext/census/placeholders.c b/src/core/ext/census/placeholders.cc
index bed9837ee3..bed9837ee3 100644
--- a/src/core/ext/census/placeholders.c
+++ b/src/core/ext/census/placeholders.cc
diff --git a/src/core/ext/census/resource.c b/src/core/ext/census/resource.cc
index 44a887231c..44a887231c 100644
--- a/src/core/ext/census/resource.c
+++ b/src/core/ext/census/resource.cc
diff --git a/src/core/ext/census/resource.h b/src/core/ext/census/resource.h
index b8bda2c72e..5f7ac2ad27 100644
--- a/src/core/ext/census/resource.h
+++ b/src/core/ext/census/resource.h
@@ -23,6 +23,10 @@
#include <grpc/grpc.h>
#include "src/core/ext/census/gen/census.pb.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Internal representation of a resource. */
typedef struct {
char *name;
@@ -45,4 +49,8 @@ void shutdown_resources(void);
from configuration files. */
int32_t define_resource(const resource *base);
-#endif /* GRPC_CORE_EXT_CENSUS_RESOURCE_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_CENSUS_RESOURCE_H */ \ No newline at end of file
diff --git a/src/core/ext/census/trace_context.c b/src/core/ext/census/trace_context.cc
index af92ae6d9e..af92ae6d9e 100644
--- a/src/core/ext/census/trace_context.c
+++ b/src/core/ext/census/trace_context.cc
diff --git a/src/core/ext/census/trace_context.h b/src/core/ext/census/trace_context.h
index a7233e6a2b..c707c63263 100644
--- a/src/core/ext/census/trace_context.h
+++ b/src/core/ext/census/trace_context.h
@@ -39,6 +39,10 @@
1 byte for is_sampled (bool) */
#define TRACE_MAX_CONTEXT_SIZE 31
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Encode a trace context (ctxt) into proto format to the buffer provided. The
size of buffer must be at least TRACE_MAX_CONTEXT_SIZE. On success, returns the
number of bytes successfully encoded into buffer. On failure, returns 0. */
@@ -53,4 +57,8 @@ of these do not exist. On success, returns true and false otherwise. */
bool decode_trace_context(google_trace_TraceContext *ctxt, uint8_t *buffer,
const size_t nbytes);
-#endif /* GRPC_CORE_EXT_CENSUS_TRACE_CONTEXT_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_CENSUS_TRACE_CONTEXT_H */ \ No newline at end of file
diff --git a/src/core/ext/census/trace_propagation.h b/src/core/ext/census/trace_propagation.h
index eecfcb7d01..3394e9e0fd 100644
--- a/src/core/ext/census/trace_propagation.h
+++ b/src/core/ext/census/trace_propagation.h
@@ -21,6 +21,10 @@
#include "src/core/ext/census/tracing.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Encoding and decoding functions for receiving and sending trace contexts
over the wire. Only RPC libraries should be calling these
functions. These functions return the number of bytes encoded/decoded
@@ -45,4 +49,8 @@ size_t trace_span_context_to_http_format(const trace_span_context *ctxt,
size_t http_format_to_trace_span_context(const char *buf, size_t buf_size,
trace_span_context *ctxt);
-#endif /* GRPC_CORE_EXT_CENSUS_TRACE_PROPAGATION_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_CENSUS_TRACE_PROPAGATION_H */ \ No newline at end of file
diff --git a/src/core/ext/census/tracing.c b/src/core/ext/census/tracing.cc
index 823c681abf..823c681abf 100644
--- a/src/core/ext/census/tracing.c
+++ b/src/core/ext/census/tracing.cc
diff --git a/src/core/ext/census/tracing.h b/src/core/ext/census/tracing.h
index 038c9e2790..5fcbb1e1f7 100644
--- a/src/core/ext/census/tracing.h
+++ b/src/core/ext/census/tracing.h
@@ -25,6 +25,10 @@
#include "src/core/ext/census/trace_label.h"
#include "src/core/ext/census/trace_status.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* This is the low level tracing API that other languages will interface with.
This is not intended to be accessed by the end-user, therefore it has been
designed with performance in mind rather than ease of use. */
@@ -106,4 +110,8 @@ free to ignore all further calls using the Span. EndSpanOptions can
optionally be NULL. */
void trace_end_span(const trace_status *status, trace_span_context *span_ctxt);
-#endif /* GRPC_CORE_EXT_CENSUS_TRACING_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_CENSUS_TRACING_H */ \ No newline at end of file
diff --git a/src/core/ext/census/window_stats.c b/src/core/ext/census/window_stats.cc
index 0058e4bf9c..0058e4bf9c 100644
--- a/src/core/ext/census/window_stats.c
+++ b/src/core/ext/census/window_stats.cc
diff --git a/src/core/ext/census/window_stats.h b/src/core/ext/census/window_stats.h
index ebe3732008..3b1d197f76 100644
--- a/src/core/ext/census/window_stats.h
+++ b/src/core/ext/census/window_stats.h
@@ -21,6 +21,10 @@
#include <grpc/support/time.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Keep rolling sums of a user-defined statistic (containing a number of
measurements) over a a number of time intervals ("windows"). For example,
you can use a window_stats object to answer questions such as
@@ -155,4 +159,8 @@ void census_window_stats_get_sums(const struct census_window_stats *wstats,
assertion failure). This function is thread-compatible. */
void census_window_stats_destroy(struct census_window_stats *wstats);
-#endif /* GRPC_CORE_EXT_CENSUS_WINDOW_STATS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_CENSUS_WINDOW_STATS_H */ \ No newline at end of file
diff --git a/src/core/ext/filters/client_channel/channel_connectivity.c b/src/core/ext/filters/client_channel/channel_connectivity.cc
index 3844b98021..31a8fc39ce 100644
--- a/src/core/ext/filters/client_channel/channel_connectivity.c
+++ b/src/core/ext/filters/client_channel/channel_connectivity.cc
@@ -18,6 +18,8 @@
#include "src/core/lib/surface/channel.h"
+#include <inttypes.h>
+
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
@@ -186,8 +188,8 @@ static void watcher_timer_init(grpc_exec_ctx *exec_ctx, void *arg,
watcher_timer_init_arg *wa = (watcher_timer_init_arg *)arg;
grpc_timer_init(exec_ctx, &wa->w->alarm,
- gpr_convert_clock_type(wa->deadline, GPR_CLOCK_MONOTONIC),
- &wa->w->on_timeout, gpr_now(GPR_CLOCK_MONOTONIC));
+ grpc_timespec_to_millis_round_up(wa->deadline),
+ &wa->w->on_timeout);
gpr_free(wa);
}
diff --git a/src/core/ext/filters/client_channel/client_channel.c b/src/core/ext/filters/client_channel/client_channel.cc
index 016199b1f4..22c2bc8880 100644
--- a/src/core/ext/filters/client_channel/client_channel.c
+++ b/src/core/ext/filters/client_channel/client_channel.cc
@@ -16,8 +16,11 @@
*
*/
+#include <grpc/support/port_platform.h>
+
#include "src/core/ext/filters/client_channel/client_channel.h"
+#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
@@ -68,7 +71,7 @@ typedef enum {
typedef struct {
gpr_refcount refs;
- gpr_timespec timeout;
+ grpc_millis timeout;
wait_for_ready_value wait_for_ready;
} method_parameters;
@@ -98,17 +101,18 @@ static bool parse_wait_for_ready(grpc_json *field,
return true;
}
-static bool parse_timeout(grpc_json *field, gpr_timespec *timeout) {
+static bool parse_timeout(grpc_json *field, grpc_millis *timeout) {
if (field->type != GRPC_JSON_STRING) return false;
size_t len = strlen(field->value);
if (field->value[len - 1] != 's') return false;
char *buf = gpr_strdup(field->value);
buf[len - 1] = '\0'; // Remove trailing 's'.
char *decimal_point = strchr(buf, '.');
+ int nanos = 0;
if (decimal_point != NULL) {
*decimal_point = '\0';
- timeout->tv_nsec = gpr_parse_nonnegative_int(decimal_point + 1);
- if (timeout->tv_nsec == -1) {
+ nanos = gpr_parse_nonnegative_int(decimal_point + 1);
+ if (nanos == -1) {
gpr_free(buf);
return false;
}
@@ -127,24 +131,25 @@ static bool parse_timeout(grpc_json *field, gpr_timespec *timeout) {
gpr_free(buf);
return false;
}
- timeout->tv_nsec *= multiplier;
+ nanos *= multiplier;
}
- timeout->tv_sec = gpr_parse_nonnegative_int(buf);
+ int seconds = gpr_parse_nonnegative_int(buf);
gpr_free(buf);
- if (timeout->tv_sec == -1) return false;
+ if (seconds == -1) return false;
+ *timeout = seconds * GPR_MS_PER_SEC + nanos / GPR_NS_PER_MS;
return true;
}
static void *method_parameters_create_from_json(const grpc_json *json) {
wait_for_ready_value wait_for_ready = WAIT_FOR_READY_UNSET;
- gpr_timespec timeout = {0, 0, GPR_TIMESPAN};
+ grpc_millis timeout = 0;
for (grpc_json *field = json->child; field != NULL; field = field->next) {
if (field->key == NULL) continue;
if (strcmp(field->key, "waitForReady") == 0) {
if (wait_for_ready != WAIT_FOR_READY_UNSET) return NULL; // Duplicate.
if (!parse_wait_for_ready(field, &wait_for_ready)) return NULL;
} else if (strcmp(field->key, "timeout") == 0) {
- if (timeout.tv_sec > 0 || timeout.tv_nsec > 0) return NULL; // Duplicate.
+ if (timeout > 0) return NULL; // Duplicate.
if (!parse_timeout(field, &timeout)) return NULL;
}
}
@@ -823,7 +828,7 @@ typedef struct client_channel_call_data {
grpc_slice path; // Request path.
gpr_timespec call_start_time;
- gpr_timespec deadline;
+ grpc_millis deadline;
gpr_arena *arena;
grpc_call_stack *owning_call;
grpc_call_combiner *call_combiner;
@@ -976,11 +981,11 @@ static void apply_service_config_to_call_locked(grpc_exec_ctx *exec_ctx,
// If the deadline from the service config is shorter than the one
// from the client API, reset the deadline timer.
if (chand->deadline_checking_enabled &&
- gpr_time_cmp(calld->method_params->timeout,
- gpr_time_0(GPR_TIMESPAN)) != 0) {
- const gpr_timespec per_method_deadline =
- gpr_time_add(calld->call_start_time, calld->method_params->timeout);
- if (gpr_time_cmp(per_method_deadline, calld->deadline) < 0) {
+ calld->method_params->timeout != 0) {
+ const grpc_millis per_method_deadline =
+ grpc_timespec_to_millis_round_up(calld->call_start_time) +
+ calld->method_params->timeout;
+ if (per_method_deadline < calld->deadline) {
calld->deadline = per_method_deadline;
grpc_deadline_state_reset(exec_ctx, elem, calld->deadline);
}
@@ -995,13 +1000,14 @@ static void create_subchannel_call_locked(grpc_exec_ctx *exec_ctx,
channel_data *chand = (channel_data *)elem->channel_data;
call_data *calld = (call_data *)elem->call_data;
const grpc_connected_subchannel_call_args call_args = {
- .pollent = calld->pollent,
- .path = calld->path,
- .start_time = calld->call_start_time,
- .deadline = calld->deadline,
- .arena = calld->arena,
- .context = calld->subchannel_call_context,
- .call_combiner = calld->call_combiner};
+ calld->pollent, // pollent
+ calld->path, // path
+ calld->call_start_time, // start_time
+ calld->deadline, // deadline
+ calld->arena, // arena
+ calld->subchannel_call_context, // context
+ calld->call_combiner // call_combiner
+ };
grpc_error *new_error = grpc_connected_subchannel_create_call(
exec_ctx, calld->connected_subchannel, &call_args,
&calld->subchannel_call);
@@ -1418,7 +1424,7 @@ static grpc_error *cc_init_call_elem(grpc_exec_ctx *exec_ctx,
// Initialize data members.
calld->path = grpc_slice_ref_internal(args->path);
calld->call_start_time = args->start_time;
- calld->deadline = gpr_convert_clock_type(args->deadline, GPR_CLOCK_MONOTONIC);
+ calld->deadline = args->deadline;
calld->arena = args->arena;
calld->owning_call = args->call_stack;
calld->call_combiner = args->call_combiner;
diff --git a/src/core/ext/filters/client_channel/client_channel.h b/src/core/ext/filters/client_channel/client_channel.h
index c99f0092e9..b32f378c6c 100644
--- a/src/core/ext/filters/client_channel/client_channel.h
+++ b/src/core/ext/filters/client_channel/client_channel.h
@@ -28,6 +28,10 @@ extern grpc_tracer_flag grpc_client_channel_trace;
// Channel arg key for server URI string.
#define GRPC_ARG_SERVER_URI "grpc.server_uri"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* A client channel is a channel that begins disconnected, and can connect
to some endpoint on demand. If that endpoint disconnects, it will be
connected to again later.
@@ -52,4 +56,8 @@ void grpc_client_channel_watch_connectivity_state(
grpc_subchannel_call *grpc_client_channel_get_subchannel_call(
grpc_call_element *elem);
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_H */ \ No newline at end of file
diff --git a/src/core/ext/filters/client_channel/client_channel_factory.c b/src/core/ext/filters/client_channel/client_channel_factory.cc
index 57eac8f875..57eac8f875 100644
--- a/src/core/ext/filters/client_channel/client_channel_factory.c
+++ b/src/core/ext/filters/client_channel/client_channel_factory.cc
diff --git a/src/core/ext/filters/client_channel/client_channel_factory.h b/src/core/ext/filters/client_channel/client_channel_factory.h
index ce6266c769..bad8b97042 100644
--- a/src/core/ext/filters/client_channel/client_channel_factory.h
+++ b/src/core/ext/filters/client_channel/client_channel_factory.h
@@ -27,6 +27,10 @@
// Channel arg key for client channel factory.
#define GRPC_ARG_CLIENT_CHANNEL_FACTORY "grpc.client_channel_factory"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_client_channel_factory grpc_client_channel_factory;
typedef struct grpc_client_channel_factory_vtable
grpc_client_channel_factory_vtable;
@@ -74,4 +78,8 @@ grpc_channel *grpc_client_channel_factory_create_channel(
grpc_arg grpc_client_channel_factory_create_channel_arg(
grpc_client_channel_factory *factory);
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_FACTORY_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_FACTORY_H */ \ No newline at end of file
diff --git a/src/core/ext/filters/client_channel/client_channel_plugin.c b/src/core/ext/filters/client_channel/client_channel_plugin.cc
index 1f71c5a7f9..4431d11519 100644
--- a/src/core/ext/filters/client_channel/client_channel_plugin.c
+++ b/src/core/ext/filters/client_channel/client_channel_plugin.cc
@@ -65,7 +65,7 @@ static bool set_default_host_if_unset(grpc_exec_ctx *exec_ctx,
return true;
}
-void grpc_client_channel_init(void) {
+extern "C" void grpc_client_channel_init(void) {
grpc_lb_policy_registry_init();
grpc_resolver_registry_init();
grpc_retry_throttle_map_init();
@@ -84,7 +84,7 @@ void grpc_client_channel_init(void) {
#endif
}
-void grpc_client_channel_shutdown(void) {
+extern "C" void grpc_client_channel_shutdown(void) {
grpc_subchannel_index_shutdown();
grpc_channel_init_shutdown();
grpc_proxy_mapper_registry_shutdown();
diff --git a/src/core/ext/filters/client_channel/connector.c b/src/core/ext/filters/client_channel/connector.cc
index c258468e58..c258468e58 100644
--- a/src/core/ext/filters/client_channel/connector.c
+++ b/src/core/ext/filters/client_channel/connector.cc
diff --git a/src/core/ext/filters/client_channel/connector.h b/src/core/ext/filters/client_channel/connector.h
index 7f3d4a1cc0..b91c93e446 100644
--- a/src/core/ext/filters/client_channel/connector.h
+++ b/src/core/ext/filters/client_channel/connector.h
@@ -23,6 +23,10 @@
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/transport/transport.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_connector grpc_connector;
typedef struct grpc_connector_vtable grpc_connector_vtable;
@@ -34,7 +38,7 @@ typedef struct {
/** set of pollsets interested in this connection */
grpc_pollset_set *interested_parties;
/** deadline for connection */
- gpr_timespec deadline;
+ grpc_millis deadline;
/** channel arguments (to be passed to transport) */
const grpc_channel_args *channel_args;
} grpc_connect_in_args;
@@ -70,4 +74,8 @@ void grpc_connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *connector,
void grpc_connector_shutdown(grpc_exec_ctx *exec_ctx, grpc_connector *connector,
grpc_error *why);
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONNECTOR_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONNECTOR_H */ \ No newline at end of file
diff --git a/src/core/ext/filters/client_channel/http_connect_handshaker.c b/src/core/ext/filters/client_channel/http_connect_handshaker.cc
index 418bb41ef6..418bb41ef6 100644
--- a/src/core/ext/filters/client_channel/http_connect_handshaker.c
+++ b/src/core/ext/filters/client_channel/http_connect_handshaker.cc
diff --git a/src/core/ext/filters/client_channel/http_connect_handshaker.h b/src/core/ext/filters/client_channel/http_connect_handshaker.h
index 928a23dc93..5042c61bec 100644
--- a/src/core/ext/filters/client_channel/http_connect_handshaker.h
+++ b/src/core/ext/filters/client_channel/http_connect_handshaker.h
@@ -28,7 +28,15 @@
/// seperated by colons.
#define GRPC_ARG_HTTP_CONNECT_HEADERS "grpc.http_connect_headers"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/// Registers handshaker factory.
void grpc_http_connect_register_handshaker_factory();
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_CONNECT_HANDSHAKER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_CONNECT_HANDSHAKER_H */ \ No newline at end of file
diff --git a/src/core/ext/filters/client_channel/http_proxy.c b/src/core/ext/filters/client_channel/http_proxy.cc
index c507a2750e..a16b44d3dc 100644
--- a/src/core/ext/filters/client_channel/http_proxy.c
+++ b/src/core/ext/filters/client_channel/http_proxy.cc
@@ -91,6 +91,7 @@ static bool proxy_mapper_map_name(grpc_exec_ctx* exec_ctx,
char* user_cred = NULL;
*name_to_resolve = get_http_proxy_server(exec_ctx, &user_cred);
if (*name_to_resolve == NULL) return false;
+ char* no_proxy_str = NULL;
grpc_uri* uri =
grpc_uri_parse(exec_ctx, server_uri, false /* suppress_errors */);
if (uri == NULL || uri->path[0] == '\0') {
@@ -98,20 +99,14 @@ static bool proxy_mapper_map_name(grpc_exec_ctx* exec_ctx,
"'http_proxy' environment variable set, but cannot "
"parse server URI '%s' -- not using proxy",
server_uri);
- if (uri != NULL) {
- gpr_free(user_cred);
- grpc_uri_destroy(uri);
- }
- return false;
+ goto no_use_proxy;
}
if (strcmp(uri->scheme, "unix") == 0) {
gpr_log(GPR_INFO, "not using proxy for Unix domain socket '%s'",
server_uri);
- gpr_free(user_cred);
- grpc_uri_destroy(uri);
- return false;
+ goto no_use_proxy;
}
- char* no_proxy_str = gpr_getenv("no_proxy");
+ no_proxy_str = gpr_getenv("no_proxy");
if (no_proxy_str != NULL) {
static const char* NO_PROXY_SEPARATOR = ",";
bool use_proxy = true;
@@ -147,12 +142,7 @@ static bool proxy_mapper_map_name(grpc_exec_ctx* exec_ctx,
gpr_free(no_proxy_hosts);
gpr_free(server_host);
gpr_free(server_port);
- if (!use_proxy) {
- grpc_uri_destroy(uri);
- gpr_free(*name_to_resolve);
- *name_to_resolve = NULL;
- return false;
- }
+ if (!use_proxy) goto no_use_proxy;
}
}
grpc_arg args_to_add[2];
@@ -173,9 +163,15 @@ static bool proxy_mapper_map_name(grpc_exec_ctx* exec_ctx,
} else {
*new_args = grpc_channel_args_copy_and_add(args, args_to_add, 1);
}
- gpr_free(user_cred);
grpc_uri_destroy(uri);
+ gpr_free(user_cred);
return true;
+no_use_proxy:
+ if (uri != NULL) grpc_uri_destroy(uri);
+ gpr_free(*name_to_resolve);
+ *name_to_resolve = NULL;
+ gpr_free(user_cred);
+ return false;
}
static bool proxy_mapper_map_address(grpc_exec_ctx* exec_ctx,
diff --git a/src/core/ext/filters/client_channel/http_proxy.h b/src/core/ext/filters/client_channel/http_proxy.h
index 34694931d0..65d52334af 100644
--- a/src/core/ext/filters/client_channel/http_proxy.h
+++ b/src/core/ext/filters/client_channel/http_proxy.h
@@ -19,6 +19,14 @@
#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_PROXY_H
#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_PROXY_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void grpc_register_http_proxy_mapper();
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_PROXY_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_HTTP_PROXY_H */ \ No newline at end of file
diff --git a/src/core/ext/filters/client_channel/lb_policy.c b/src/core/ext/filters/client_channel/lb_policy.cc
index 8e6673d737..8e6673d737 100644
--- a/src/core/ext/filters/client_channel/lb_policy.c
+++ b/src/core/ext/filters/client_channel/lb_policy.cc
diff --git a/src/core/ext/filters/client_channel/lb_policy.h b/src/core/ext/filters/client_channel/lb_policy.h
index 645d51e138..010299c2f4 100644
--- a/src/core/ext/filters/client_channel/lb_policy.h
+++ b/src/core/ext/filters/client_channel/lb_policy.h
@@ -23,6 +23,10 @@
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/transport/connectivity_state.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** A load balancing policy: specified by a vtable and a struct (which
is expected to be extended to contain some parameters) */
typedef struct grpc_lb_policy grpc_lb_policy;
@@ -204,4 +208,8 @@ void grpc_lb_policy_update_locked(grpc_exec_ctx *exec_ctx,
grpc_lb_policy *policy,
const grpc_lb_policy_args *lb_policy_args);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_H */
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c b/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc
index 7ad322902b..7ad322902b 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h
index 51e30b20b8..c6a0d69c3f 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h
@@ -21,7 +21,15 @@
#include "src/core/lib/channel/channel_stack.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern const grpc_channel_filter grpc_client_load_reporting_filter;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_CLIENT_LOAD_REPORTING_FILTER_H \
*/
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
index 85ef7894ea..53fa0fff04 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
@@ -80,6 +80,7 @@
headers. Therefore, sockaddr.h must always be included first */
#include "src/core/lib/iomgr/sockaddr.h"
+#include <inttypes.h>
#include <limits.h>
#include <string.h>
@@ -102,6 +103,7 @@
#include "src/core/ext/filters/client_channel/parse_address.h"
#include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h"
#include "src/core/ext/filters/client_channel/subchannel_index.h"
+#include "src/core/lib/backoff/backoff.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/iomgr/combiner.h"
@@ -111,7 +113,6 @@
#include "src/core/lib/slice/slice_hash_table.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_string_helpers.h"
-#include "src/core/lib/support/backoff.h"
#include "src/core/lib/support/string.h"
#include "src/core/lib/surface/call.h"
#include "src/core/lib/surface/channel.h"
@@ -123,6 +124,7 @@
#define GRPC_GRPCLB_RECONNECT_BACKOFF_MULTIPLIER 1.6
#define GRPC_GRPCLB_RECONNECT_MAX_BACKOFF_SECONDS 120
#define GRPC_GRPCLB_RECONNECT_JITTER 0.2
+#define GRPC_GRPCLB_DEFAULT_FALLBACK_TIMEOUT_MS 10000
grpc_tracer_flag grpc_lb_glb_trace = GRPC_TRACER_INITIALIZER(false, "glb");
@@ -299,6 +301,10 @@ typedef struct glb_lb_policy {
/** timeout in milliseconds for the LB call. 0 means no deadline. */
int lb_call_timeout_ms;
+ /** timeout in milliseconds for before using fallback backend addresses.
+ * 0 means not using fallback. */
+ int lb_fallback_timeout_ms;
+
/** for communicating with the LB server */
grpc_channel *lb_channel;
@@ -325,6 +331,9 @@ typedef struct glb_lb_policy {
* Otherwise, we delegate to the RR policy. */
size_t serverlist_index;
+ /** stores the backend addresses from the resolver */
+ grpc_lb_addresses *fallback_backend_addresses;
+
/** list of picks that are waiting on RR's policy connectivity */
pending_pick *pending_picks;
@@ -345,6 +354,9 @@ typedef struct glb_lb_policy {
/** is \a lb_call_retry_timer active? */
bool retry_timer_active;
+ /** is \a lb_fallback_timer active? */
+ bool fallback_timer_active;
+
/** called upon changes to the LB channel's connectivity. */
grpc_closure lb_channel_on_connectivity_changed;
@@ -354,9 +366,6 @@ typedef struct glb_lb_policy {
/************************************************************/
/* client data associated with the LB server communication */
/************************************************************/
- /* Finished sending initial request. */
- grpc_closure lb_on_sent_initial_request;
-
/* Status from the LB server has been received. This signals the end of the LB
* call. */
grpc_closure lb_on_server_status_received;
@@ -367,6 +376,9 @@ typedef struct glb_lb_policy {
/* LB call retry timer callback. */
grpc_closure lb_on_call_retry;
+ /* LB fallback timer callback. */
+ grpc_closure lb_on_fallback;
+
grpc_call *lb_call; /* streaming call to the LB server, */
grpc_metadata_array lb_initial_metadata_recv; /* initial MD from LB server */
@@ -385,19 +397,21 @@ typedef struct glb_lb_policy {
grpc_slice lb_call_status_details;
/** LB call retry backoff state */
- gpr_backoff lb_call_backoff_state;
+ grpc_backoff lb_call_backoff_state;
/** LB call retry timer */
grpc_timer lb_call_retry_timer;
- bool initial_request_sent;
+ /** LB fallback timer */
+ grpc_timer lb_fallback_timer;
+
bool seen_initial_response;
/* Stats for client-side load reporting. Should be unreffed and
* recreated whenever lb_call is replaced. */
grpc_grpclb_client_stats *client_stats;
/* Interval and timer for next client load report. */
- gpr_timespec client_stats_report_interval;
+ grpc_millis client_stats_report_interval;
grpc_timer client_load_report_timer;
bool client_load_report_timer_pending;
bool last_client_load_report_counters_were_zero;
@@ -443,11 +457,11 @@ static bool is_server_valid(const grpc_grpclb_server *server, size_t idx,
static void *lb_token_copy(void *token) {
return token == NULL
? NULL
- : (void *)GRPC_MDELEM_REF((grpc_mdelem){(uintptr_t)token}).payload;
+ : (void *)GRPC_MDELEM_REF(grpc_mdelem{(uintptr_t)token}).payload;
}
static void lb_token_destroy(grpc_exec_ctx *exec_ctx, void *token) {
if (token != NULL) {
- GRPC_MDELEM_UNREF(exec_ctx, (grpc_mdelem){(uintptr_t)token});
+ GRPC_MDELEM_UNREF(exec_ctx, grpc_mdelem{(uintptr_t)token});
}
}
static int lb_token_cmp(void *token1, void *token2) {
@@ -536,6 +550,32 @@ static grpc_lb_addresses *process_serverlist_locked(
return lb_addresses;
}
+/* Returns the backend addresses extracted from the given addresses */
+static grpc_lb_addresses *extract_backend_addresses_locked(
+ grpc_exec_ctx *exec_ctx, const grpc_lb_addresses *addresses) {
+ /* first pass: count the number of backend addresses */
+ size_t num_backends = 0;
+ for (size_t i = 0; i < addresses->num_addresses; ++i) {
+ if (!addresses->addresses[i].is_balancer) {
+ ++num_backends;
+ }
+ }
+ /* second pass: actually populate the addresses and (empty) LB tokens */
+ grpc_lb_addresses *backend_addresses =
+ grpc_lb_addresses_create(num_backends, &lb_token_vtable);
+ size_t num_copied = 0;
+ for (size_t i = 0; i < addresses->num_addresses; ++i) {
+ if (addresses->addresses[i].is_balancer) continue;
+ const grpc_resolved_address *addr = &addresses->addresses[i].address;
+ grpc_lb_addresses_set_address(backend_addresses, num_copied, &addr->addr,
+ addr->len, false /* is_balancer */,
+ NULL /* balancer_name */,
+ (void *)GRPC_MDELEM_LB_TOKEN_EMPTY.payload);
+ ++num_copied;
+ }
+ return backend_addresses;
+}
+
static void update_lb_connectivity_status_locked(
grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy,
grpc_connectivity_state rr_state, grpc_error *rr_state_error) {
@@ -603,35 +643,38 @@ static bool pick_from_internal_rr_locked(
grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy,
const grpc_lb_policy_pick_args *pick_args, bool force_async,
grpc_connected_subchannel **target, wrapped_rr_closure_arg *wc_arg) {
- // Look at the index into the serverlist to see if we should drop this call.
- grpc_grpclb_server *server =
- glb_policy->serverlist->servers[glb_policy->serverlist_index++];
- if (glb_policy->serverlist_index == glb_policy->serverlist->num_servers) {
- glb_policy->serverlist_index = 0; // Wrap-around.
- }
- if (server->drop) {
- // Not using the RR policy, so unref it.
- if (GRPC_TRACER_ON(grpc_lb_glb_trace)) {
- gpr_log(GPR_INFO, "Unreffing RR for drop (0x%" PRIxPTR ")",
- (intptr_t)wc_arg->rr_policy);
+ // Check for drops if we are not using fallback backend addresses.
+ if (glb_policy->serverlist != NULL) {
+ // Look at the index into the serverlist to see if we should drop this call.
+ grpc_grpclb_server *server =
+ glb_policy->serverlist->servers[glb_policy->serverlist_index++];
+ if (glb_policy->serverlist_index == glb_policy->serverlist->num_servers) {
+ glb_policy->serverlist_index = 0; // Wrap-around.
}
- GRPC_LB_POLICY_UNREF(exec_ctx, wc_arg->rr_policy, "glb_pick_sync");
- // Update client load reporting stats to indicate the number of
- // dropped calls. Note that we have to do this here instead of in
- // the client_load_reporting filter, because we do not create a
- // subchannel call (and therefore no client_load_reporting filter)
- // for dropped calls.
- grpc_grpclb_client_stats_add_call_dropped_locked(server->load_balance_token,
- wc_arg->client_stats);
- grpc_grpclb_client_stats_unref(wc_arg->client_stats);
- if (force_async) {
- GPR_ASSERT(wc_arg->wrapped_closure != NULL);
- GRPC_CLOSURE_SCHED(exec_ctx, wc_arg->wrapped_closure, GRPC_ERROR_NONE);
+ if (server->drop) {
+ // Not using the RR policy, so unref it.
+ if (GRPC_TRACER_ON(grpc_lb_glb_trace)) {
+ gpr_log(GPR_INFO, "Unreffing RR for drop (0x%" PRIxPTR ")",
+ (intptr_t)wc_arg->rr_policy);
+ }
+ GRPC_LB_POLICY_UNREF(exec_ctx, wc_arg->rr_policy, "glb_pick_sync");
+ // Update client load reporting stats to indicate the number of
+ // dropped calls. Note that we have to do this here instead of in
+ // the client_load_reporting filter, because we do not create a
+ // subchannel call (and therefore no client_load_reporting filter)
+ // for dropped calls.
+ grpc_grpclb_client_stats_add_call_dropped_locked(
+ server->load_balance_token, wc_arg->client_stats);
+ grpc_grpclb_client_stats_unref(wc_arg->client_stats);
+ if (force_async) {
+ GPR_ASSERT(wc_arg->wrapped_closure != NULL);
+ GRPC_CLOSURE_SCHED(exec_ctx, wc_arg->wrapped_closure, GRPC_ERROR_NONE);
+ gpr_free(wc_arg->free_when_done);
+ return false;
+ }
gpr_free(wc_arg->free_when_done);
- return false;
+ return true;
}
- gpr_free(wc_arg->free_when_done);
- return true;
}
// Pick via the RR policy.
const bool pick_done = grpc_lb_policy_pick_locked(
@@ -669,8 +712,18 @@ static bool pick_from_internal_rr_locked(
static grpc_lb_policy_args *lb_policy_args_create(grpc_exec_ctx *exec_ctx,
glb_lb_policy *glb_policy) {
- grpc_lb_addresses *addresses =
- process_serverlist_locked(exec_ctx, glb_policy->serverlist);
+ grpc_lb_addresses *addresses;
+ if (glb_policy->serverlist != NULL) {
+ GPR_ASSERT(glb_policy->serverlist->num_servers > 0);
+ addresses = process_serverlist_locked(exec_ctx, glb_policy->serverlist);
+ } else {
+ // If rr_handover_locked() is invoked when we haven't received any
+ // serverlist from the balancer, we use the fallback backends returned by
+ // the resolver. Note that the fallback backend list may be empty, in which
+ // case the new round_robin policy will keep the requested picks pending.
+ GPR_ASSERT(glb_policy->fallback_backend_addresses != NULL);
+ addresses = grpc_lb_addresses_copy(glb_policy->fallback_backend_addresses);
+ }
GPR_ASSERT(addresses != NULL);
grpc_lb_policy_args *args = (grpc_lb_policy_args *)gpr_zalloc(sizeof(*args));
args->client_channel_factory = glb_policy->cc_factory;
@@ -776,8 +829,6 @@ static void create_rr_locked(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy,
/* glb_policy->rr_policy may be NULL (initial handover) */
static void rr_handover_locked(grpc_exec_ctx *exec_ctx,
glb_lb_policy *glb_policy) {
- GPR_ASSERT(glb_policy->serverlist != NULL &&
- glb_policy->serverlist->num_servers > 0);
if (glb_policy->shutting_down) return;
grpc_lb_policy_args *args = lb_policy_args_create(exec_ctx, glb_policy);
GPR_ASSERT(args != NULL);
@@ -926,6 +977,9 @@ static void glb_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
if (glb_policy->serverlist != NULL) {
grpc_grpclb_destroy_serverlist(glb_policy->serverlist);
}
+ if (glb_policy->fallback_backend_addresses != NULL) {
+ grpc_lb_addresses_destroy(exec_ctx, glb_policy->fallback_backend_addresses);
+ }
grpc_fake_resolver_response_generator_unref(glb_policy->response_generator);
grpc_subchannel_index_unref();
if (glb_policy->pending_update_args != NULL) {
@@ -956,6 +1010,10 @@ static void glb_shutdown_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
grpc_timer_cancel(exec_ctx, &glb_policy->lb_call_retry_timer);
glb_policy->retry_timer_active = false;
}
+ if (glb_policy->fallback_timer_active) {
+ grpc_timer_cancel(exec_ctx, &glb_policy->lb_fallback_timer);
+ glb_policy->fallback_timer_active = false;
+ }
pending_pick *pp = glb_policy->pending_picks;
glb_policy->pending_picks = NULL;
@@ -1067,12 +1125,28 @@ static void glb_cancel_picks_locked(grpc_exec_ctx *exec_ctx,
GRPC_ERROR_UNREF(error);
}
+static void lb_on_fallback_timer_locked(grpc_exec_ctx *exec_ctx, void *arg,
+ grpc_error *error);
static void query_for_backends_locked(grpc_exec_ctx *exec_ctx,
glb_lb_policy *glb_policy);
static void start_picking_locked(grpc_exec_ctx *exec_ctx,
glb_lb_policy *glb_policy) {
+ /* start a timer to fall back */
+ if (glb_policy->lb_fallback_timeout_ms > 0 &&
+ glb_policy->serverlist == NULL && !glb_policy->fallback_timer_active) {
+ grpc_millis deadline =
+ grpc_exec_ctx_now(exec_ctx) + glb_policy->lb_fallback_timeout_ms;
+ GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "grpclb_fallback_timer");
+ GRPC_CLOSURE_INIT(&glb_policy->lb_on_fallback, lb_on_fallback_timer_locked,
+ glb_policy,
+ grpc_combiner_scheduler(glb_policy->base.combiner));
+ glb_policy->fallback_timer_active = true;
+ grpc_timer_init(exec_ctx, &glb_policy->lb_fallback_timer, deadline,
+ &glb_policy->lb_on_fallback);
+ }
+
glb_policy->started_picking = true;
- gpr_backoff_reset(&glb_policy->lb_call_backoff_state);
+ grpc_backoff_reset(&glb_policy->lb_call_backoff_state);
query_for_backends_locked(exec_ctx, glb_policy);
}
@@ -1173,20 +1247,69 @@ static void glb_notify_on_state_change_locked(grpc_exec_ctx *exec_ctx,
exec_ctx, &glb_policy->state_tracker, current, notify);
}
+static void lb_call_on_retry_timer_locked(grpc_exec_ctx *exec_ctx, void *arg,
+ grpc_error *error) {
+ glb_lb_policy *glb_policy = (glb_lb_policy *)arg;
+ glb_policy->retry_timer_active = false;
+ if (!glb_policy->shutting_down && error == GRPC_ERROR_NONE) {
+ if (GRPC_TRACER_ON(grpc_lb_glb_trace)) {
+ gpr_log(GPR_INFO, "Restaring call to LB server (grpclb %p)",
+ (void *)glb_policy);
+ }
+ GPR_ASSERT(glb_policy->lb_call == NULL);
+ query_for_backends_locked(exec_ctx, glb_policy);
+ }
+ GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, "grpclb_retry_timer");
+}
+
+static void maybe_restart_lb_call(grpc_exec_ctx *exec_ctx,
+ glb_lb_policy *glb_policy) {
+ if (glb_policy->started_picking && glb_policy->updating_lb_call) {
+ if (glb_policy->retry_timer_active) {
+ grpc_timer_cancel(exec_ctx, &glb_policy->lb_call_retry_timer);
+ }
+ if (!glb_policy->shutting_down) start_picking_locked(exec_ctx, glb_policy);
+ glb_policy->updating_lb_call = false;
+ } else if (!glb_policy->shutting_down) {
+ /* if we aren't shutting down, restart the LB client call after some time */
+ grpc_millis next_try =
+ grpc_backoff_step(exec_ctx, &glb_policy->lb_call_backoff_state);
+ if (GRPC_TRACER_ON(grpc_lb_glb_trace)) {
+ gpr_log(GPR_DEBUG, "Connection to LB server lost (grpclb: %p)...",
+ (void *)glb_policy);
+ grpc_millis timeout = next_try - grpc_exec_ctx_now(exec_ctx);
+ if (timeout > 0) {
+ gpr_log(GPR_DEBUG, "... retry_timer_active in %" PRIdPTR "ms.",
+ timeout);
+ } else {
+ gpr_log(GPR_DEBUG, "... retry_timer_active immediately.");
+ }
+ }
+ GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "grpclb_retry_timer");
+ GRPC_CLOSURE_INIT(&glb_policy->lb_on_call_retry,
+ lb_call_on_retry_timer_locked, glb_policy,
+ grpc_combiner_scheduler(glb_policy->base.combiner));
+ glb_policy->retry_timer_active = true;
+ grpc_timer_init(exec_ctx, &glb_policy->lb_call_retry_timer, next_try,
+ &glb_policy->lb_on_call_retry);
+ }
+ GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base,
+ "lb_on_server_status_received_locked");
+}
+
static void send_client_load_report_locked(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error *error);
static void schedule_next_client_load_report(grpc_exec_ctx *exec_ctx,
glb_lb_policy *glb_policy) {
- const gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
- const gpr_timespec next_client_load_report_time =
- gpr_time_add(now, glb_policy->client_stats_report_interval);
+ const grpc_millis next_client_load_report_time =
+ grpc_exec_ctx_now(exec_ctx) + glb_policy->client_stats_report_interval;
GRPC_CLOSURE_INIT(&glb_policy->client_load_report_closure,
send_client_load_report_locked, glb_policy,
grpc_combiner_scheduler(glb_policy->base.combiner));
grpc_timer_init(exec_ctx, &glb_policy->client_load_report_timer,
next_client_load_report_time,
- &glb_policy->client_load_report_closure, now);
+ &glb_policy->client_load_report_closure);
}
static void client_load_report_done_locked(grpc_exec_ctx *exec_ctx, void *arg,
@@ -1203,21 +1326,6 @@ static void client_load_report_done_locked(grpc_exec_ctx *exec_ctx, void *arg,
schedule_next_client_load_report(exec_ctx, glb_policy);
}
-static void do_send_client_load_report_locked(grpc_exec_ctx *exec_ctx,
- glb_lb_policy *glb_policy) {
- grpc_op op;
- memset(&op, 0, sizeof(op));
- op.op = GRPC_OP_SEND_MESSAGE;
- op.data.send_message.send_message = glb_policy->client_load_report_payload;
- GRPC_CLOSURE_INIT(&glb_policy->client_load_report_closure,
- client_load_report_done_locked, glb_policy,
- grpc_combiner_scheduler(glb_policy->base.combiner));
- grpc_call_error call_error = grpc_call_start_batch_and_execute(
- exec_ctx, glb_policy->lb_call, &op, 1,
- &glb_policy->client_load_report_closure);
- GPR_ASSERT(GRPC_CALL_OK == call_error);
-}
-
static bool load_report_counters_are_zero(grpc_grpclb_request *request) {
grpc_grpclb_dropped_call_counts *drop_entries =
(grpc_grpclb_dropped_call_counts *)
@@ -1237,6 +1345,9 @@ static void send_client_load_report_locked(grpc_exec_ctx *exec_ctx, void *arg,
glb_policy->client_load_report_timer_pending = false;
GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base,
"client_load_report");
+ if (glb_policy->lb_call == NULL) {
+ maybe_restart_lb_call(exec_ctx, glb_policy);
+ }
return;
}
// Construct message payload.
@@ -1260,17 +1371,23 @@ static void send_client_load_report_locked(grpc_exec_ctx *exec_ctx, void *arg,
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
grpc_slice_unref_internal(exec_ctx, request_payload_slice);
grpc_grpclb_request_destroy(request);
- // If we've already sent the initial request, then we can go ahead and
- // sent the load report. Otherwise, we need to wait until the initial
- // request has been sent to send this
- // (see lb_on_sent_initial_request_locked() below).
- if (glb_policy->initial_request_sent) {
- do_send_client_load_report_locked(exec_ctx, glb_policy);
+ // Send load report message.
+ grpc_op op;
+ memset(&op, 0, sizeof(op));
+ op.op = GRPC_OP_SEND_MESSAGE;
+ op.data.send_message.send_message = glb_policy->client_load_report_payload;
+ GRPC_CLOSURE_INIT(&glb_policy->client_load_report_closure,
+ client_load_report_done_locked, glb_policy,
+ grpc_combiner_scheduler(glb_policy->base.combiner));
+ grpc_call_error call_error = grpc_call_start_batch_and_execute(
+ exec_ctx, glb_policy->lb_call, &op, 1,
+ &glb_policy->client_load_report_closure);
+ if (call_error != GRPC_CALL_OK) {
+ gpr_log(GPR_ERROR, "call_error=%d", call_error);
+ GPR_ASSERT(GRPC_CALL_OK == call_error);
}
}
-static void lb_on_sent_initial_request_locked(grpc_exec_ctx *exec_ctx,
- void *arg, grpc_error *error);
static void lb_on_server_status_received_locked(grpc_exec_ctx *exec_ctx,
void *arg, grpc_error *error);
static void lb_on_response_received_locked(grpc_exec_ctx *exec_ctx, void *arg,
@@ -1286,12 +1403,10 @@ static void lb_call_init_locked(grpc_exec_ctx *exec_ctx,
* glb_policy->base.interested_parties, which is comprised of the polling
* entities from \a client_channel. */
grpc_slice host = grpc_slice_from_copied_string(glb_policy->server_name);
- gpr_timespec deadline =
+ grpc_millis deadline =
glb_policy->lb_call_timeout_ms == 0
- ? gpr_inf_future(GPR_CLOCK_MONOTONIC)
- : gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC),
- gpr_time_from_millis(glb_policy->lb_call_timeout_ms,
- GPR_TIMESPAN));
+ ? GRPC_MILLIS_INF_FUTURE
+ : grpc_exec_ctx_now(exec_ctx) + glb_policy->lb_call_timeout_ms;
glb_policy->lb_call = grpc_channel_create_pollset_set_call(
exec_ctx, glb_policy->lb_channel, NULL, GRPC_PROPAGATE_DEFAULTS,
glb_policy->base.interested_parties,
@@ -1315,9 +1430,6 @@ static void lb_call_init_locked(grpc_exec_ctx *exec_ctx,
grpc_slice_unref_internal(exec_ctx, request_payload_slice);
grpc_grpclb_request_destroy(request);
- GRPC_CLOSURE_INIT(&glb_policy->lb_on_sent_initial_request,
- lb_on_sent_initial_request_locked, glb_policy,
- grpc_combiner_scheduler(glb_policy->base.combiner));
GRPC_CLOSURE_INIT(&glb_policy->lb_on_server_status_received,
lb_on_server_status_received_locked, glb_policy,
grpc_combiner_scheduler(glb_policy->base.combiner));
@@ -1325,14 +1437,13 @@ static void lb_call_init_locked(grpc_exec_ctx *exec_ctx,
lb_on_response_received_locked, glb_policy,
grpc_combiner_scheduler(glb_policy->base.combiner));
- gpr_backoff_init(&glb_policy->lb_call_backoff_state,
- GRPC_GRPCLB_INITIAL_CONNECT_BACKOFF_SECONDS,
- GRPC_GRPCLB_RECONNECT_BACKOFF_MULTIPLIER,
- GRPC_GRPCLB_RECONNECT_JITTER,
- GRPC_GRPCLB_MIN_CONNECT_TIMEOUT_SECONDS * 1000,
- GRPC_GRPCLB_RECONNECT_MAX_BACKOFF_SECONDS * 1000);
+ grpc_backoff_init(&glb_policy->lb_call_backoff_state,
+ GRPC_GRPCLB_INITIAL_CONNECT_BACKOFF_SECONDS,
+ GRPC_GRPCLB_RECONNECT_BACKOFF_MULTIPLIER,
+ GRPC_GRPCLB_RECONNECT_JITTER,
+ GRPC_GRPCLB_MIN_CONNECT_TIMEOUT_SECONDS * 1000,
+ GRPC_GRPCLB_RECONNECT_MAX_BACKOFF_SECONDS * 1000);
- glb_policy->initial_request_sent = false;
glb_policy->seen_initial_response = false;
glb_policy->last_client_load_report_counters_were_zero = false;
}
@@ -1349,7 +1460,7 @@ static void lb_call_destroy_locked(grpc_exec_ctx *exec_ctx,
grpc_byte_buffer_destroy(glb_policy->lb_request_payload);
grpc_slice_unref_internal(exec_ctx, glb_policy->lb_call_status_details);
- if (!glb_policy->client_load_report_timer_pending) {
+ if (glb_policy->client_load_report_timer_pending) {
grpc_timer_cancel(exec_ctx, &glb_policy->client_load_report_timer);
}
}
@@ -1373,7 +1484,7 @@ static void query_for_backends_locked(grpc_exec_ctx *exec_ctx,
GPR_ASSERT(glb_policy->lb_call != NULL);
grpc_call_error call_error;
- grpc_op ops[4];
+ grpc_op ops[3];
memset(ops, 0, sizeof(ops));
grpc_op *op = ops;
@@ -1394,13 +1505,8 @@ static void query_for_backends_locked(grpc_exec_ctx *exec_ctx,
op->flags = 0;
op->reserved = NULL;
op++;
- /* take a weak ref (won't prevent calling of \a glb_shutdown if the strong ref
- * count goes to zero) to be unref'd in lb_on_sent_initial_request_locked() */
- GRPC_LB_POLICY_WEAK_REF(&glb_policy->base,
- "lb_on_sent_initial_request_locked");
- call_error = grpc_call_start_batch_and_execute(
- exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops),
- &glb_policy->lb_on_sent_initial_request);
+ call_error = grpc_call_start_batch_and_execute(exec_ctx, glb_policy->lb_call,
+ ops, (size_t)(op - ops), NULL);
GPR_ASSERT(GRPC_CALL_OK == call_error);
op = ops;
@@ -1437,19 +1543,6 @@ static void query_for_backends_locked(grpc_exec_ctx *exec_ctx,
GPR_ASSERT(GRPC_CALL_OK == call_error);
}
-static void lb_on_sent_initial_request_locked(grpc_exec_ctx *exec_ctx,
- void *arg, grpc_error *error) {
- glb_lb_policy *glb_policy = (glb_lb_policy *)arg;
- glb_policy->initial_request_sent = true;
- // If we attempted to send a client load report before the initial
- // request was sent, send the load report now.
- if (glb_policy->client_load_report_payload != NULL) {
- do_send_client_load_report_locked(exec_ctx, glb_policy);
- }
- GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base,
- "lb_on_sent_initial_request_locked");
-}
-
static void lb_on_response_received_locked(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error *error) {
glb_lb_policy *glb_policy = (glb_lb_policy *)arg;
@@ -1457,7 +1550,7 @@ static void lb_on_response_received_locked(grpc_exec_ctx *exec_ctx, void *arg,
memset(ops, 0, sizeof(ops));
grpc_op *op = ops;
if (glb_policy->lb_response_payload != NULL) {
- gpr_backoff_reset(&glb_policy->lb_call_backoff_state);
+ grpc_backoff_reset(&glb_policy->lb_call_backoff_state);
/* Received data from the LB server. Look inside
* glb_policy->lb_response_payload, for a serverlist. */
grpc_byte_buffer_reader bbr;
@@ -1471,16 +1564,14 @@ static void lb_on_response_received_locked(grpc_exec_ctx *exec_ctx, void *arg,
(response = grpc_grpclb_initial_response_parse(response_slice)) !=
NULL) {
if (response->has_client_stats_report_interval) {
- glb_policy->client_stats_report_interval =
- gpr_time_max(gpr_time_from_seconds(1, GPR_TIMESPAN),
- grpc_grpclb_duration_to_timespec(
- &response->client_stats_report_interval));
+ glb_policy->client_stats_report_interval = GPR_MAX(
+ GPR_MS_PER_SEC, grpc_grpclb_duration_to_millis(
+ &response->client_stats_report_interval));
if (GRPC_TRACER_ON(grpc_lb_glb_trace)) {
gpr_log(GPR_INFO,
"received initial LB response message; "
- "client load reporting interval = %" PRId64 ".%09d sec",
- glb_policy->client_stats_report_interval.tv_sec,
- glb_policy->client_stats_report_interval.tv_nsec);
+ "client load reporting interval = %" PRIdPTR " milliseconds",
+ glb_policy->client_stats_report_interval);
}
/* take a weak ref (won't prevent calling of \a glb_shutdown() if the
* strong ref count goes to zero) to be unref'd in
@@ -1525,6 +1616,15 @@ static void lb_on_response_received_locked(grpc_exec_ctx *exec_ctx, void *arg,
if (glb_policy->serverlist != NULL) {
/* dispose of the old serverlist */
grpc_grpclb_destroy_serverlist(glb_policy->serverlist);
+ } else {
+ /* or dispose of the fallback */
+ grpc_lb_addresses_destroy(exec_ctx,
+ glb_policy->fallback_backend_addresses);
+ glb_policy->fallback_backend_addresses = NULL;
+ if (glb_policy->fallback_timer_active) {
+ grpc_timer_cancel(exec_ctx, &glb_policy->lb_fallback_timer);
+ glb_policy->fallback_timer_active = false;
+ }
}
/* and update the copy in the glb_lb_policy instance. This
* serverlist instance will be destroyed either upon the next
@@ -1535,9 +1635,7 @@ static void lb_on_response_received_locked(grpc_exec_ctx *exec_ctx, void *arg,
}
} else {
if (GRPC_TRACER_ON(grpc_lb_glb_trace)) {
- gpr_log(GPR_INFO,
- "Received empty server list. Picks will stay pending until "
- "a response with > 0 servers is received");
+ gpr_log(GPR_INFO, "Received empty server list, ignoring.");
}
grpc_grpclb_destroy_serverlist(serverlist);
}
@@ -1572,19 +1670,25 @@ static void lb_on_response_received_locked(grpc_exec_ctx *exec_ctx, void *arg,
}
}
-static void lb_call_on_retry_timer_locked(grpc_exec_ctx *exec_ctx, void *arg,
- grpc_error *error) {
+static void lb_on_fallback_timer_locked(grpc_exec_ctx *exec_ctx, void *arg,
+ grpc_error *error) {
glb_lb_policy *glb_policy = (glb_lb_policy *)arg;
- glb_policy->retry_timer_active = false;
- if (!glb_policy->shutting_down && error == GRPC_ERROR_NONE) {
- if (GRPC_TRACER_ON(grpc_lb_glb_trace)) {
- gpr_log(GPR_INFO, "Restaring call to LB server (grpclb %p)",
- (void *)glb_policy);
+ glb_policy->fallback_timer_active = false;
+ /* If we receive a serverlist after the timer fires but before this callback
+ * actually runs, don't fall back. */
+ if (glb_policy->serverlist == NULL) {
+ if (!glb_policy->shutting_down && error == GRPC_ERROR_NONE) {
+ if (GRPC_TRACER_ON(grpc_lb_glb_trace)) {
+ gpr_log(GPR_INFO,
+ "Falling back to use backends from resolver (grpclb %p)",
+ (void *)glb_policy);
+ }
+ GPR_ASSERT(glb_policy->fallback_backend_addresses != NULL);
+ rr_handover_locked(exec_ctx, glb_policy);
}
- GPR_ASSERT(glb_policy->lb_call == NULL);
- query_for_backends_locked(exec_ctx, glb_policy);
}
- GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, "grpclb_retry_timer");
+ GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base,
+ "grpclb_fallback_timer");
}
static void lb_on_server_status_received_locked(grpc_exec_ctx *exec_ctx,
@@ -1603,66 +1707,30 @@ static void lb_on_server_status_received_locked(grpc_exec_ctx *exec_ctx,
}
/* We need to perform cleanups no matter what. */
lb_call_destroy_locked(exec_ctx, glb_policy);
- if (glb_policy->started_picking && glb_policy->updating_lb_call) {
- if (glb_policy->retry_timer_active) {
- grpc_timer_cancel(exec_ctx, &glb_policy->lb_call_retry_timer);
- }
- if (!glb_policy->shutting_down) start_picking_locked(exec_ctx, glb_policy);
- glb_policy->updating_lb_call = false;
- } else if (!glb_policy->shutting_down) {
- /* if we aren't shutting down, restart the LB client call after some time */
- gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
- gpr_timespec next_try =
- gpr_backoff_step(&glb_policy->lb_call_backoff_state, now);
- if (GRPC_TRACER_ON(grpc_lb_glb_trace)) {
- gpr_log(GPR_DEBUG, "Connection to LB server lost (grpclb: %p)...",
- (void *)glb_policy);
- gpr_timespec timeout = gpr_time_sub(next_try, now);
- if (gpr_time_cmp(timeout, gpr_time_0(timeout.clock_type)) > 0) {
- gpr_log(GPR_DEBUG,
- "... retry_timer_active in %" PRId64 ".%09d seconds.",
- timeout.tv_sec, timeout.tv_nsec);
- } else {
- gpr_log(GPR_DEBUG, "... retry_timer_active immediately.");
- }
- }
- GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "grpclb_retry_timer");
- GRPC_CLOSURE_INIT(&glb_policy->lb_on_call_retry,
- lb_call_on_retry_timer_locked, glb_policy,
- grpc_combiner_scheduler(glb_policy->base.combiner));
- glb_policy->retry_timer_active = true;
- grpc_timer_init(exec_ctx, &glb_policy->lb_call_retry_timer, next_try,
- &glb_policy->lb_on_call_retry, now);
+ // If the load report timer is still pending, we wait for it to be
+ // called before restarting the call. Otherwise, we restart the call
+ // here.
+ if (!glb_policy->client_load_report_timer_pending) {
+ maybe_restart_lb_call(exec_ctx, glb_policy);
+ }
+}
+
+static void fallback_update_locked(grpc_exec_ctx *exec_ctx,
+ glb_lb_policy *glb_policy,
+ const grpc_lb_addresses *addresses) {
+ GPR_ASSERT(glb_policy->fallback_backend_addresses != NULL);
+ grpc_lb_addresses_destroy(exec_ctx, glb_policy->fallback_backend_addresses);
+ glb_policy->fallback_backend_addresses =
+ extract_backend_addresses_locked(exec_ctx, addresses);
+ if (glb_policy->lb_fallback_timeout_ms > 0 &&
+ !glb_policy->fallback_timer_active) {
+ rr_handover_locked(exec_ctx, glb_policy);
}
- GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base,
- "lb_on_server_status_received_locked");
}
static void glb_update_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
const grpc_lb_policy_args *args) {
glb_lb_policy *glb_policy = (glb_lb_policy *)policy;
- if (glb_policy->updating_lb_channel) {
- if (GRPC_TRACER_ON(grpc_lb_glb_trace)) {
- gpr_log(GPR_INFO,
- "Update already in progress for grpclb %p. Deferring update.",
- (void *)glb_policy);
- }
- if (glb_policy->pending_update_args != NULL) {
- grpc_channel_args_destroy(exec_ctx,
- glb_policy->pending_update_args->args);
- gpr_free(glb_policy->pending_update_args);
- }
- glb_policy->pending_update_args = (grpc_lb_policy_args *)gpr_zalloc(
- sizeof(*glb_policy->pending_update_args));
- glb_policy->pending_update_args->client_channel_factory =
- args->client_channel_factory;
- glb_policy->pending_update_args->args = grpc_channel_args_copy(args->args);
- glb_policy->pending_update_args->combiner = args->combiner;
- return;
- }
-
- glb_policy->updating_lb_channel = true;
- // Propagate update to lb_channel (pick first).
const grpc_arg *arg =
grpc_channel_args_find(args->args, GRPC_ARG_LB_ADDRESSES);
if (arg == NULL || arg->type != GRPC_ARG_POINTER) {
@@ -1680,13 +1748,43 @@ static void glb_update_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy,
"ignoring.",
(void *)glb_policy);
}
+ return;
}
const grpc_lb_addresses *addresses =
(const grpc_lb_addresses *)arg->value.pointer.p;
+
+ if (glb_policy->serverlist == NULL) {
+ // If a non-empty serverlist hasn't been received from the balancer,
+ // propagate the update to fallback_backend_addresses.
+ fallback_update_locked(exec_ctx, glb_policy, addresses);
+ } else if (glb_policy->updating_lb_channel) {
+ // If we have recieved serverlist from the balancer, we need to defer update
+ // when there is an in-progress one.
+ if (GRPC_TRACER_ON(grpc_lb_glb_trace)) {
+ gpr_log(GPR_INFO,
+ "Update already in progress for grpclb %p. Deferring update.",
+ (void *)glb_policy);
+ }
+ if (glb_policy->pending_update_args != NULL) {
+ grpc_channel_args_destroy(exec_ctx,
+ glb_policy->pending_update_args->args);
+ gpr_free(glb_policy->pending_update_args);
+ }
+ glb_policy->pending_update_args = (grpc_lb_policy_args *)gpr_zalloc(
+ sizeof(*glb_policy->pending_update_args));
+ glb_policy->pending_update_args->client_channel_factory =
+ args->client_channel_factory;
+ glb_policy->pending_update_args->args = grpc_channel_args_copy(args->args);
+ glb_policy->pending_update_args->combiner = args->combiner;
+ return;
+ }
+
+ glb_policy->updating_lb_channel = true;
GPR_ASSERT(glb_policy->lb_channel != NULL);
grpc_channel_args *lb_channel_args = build_lb_channel_args(
exec_ctx, addresses, glb_policy->response_generator, args->args);
- /* Propagate updates to the LB channel through the fake resolver */
+ /* Propagate updates to the LB channel (pick first) through the fake resolver
+ */
grpc_fake_resolver_response_generator_set_response(
exec_ctx, glb_policy->response_generator, lb_channel_args);
grpc_channel_args_destroy(exec_ctx, lb_channel_args);
@@ -1789,13 +1887,7 @@ static const grpc_lb_policy_vtable glb_lb_policy_vtable = {
static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx,
grpc_lb_policy_factory *factory,
grpc_lb_policy_args *args) {
- /* Count the number of gRPC-LB addresses. There must be at least one.
- * TODO(roth): For now, we ignore non-balancer addresses, but in the
- * future, we may change the behavior such that we fall back to using
- * the non-balancer addresses if we cannot reach any balancers. In the
- * fallback case, we should use the LB policy indicated by
- * GRPC_ARG_LB_POLICY_NAME (although if that specifies grpclb or is
- * unset, we should default to pick_first). */
+ /* Count the number of gRPC-LB addresses. There must be at least one. */
const grpc_arg *arg =
grpc_channel_args_find(args->args, GRPC_ARG_LB_ADDRESSES);
if (arg == NULL || arg->type != GRPC_ARG_POINTER) {
@@ -1829,7 +1921,11 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx,
arg = grpc_channel_args_find(args->args, GRPC_ARG_GRPCLB_CALL_TIMEOUT_MS);
glb_policy->lb_call_timeout_ms =
- grpc_channel_arg_get_integer(arg, (grpc_integer_options){0, 0, INT_MAX});
+ grpc_channel_arg_get_integer(arg, {0, 0, INT_MAX});
+
+ arg = grpc_channel_args_find(args->args, GRPC_ARG_GRPCLB_FALLBACK_TIMEOUT_MS);
+ glb_policy->lb_fallback_timeout_ms = grpc_channel_arg_get_integer(
+ arg, {GRPC_GRPCLB_DEFAULT_FALLBACK_TIMEOUT_MS, 0, INT_MAX});
// Make sure that GRPC_ARG_LB_POLICY_NAME is set in channel args,
// since we use this to trigger the client_load_reporting filter.
@@ -1839,6 +1935,11 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx,
glb_policy->args = grpc_channel_args_copy_and_add_and_remove(
args->args, args_to_remove, GPR_ARRAY_SIZE(args_to_remove), &new_arg, 1);
+ /* Extract the backend addresses (may be empty) from the resolver for
+ * fallback. */
+ glb_policy->fallback_backend_addresses =
+ extract_backend_addresses_locked(exec_ctx, addresses);
+
/* Create a client channel over them to communicate with a LB service */
glb_policy->response_generator =
grpc_fake_resolver_response_generator_create();
@@ -1900,7 +2001,7 @@ static bool maybe_add_client_load_reporting_filter(
return true;
}
-void grpc_lb_policy_grpclb_init() {
+extern "C" void grpc_lb_policy_grpclb_init() {
grpc_register_lb_policy(grpc_glb_lb_factory_create());
grpc_register_tracer(&grpc_lb_glb_trace);
#ifndef NDEBUG
@@ -1912,4 +2013,4 @@ void grpc_lb_policy_grpclb_init() {
(void *)&grpc_client_load_reporting_filter);
}
-void grpc_lb_policy_grpclb_shutdown() {}
+extern "C" void grpc_lb_policy_grpclb_shutdown() {}
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h
index 63ad66c5e9..c67df609fc 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h
@@ -21,9 +21,17 @@
#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** Returns a load balancing factory for the glb policy, which tries to connect
* to a load balancing server to decide the next successfully connected
* subchannel to pick. */
grpc_lb_policy_factory *grpc_glb_lb_factory_create();
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_H */ \ No newline at end of file
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.c b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc
index f2967182e2..f2967182e2 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.c
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h
index 6120bf53f7..e8599d1f51 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h
@@ -23,6 +23,10 @@
#include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h"
#include "src/core/lib/slice/slice_hash_table.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** Create the channel used for communicating with an LB service.
* Note that an LB *service* may be comprised of several LB *servers*.
*
@@ -40,5 +44,9 @@ grpc_channel_args *grpc_lb_policy_grpclb_build_lb_channel_args(
grpc_fake_resolver_response_generator *response_generator,
const grpc_channel_args *args);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_CHANNEL_H \
*/
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc
index 2681b2a079..2681b2a079 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc
index 903120ca7d..903120ca7d 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h
index c51e2a431a..b38c076f38 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h
@@ -23,6 +23,10 @@
#include <grpc/impl/codegen/grpc_types.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_grpclb_client_stats grpc_grpclb_client_stats;
typedef struct {
@@ -61,5 +65,9 @@ void grpc_grpclb_client_stats_get_locked(
void grpc_grpclb_dropped_call_counts_destroy(
grpc_grpclb_dropped_call_counts* drop_entries);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_CLIENT_STATS_H \
*/
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c b/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc
index 8ef6dfc6f4..4d5fb2081c 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc
@@ -299,13 +299,10 @@ int grpc_grpclb_duration_compare(const grpc_grpclb_duration *lhs,
return 0;
}
-gpr_timespec grpc_grpclb_duration_to_timespec(
- grpc_grpclb_duration *duration_pb) {
- gpr_timespec duration;
- duration.tv_sec = duration_pb->has_seconds ? duration_pb->seconds : 0;
- duration.tv_nsec = duration_pb->has_nanos ? duration_pb->nanos : 0;
- duration.clock_type = GPR_TIMESPAN;
- return duration;
+grpc_millis grpc_grpclb_duration_to_millis(grpc_grpclb_duration *duration_pb) {
+ return (grpc_millis)(
+ (duration_pb->has_seconds ? duration_pb->seconds : 0) * GPR_MS_PER_SEC +
+ (duration_pb->has_nanos ? duration_pb->nanos : 0) / GPR_NS_PER_MS);
}
void grpc_grpclb_initial_response_destroy(
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h
index c4a98492c9..56b9c096d0 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h
@@ -81,8 +81,7 @@ void grpc_grpclb_destroy_serverlist(grpc_grpclb_serverlist *serverlist);
int grpc_grpclb_duration_compare(const grpc_grpclb_duration *lhs,
const grpc_grpclb_duration *rhs);
-gpr_timespec grpc_grpclb_duration_to_timespec(
- grpc_grpclb_duration *duration_pb);
+grpc_millis grpc_grpclb_duration_to_millis(grpc_grpclb_duration *duration_pb);
/** Destroy \a initial_response */
void grpc_grpclb_initial_response_destroy(
diff --git a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
index d20cbb8388..b07fc3b720 100644
--- a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c
+++ b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
@@ -706,9 +706,9 @@ static grpc_lb_policy_factory *pick_first_lb_factory_create() {
/* Plugin registration */
-void grpc_lb_policy_pick_first_init() {
+extern "C" void grpc_lb_policy_pick_first_init() {
grpc_register_lb_policy(pick_first_lb_factory_create());
grpc_register_tracer(&grpc_lb_pick_first_trace);
}
-void grpc_lb_policy_pick_first_shutdown() {}
+extern "C" void grpc_lb_policy_pick_first_shutdown() {}
diff --git a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
index a3a62e9f3c..6812bb50cd 100644
--- a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c
+++ b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
@@ -916,9 +916,9 @@ static grpc_lb_policy_factory *round_robin_lb_factory_create() {
/* Plugin registration */
-void grpc_lb_policy_round_robin_init() {
+extern "C" void grpc_lb_policy_round_robin_init() {
grpc_register_lb_policy(round_robin_lb_factory_create());
grpc_register_tracer(&grpc_lb_round_robin_trace);
}
-void grpc_lb_policy_round_robin_shutdown() {}
+extern "C" void grpc_lb_policy_round_robin_shutdown() {}
diff --git a/src/core/ext/filters/client_channel/lb_policy_factory.c b/src/core/ext/filters/client_channel/lb_policy_factory.cc
index 4d1405454c..05ab43d0b6 100644
--- a/src/core/ext/filters/client_channel/lb_policy_factory.c
+++ b/src/core/ext/filters/client_channel/lb_policy_factory.cc
@@ -56,7 +56,7 @@ grpc_lb_addresses* grpc_lb_addresses_copy(const grpc_lb_addresses* addresses) {
}
void grpc_lb_addresses_set_address(grpc_lb_addresses* addresses, size_t index,
- void* address, size_t address_len,
+ const void* address, size_t address_len,
bool is_balancer, const char* balancer_name,
void* user_data) {
GPR_ASSERT(index < addresses->num_addresses);
diff --git a/src/core/ext/filters/client_channel/lb_policy_factory.h b/src/core/ext/filters/client_channel/lb_policy_factory.h
index 9d9fb143df..69bcba4232 100644
--- a/src/core/ext/filters/client_channel/lb_policy_factory.h
+++ b/src/core/ext/filters/client_channel/lb_policy_factory.h
@@ -29,6 +29,10 @@
// Channel arg key for grpc_lb_addresses.
#define GRPC_ARG_LB_ADDRESSES "grpc.lb_addresses"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_lb_policy_factory grpc_lb_policy_factory;
typedef struct grpc_lb_policy_factory_vtable grpc_lb_policy_factory_vtable;
@@ -73,7 +77,7 @@ grpc_lb_addresses *grpc_lb_addresses_copy(const grpc_lb_addresses *addresses);
* \a address is a socket address of length \a address_len.
* Takes ownership of \a balancer_name. */
void grpc_lb_addresses_set_address(grpc_lb_addresses *addresses, size_t index,
- void *address, size_t address_len,
+ const void *address, size_t address_len,
bool is_balancer, const char *balancer_name,
void *user_data);
@@ -130,4 +134,8 @@ grpc_lb_policy *grpc_lb_policy_factory_create_lb_policy(
grpc_exec_ctx *exec_ctx, grpc_lb_policy_factory *factory,
grpc_lb_policy_args *args);
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_FACTORY_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_FACTORY_H */ \ No newline at end of file
diff --git a/src/core/ext/filters/client_channel/lb_policy_registry.c b/src/core/ext/filters/client_channel/lb_policy_registry.cc
index f2460f8304..f2460f8304 100644
--- a/src/core/ext/filters/client_channel/lb_policy_registry.c
+++ b/src/core/ext/filters/client_channel/lb_policy_registry.cc
diff --git a/src/core/ext/filters/client_channel/lb_policy_registry.h b/src/core/ext/filters/client_channel/lb_policy_registry.h
index f5995687cf..0867844c37 100644
--- a/src/core/ext/filters/client_channel/lb_policy_registry.h
+++ b/src/core/ext/filters/client_channel/lb_policy_registry.h
@@ -22,6 +22,10 @@
#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
#include "src/core/lib/iomgr/exec_ctx.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** Initialize the registry and set \a default_factory as the factory to be
* returned when no name is provided in a lookup */
void grpc_lb_policy_registry_init(void);
@@ -37,4 +41,8 @@ void grpc_register_lb_policy(grpc_lb_policy_factory *factory);
grpc_lb_policy *grpc_lb_policy_create(grpc_exec_ctx *exec_ctx, const char *name,
grpc_lb_policy_args *args);
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_REGISTRY_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_REGISTRY_H */ \ No newline at end of file
diff --git a/src/core/ext/filters/client_channel/parse_address.c b/src/core/ext/filters/client_channel/parse_address.cc
index 2152b5a1e9..2152b5a1e9 100644
--- a/src/core/ext/filters/client_channel/parse_address.c
+++ b/src/core/ext/filters/client_channel/parse_address.cc
diff --git a/src/core/ext/filters/client_channel/parse_address.h b/src/core/ext/filters/client_channel/parse_address.h
index c90a827da5..742df380b7 100644
--- a/src/core/ext/filters/client_channel/parse_address.h
+++ b/src/core/ext/filters/client_channel/parse_address.h
@@ -24,6 +24,10 @@
#include "src/core/ext/filters/client_channel/uri_parser.h"
#include "src/core/lib/iomgr/resolve_address.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** Populate \a resolved_addr from \a uri, whose path is expected to contain a
* unix socket path. Returns true upon success. */
bool grpc_parse_unix(const grpc_uri *uri, grpc_resolved_address *resolved_addr);
@@ -45,4 +49,8 @@ bool grpc_parse_ipv4_hostport(const char *hostport, grpc_resolved_address *addr,
bool grpc_parse_ipv6_hostport(const char *hostport, grpc_resolved_address *addr,
bool log_errors);
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PARSE_ADDRESS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PARSE_ADDRESS_H */ \ No newline at end of file
diff --git a/src/core/ext/filters/client_channel/proxy_mapper.c b/src/core/ext/filters/client_channel/proxy_mapper.cc
index c6ea5fc680..c6ea5fc680 100644
--- a/src/core/ext/filters/client_channel/proxy_mapper.c
+++ b/src/core/ext/filters/client_channel/proxy_mapper.cc
diff --git a/src/core/ext/filters/client_channel/proxy_mapper.h b/src/core/ext/filters/client_channel/proxy_mapper.h
index a13861ccaf..1325a9f1f6 100644
--- a/src/core/ext/filters/client_channel/proxy_mapper.h
+++ b/src/core/ext/filters/client_channel/proxy_mapper.h
@@ -25,6 +25,10 @@
#include "src/core/lib/iomgr/resolve_address.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_proxy_mapper grpc_proxy_mapper;
typedef struct {
@@ -71,4 +75,8 @@ bool grpc_proxy_mapper_map_address(grpc_exec_ctx* exec_ctx,
void grpc_proxy_mapper_destroy(grpc_proxy_mapper* mapper);
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_H */ \ No newline at end of file
diff --git a/src/core/ext/filters/client_channel/proxy_mapper_registry.c b/src/core/ext/filters/client_channel/proxy_mapper_registry.cc
index 09967eea3c..09967eea3c 100644
--- a/src/core/ext/filters/client_channel/proxy_mapper_registry.c
+++ b/src/core/ext/filters/client_channel/proxy_mapper_registry.cc
diff --git a/src/core/ext/filters/client_channel/proxy_mapper_registry.h b/src/core/ext/filters/client_channel/proxy_mapper_registry.h
index 99e54d1a78..2d389f1c21 100644
--- a/src/core/ext/filters/client_channel/proxy_mapper_registry.h
+++ b/src/core/ext/filters/client_channel/proxy_mapper_registry.h
@@ -21,6 +21,10 @@
#include "src/core/ext/filters/client_channel/proxy_mapper.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void grpc_proxy_mapper_registry_init();
void grpc_proxy_mapper_registry_shutdown();
@@ -41,4 +45,8 @@ bool grpc_proxy_mappers_map_address(grpc_exec_ctx* exec_ctx,
grpc_resolved_address** new_address,
grpc_channel_args** new_args);
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_REGISTRY_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_REGISTRY_H */ \ No newline at end of file
diff --git a/src/core/ext/filters/client_channel/resolver.c b/src/core/ext/filters/client_channel/resolver.cc
index 8401504fcf..8401504fcf 100644
--- a/src/core/ext/filters/client_channel/resolver.c
+++ b/src/core/ext/filters/client_channel/resolver.cc
diff --git a/src/core/ext/filters/client_channel/resolver.h b/src/core/ext/filters/client_channel/resolver.h
index ae9c8f66fe..73fbbbbc3b 100644
--- a/src/core/ext/filters/client_channel/resolver.h
+++ b/src/core/ext/filters/client_channel/resolver.h
@@ -22,6 +22,10 @@
#include "src/core/ext/filters/client_channel/subchannel.h"
#include "src/core/lib/iomgr/iomgr.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_resolver grpc_resolver;
typedef struct grpc_resolver_vtable grpc_resolver_vtable;
@@ -87,4 +91,8 @@ void grpc_resolver_next_locked(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver,
grpc_channel_args **result,
grpc_closure *on_complete);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_H */
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
index 9bb229ad95..5f7ab987cb 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
@@ -32,13 +32,13 @@
#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
#include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h"
#include "src/core/ext/filters/client_channel/resolver_registry.h"
+#include "src/core/lib/backoff/backoff.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/iomgr/combiner.h"
#include "src/core/lib/iomgr/gethostname.h"
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/json/json.h"
-#include "src/core/lib/support/backoff.h"
#include "src/core/lib/support/env.h"
#include "src/core/lib/support/string.h"
#include "src/core/lib/transport/service_config.h"
@@ -89,7 +89,7 @@ typedef struct {
bool have_retry_timer;
grpc_timer retry_timer;
/** retry backoff state */
- gpr_backoff backoff_state;
+ grpc_backoff backoff_state;
/** currently resolving addresses */
grpc_lb_addresses *lb_addresses;
@@ -137,7 +137,7 @@ static void dns_ares_channel_saw_error_locked(grpc_exec_ctx *exec_ctx,
grpc_resolver *resolver) {
ares_dns_resolver *r = (ares_dns_resolver *)resolver;
if (!r->resolving) {
- gpr_backoff_reset(&r->backoff_state);
+ grpc_backoff_reset(&r->backoff_state);
dns_ares_start_resolving_locked(exec_ctx, r);
}
}
@@ -271,22 +271,20 @@ static void dns_ares_on_resolved_locked(grpc_exec_ctx *exec_ctx, void *arg,
} else {
const char *msg = grpc_error_string(error);
gpr_log(GPR_DEBUG, "dns resolution failed: %s", msg);
- gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
- gpr_timespec next_try = gpr_backoff_step(&r->backoff_state, now);
- gpr_timespec timeout = gpr_time_sub(next_try, now);
+ grpc_millis next_try = grpc_backoff_step(exec_ctx, &r->backoff_state);
+ grpc_millis timeout = next_try - grpc_exec_ctx_now(exec_ctx);
gpr_log(GPR_INFO, "dns resolution failed (will retry): %s",
grpc_error_string(error));
GPR_ASSERT(!r->have_retry_timer);
r->have_retry_timer = true;
GRPC_RESOLVER_REF(&r->base, "retry-timer");
- if (gpr_time_cmp(timeout, gpr_time_0(timeout.clock_type)) > 0) {
- gpr_log(GPR_DEBUG, "retrying in %" PRId64 ".%09d seconds", timeout.tv_sec,
- timeout.tv_nsec);
+ if (timeout > 0) {
+ gpr_log(GPR_DEBUG, "retrying in %" PRIdPTR " milliseconds", timeout);
} else {
gpr_log(GPR_DEBUG, "retrying immediately");
}
grpc_timer_init(exec_ctx, &r->retry_timer, next_try,
- &r->dns_ares_on_retry_timer_locked, now);
+ &r->dns_ares_on_retry_timer_locked);
}
if (r->resolved_result != NULL) {
grpc_channel_args_destroy(exec_ctx, r->resolved_result);
@@ -307,7 +305,7 @@ static void dns_ares_next_locked(grpc_exec_ctx *exec_ctx,
r->next_completion = on_complete;
r->target_result = target_result;
if (r->resolved_version == 0 && !r->resolving) {
- gpr_backoff_reset(&r->backoff_state);
+ grpc_backoff_reset(&r->backoff_state);
dns_ares_start_resolving_locked(exec_ctx, r);
} else {
dns_ares_maybe_finish_next_locked(exec_ctx, r);
@@ -381,11 +379,11 @@ static grpc_resolver *dns_ares_create(grpc_exec_ctx *exec_ctx,
grpc_pollset_set_add_pollset_set(exec_ctx, r->interested_parties,
args->pollset_set);
}
- gpr_backoff_init(&r->backoff_state, GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS,
- GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER,
- GRPC_DNS_RECONNECT_JITTER,
- GRPC_DNS_MIN_CONNECT_TIMEOUT_SECONDS * 1000,
- GRPC_DNS_RECONNECT_MAX_BACKOFF_SECONDS * 1000);
+ grpc_backoff_init(&r->backoff_state, GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS,
+ GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER,
+ GRPC_DNS_RECONNECT_JITTER,
+ GRPC_DNS_MIN_CONNECT_TIMEOUT_SECONDS * 1000,
+ GRPC_DNS_RECONNECT_MAX_BACKOFF_SECONDS * 1000);
GRPC_CLOSURE_INIT(&r->dns_ares_on_retry_timer_locked,
dns_ares_on_retry_timer_locked, r,
grpc_combiner_scheduler(r->base.combiner));
@@ -425,7 +423,7 @@ static grpc_resolver_factory *dns_ares_resolver_factory_create() {
return &dns_resolver_factory;
}
-void grpc_resolver_dns_ares_init(void) {
+extern "C" void grpc_resolver_dns_ares_init(void) {
char *resolver = gpr_getenv("GRPC_DNS_RESOLVER");
/* TODO(zyc): Turn on c-ares based resolver by default after the address
sorter and the CNAME support are added. */
@@ -441,7 +439,7 @@ void grpc_resolver_dns_ares_init(void) {
gpr_free(resolver);
}
-void grpc_resolver_dns_ares_shutdown(void) {
+extern "C" void grpc_resolver_dns_ares_shutdown(void) {
char *resolver = gpr_getenv("GRPC_DNS_RESOLVER");
if (resolver != NULL && gpr_stricmp(resolver, "ares") == 0) {
grpc_ares_cleanup();
@@ -451,8 +449,8 @@ void grpc_resolver_dns_ares_shutdown(void) {
#else /* GRPC_ARES == 1 && !defined(GRPC_UV) */
-void grpc_resolver_dns_ares_init(void) {}
+extern "C" void grpc_resolver_dns_ares_init(void) {}
-void grpc_resolver_dns_ares_shutdown(void) {}
+extern "C" void grpc_resolver_dns_ares_shutdown(void) {}
#endif /* GRPC_ARES == 1 && !defined(GRPC_UV) */
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h
index 386012d2ed..3d4309f2fa 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h
@@ -22,6 +22,10 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/pollset_set.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_ares_ev_driver grpc_ares_ev_driver;
/* Start \a ev_driver. It will keep working until all IO on its ares_channel is
@@ -49,5 +53,9 @@ void grpc_ares_ev_driver_destroy(grpc_ares_ev_driver *ev_driver);
void grpc_ares_ev_driver_shutdown(grpc_exec_ctx *exec_ctx,
grpc_ares_ev_driver *ev_driver);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_DNS_C_ARES_GRPC_ARES_EV_DRIVER_H \
*/
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
index c30cc93b6f..c30cc93b6f 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
index 04379975e1..04379975e1 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h
index 108333047d..38fbea9aac 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h
@@ -25,6 +25,10 @@
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/iomgr/resolve_address.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_ares_request grpc_ares_request;
/* Asynchronously resolve \a name. Use \a default_port if a port isn't
@@ -65,5 +69,9 @@ grpc_error *grpc_ares_init(void);
it has been called the same number of times as grpc_ares_init(). */
void grpc_ares_cleanup(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_DNS_C_ARES_GRPC_ARES_WRAPPER_H \
*/
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc
index f2587c4520..f2587c4520 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc
diff --git a/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c b/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
index 5ea75f0554..e669b6dfc7 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c
+++ b/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
@@ -16,6 +16,9 @@
*
*/
+#include <grpc/support/port_platform.h>
+
+#include <inttypes.h>
#include <string.h>
#include <grpc/support/alloc.h>
@@ -24,11 +27,11 @@
#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
#include "src/core/ext/filters/client_channel/resolver_registry.h"
+#include "src/core/lib/backoff/backoff.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/iomgr/combiner.h"
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/iomgr/timer.h"
-#include "src/core/lib/support/backoff.h"
#include "src/core/lib/support/env.h"
#include "src/core/lib/support/string.h"
@@ -67,7 +70,7 @@ typedef struct {
grpc_timer retry_timer;
grpc_closure on_retry;
/** retry backoff state */
- gpr_backoff backoff_state;
+ grpc_backoff backoff_state;
/** currently resolving addresses */
grpc_resolved_addresses *addresses;
@@ -110,7 +113,7 @@ static void dns_channel_saw_error_locked(grpc_exec_ctx *exec_ctx,
grpc_resolver *resolver) {
dns_resolver *r = (dns_resolver *)resolver;
if (!r->resolving) {
- gpr_backoff_reset(&r->backoff_state);
+ grpc_backoff_reset(&r->backoff_state);
dns_start_resolving_locked(exec_ctx, r);
}
}
@@ -123,7 +126,7 @@ static void dns_next_locked(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver,
r->next_completion = on_complete;
r->target_result = target_result;
if (r->resolved_version == 0 && !r->resolving) {
- gpr_backoff_reset(&r->backoff_state);
+ grpc_backoff_reset(&r->backoff_state);
dns_start_resolving_locked(exec_ctx, r);
} else {
dns_maybe_finish_next_locked(exec_ctx, r);
@@ -150,6 +153,9 @@ static void dns_on_resolved_locked(grpc_exec_ctx *exec_ctx, void *arg,
grpc_channel_args *result = NULL;
GPR_ASSERT(r->resolving);
r->resolving = false;
+ GRPC_ERROR_REF(error);
+ error = grpc_error_set_str(error, GRPC_ERROR_STR_TARGET_ADDRESS,
+ grpc_slice_from_copied_string(r->name_to_resolve));
if (r->addresses != NULL) {
grpc_lb_addresses *addresses = grpc_lb_addresses_create(
r->addresses->naddrs, NULL /* user_data_vtable */);
@@ -164,23 +170,21 @@ static void dns_on_resolved_locked(grpc_exec_ctx *exec_ctx, void *arg,
grpc_resolved_addresses_destroy(r->addresses);
grpc_lb_addresses_destroy(exec_ctx, addresses);
} else {
- gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
- gpr_timespec next_try = gpr_backoff_step(&r->backoff_state, now);
- gpr_timespec timeout = gpr_time_sub(next_try, now);
+ grpc_millis next_try = grpc_backoff_step(exec_ctx, &r->backoff_state);
+ grpc_millis timeout = next_try - grpc_exec_ctx_now(exec_ctx);
gpr_log(GPR_INFO, "dns resolution failed (will retry): %s",
grpc_error_string(error));
GPR_ASSERT(!r->have_retry_timer);
r->have_retry_timer = true;
GRPC_RESOLVER_REF(&r->base, "retry-timer");
- if (gpr_time_cmp(timeout, gpr_time_0(timeout.clock_type)) > 0) {
- gpr_log(GPR_DEBUG, "retrying in %" PRId64 ".%09d seconds", timeout.tv_sec,
- timeout.tv_nsec);
+ if (timeout > 0) {
+ gpr_log(GPR_DEBUG, "retrying in %" PRIdPTR " milliseconds", timeout);
} else {
gpr_log(GPR_DEBUG, "retrying immediately");
}
GRPC_CLOSURE_INIT(&r->on_retry, dns_on_retry_timer_locked, r,
grpc_combiner_scheduler(r->base.combiner));
- grpc_timer_init(exec_ctx, &r->retry_timer, next_try, &r->on_retry, now);
+ grpc_timer_init(exec_ctx, &r->retry_timer, next_try, &r->on_retry);
}
if (r->resolved_result != NULL) {
grpc_channel_args_destroy(exec_ctx, r->resolved_result);
@@ -188,6 +192,7 @@ static void dns_on_resolved_locked(grpc_exec_ctx *exec_ctx, void *arg,
r->resolved_result = result;
r->resolved_version++;
dns_maybe_finish_next_locked(exec_ctx, r);
+ GRPC_ERROR_UNREF(error);
GRPC_RESOLVER_UNREF(exec_ctx, &r->base, "dns-resolving");
}
@@ -251,11 +256,11 @@ static grpc_resolver *dns_create(grpc_exec_ctx *exec_ctx,
grpc_pollset_set_add_pollset_set(exec_ctx, r->interested_parties,
args->pollset_set);
}
- gpr_backoff_init(&r->backoff_state, GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS,
- GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER,
- GRPC_DNS_RECONNECT_JITTER,
- GRPC_DNS_MIN_CONNECT_TIMEOUT_SECONDS * 1000,
- GRPC_DNS_RECONNECT_MAX_BACKOFF_SECONDS * 1000);
+ grpc_backoff_init(&r->backoff_state, GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS,
+ GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER,
+ GRPC_DNS_RECONNECT_JITTER,
+ GRPC_DNS_MIN_CONNECT_TIMEOUT_SECONDS * 1000,
+ GRPC_DNS_RECONNECT_MAX_BACKOFF_SECONDS * 1000);
return &r->base;
}
@@ -289,7 +294,7 @@ static grpc_resolver_factory *dns_resolver_factory_create() {
return &dns_resolver_factory;
}
-void grpc_resolver_dns_native_init(void) {
+extern "C" void grpc_resolver_dns_native_init(void) {
char *resolver = gpr_getenv("GRPC_DNS_RESOLVER");
if (resolver != NULL && gpr_stricmp(resolver, "native") == 0) {
gpr_log(GPR_DEBUG, "Using native dns resolver");
@@ -307,4 +312,4 @@ void grpc_resolver_dns_native_init(void) {
gpr_free(resolver);
}
-void grpc_resolver_dns_native_shutdown(void) {}
+extern "C" void grpc_resolver_dns_native_shutdown(void) {}
diff --git a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
index 69ea440ae6..ed5b1011fb 100644
--- a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c
+++ b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
@@ -258,8 +258,8 @@ static const grpc_resolver_factory_vtable fake_resolver_factory_vtable = {
static grpc_resolver_factory fake_resolver_factory = {
&fake_resolver_factory_vtable};
-void grpc_resolver_fake_init(void) {
+extern "C" void grpc_resolver_fake_init(void) {
grpc_register_resolver_type(&fake_resolver_factory);
}
-void grpc_resolver_fake_shutdown(void) {}
+extern "C" void grpc_resolver_fake_shutdown(void) {}
diff --git a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h
index c084ef2a58..95c3bafed8 100644
--- a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h
+++ b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h
@@ -21,6 +21,10 @@
#include "src/core/ext/filters/client_channel/uri_parser.h"
#include "src/core/lib/channel/channel_args.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR \
"grpc.fake_resolver.response_generator"
@@ -56,5 +60,9 @@ grpc_fake_resolver_response_generator_ref(
void grpc_fake_resolver_response_generator_unref(
grpc_fake_resolver_response_generator* generator);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_FAKE_FAKE_RESOLVER_H \
*/
diff --git a/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
index 7ceb8f40a1..dda9542325 100644
--- a/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c
+++ b/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
@@ -211,7 +211,7 @@ DECL_FACTORY(unix);
DECL_FACTORY(ipv4);
DECL_FACTORY(ipv6);
-void grpc_resolver_sockaddr_init(void) {
+extern "C" void grpc_resolver_sockaddr_init(void) {
grpc_register_resolver_type(&ipv4_resolver_factory);
grpc_register_resolver_type(&ipv6_resolver_factory);
#ifdef GRPC_HAVE_UNIX_SOCKET
@@ -219,4 +219,4 @@ void grpc_resolver_sockaddr_init(void) {
#endif
}
-void grpc_resolver_sockaddr_shutdown(void) {}
+extern "C" void grpc_resolver_sockaddr_shutdown(void) {}
diff --git a/src/core/ext/filters/client_channel/resolver_factory.c b/src/core/ext/filters/client_channel/resolver_factory.cc
index 6f0a7c1e36..6f0a7c1e36 100644
--- a/src/core/ext/filters/client_channel/resolver_factory.c
+++ b/src/core/ext/filters/client_channel/resolver_factory.cc
diff --git a/src/core/ext/filters/client_channel/resolver_factory.h b/src/core/ext/filters/client_channel/resolver_factory.h
index 6bd7929d4e..6e533e3248 100644
--- a/src/core/ext/filters/client_channel/resolver_factory.h
+++ b/src/core/ext/filters/client_channel/resolver_factory.h
@@ -24,6 +24,10 @@
#include "src/core/ext/filters/client_channel/uri_parser.h"
#include "src/core/lib/iomgr/pollset_set.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_resolver_factory grpc_resolver_factory;
typedef struct grpc_resolver_factory_vtable grpc_resolver_factory_vtable;
@@ -67,4 +71,8 @@ grpc_resolver *grpc_resolver_factory_create_resolver(
char *grpc_resolver_factory_get_default_authority(
grpc_resolver_factory *factory, grpc_uri *uri);
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_FACTORY_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_FACTORY_H */ \ No newline at end of file
diff --git a/src/core/ext/filters/client_channel/resolver_registry.c b/src/core/ext/filters/client_channel/resolver_registry.cc
index 1a0fb0bc3c..1a0fb0bc3c 100644
--- a/src/core/ext/filters/client_channel/resolver_registry.c
+++ b/src/core/ext/filters/client_channel/resolver_registry.cc
diff --git a/src/core/ext/filters/client_channel/resolver_registry.h b/src/core/ext/filters/client_channel/resolver_registry.h
index 692490543d..eb08d887b1 100644
--- a/src/core/ext/filters/client_channel/resolver_registry.h
+++ b/src/core/ext/filters/client_channel/resolver_registry.h
@@ -22,6 +22,10 @@
#include "src/core/ext/filters/client_channel/resolver_factory.h"
#include "src/core/lib/iomgr/pollset_set.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void grpc_resolver_registry_init();
void grpc_resolver_registry_shutdown(void);
@@ -66,4 +70,8 @@ char *grpc_get_default_authority(grpc_exec_ctx *exec_ctx, const char *target);
char *grpc_resolver_factory_add_default_prefix_if_needed(
grpc_exec_ctx *exec_ctx, const char *target);
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_REGISTRY_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_REGISTRY_H */ \ No newline at end of file
diff --git a/src/core/ext/filters/client_channel/retry_throttle.c b/src/core/ext/filters/client_channel/retry_throttle.cc
index 09dcade089..09dcade089 100644
--- a/src/core/ext/filters/client_channel/retry_throttle.c
+++ b/src/core/ext/filters/client_channel/retry_throttle.cc
diff --git a/src/core/ext/filters/client_channel/retry_throttle.h b/src/core/ext/filters/client_channel/retry_throttle.h
index bf99297e98..3b849475b9 100644
--- a/src/core/ext/filters/client_channel/retry_throttle.h
+++ b/src/core/ext/filters/client_channel/retry_throttle.h
@@ -21,6 +21,10 @@
#include <stdbool.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/// Tracks retry throttling data for an individual server name.
typedef struct grpc_server_retry_throttle_data grpc_server_retry_throttle_data;
@@ -47,4 +51,8 @@ void grpc_retry_throttle_map_shutdown();
grpc_server_retry_throttle_data* grpc_retry_throttle_map_get_data_for_server(
const char* server_name, int max_milli_tokens, int milli_token_ratio);
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RETRY_THROTTLE_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RETRY_THROTTLE_H */ \ No newline at end of file
diff --git a/src/core/ext/filters/client_channel/subchannel.c b/src/core/ext/filters/client_channel/subchannel.cc
index 40a51c72d6..5710a22178 100644
--- a/src/core/ext/filters/client_channel/subchannel.c
+++ b/src/core/ext/filters/client_channel/subchannel.cc
@@ -18,6 +18,7 @@
#include "src/core/ext/filters/client_channel/subchannel.h"
+#include <inttypes.h>
#include <limits.h>
#include <string.h>
@@ -30,6 +31,7 @@
#include "src/core/ext/filters/client_channel/proxy_mapper_registry.h"
#include "src/core/ext/filters/client_channel/subchannel_index.h"
#include "src/core/ext/filters/client_channel/uri_parser.h"
+#include "src/core/lib/backoff/backoff.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/debug/stats.h"
@@ -37,7 +39,6 @@
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/slice/slice_internal.h"
-#include "src/core/lib/support/backoff.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/channel_init.h"
#include "src/core/lib/transport/connectivity_state.h"
@@ -117,9 +118,9 @@ struct grpc_subchannel {
external_state_watcher root_external_state_watcher;
/** next connect attempt time */
- gpr_timespec next_attempt;
+ grpc_millis next_attempt;
/** backoff state */
- gpr_backoff backoff_state;
+ grpc_backoff backoff_state;
/** do we have an active alarm? */
bool have_alarm;
/** have we started the backoff loop */
@@ -343,31 +344,27 @@ grpc_subchannel *grpc_subchannel_create(grpc_exec_ctx *exec_ctx,
"grpc.testing.fixed_reconnect_backoff_ms")) {
fixed_reconnect_backoff = true;
initial_backoff_ms = min_backoff_ms = max_backoff_ms =
- grpc_channel_arg_get_integer(
- &c->args->args[i],
- (grpc_integer_options){initial_backoff_ms, 100, INT_MAX});
+ grpc_channel_arg_get_integer(&c->args->args[i],
+ {initial_backoff_ms, 100, INT_MAX});
} else if (0 == strcmp(c->args->args[i].key,
GRPC_ARG_MIN_RECONNECT_BACKOFF_MS)) {
fixed_reconnect_backoff = false;
min_backoff_ms = grpc_channel_arg_get_integer(
- &c->args->args[i],
- (grpc_integer_options){min_backoff_ms, 100, INT_MAX});
+ &c->args->args[i], {min_backoff_ms, 100, INT_MAX});
} else if (0 == strcmp(c->args->args[i].key,
GRPC_ARG_MAX_RECONNECT_BACKOFF_MS)) {
fixed_reconnect_backoff = false;
max_backoff_ms = grpc_channel_arg_get_integer(
- &c->args->args[i],
- (grpc_integer_options){max_backoff_ms, 100, INT_MAX});
+ &c->args->args[i], {max_backoff_ms, 100, INT_MAX});
} else if (0 == strcmp(c->args->args[i].key,
GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS)) {
fixed_reconnect_backoff = false;
initial_backoff_ms = grpc_channel_arg_get_integer(
- &c->args->args[i],
- (grpc_integer_options){initial_backoff_ms, 100, INT_MAX});
+ &c->args->args[i], {initial_backoff_ms, 100, INT_MAX});
}
}
}
- gpr_backoff_init(
+ grpc_backoff_init(
&c->backoff_state, initial_backoff_ms,
fixed_reconnect_backoff ? 1.0
: GRPC_SUBCHANNEL_RECONNECT_BACKOFF_MULTIPLIER,
@@ -431,8 +428,7 @@ static void on_alarm(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
}
if (error == GRPC_ERROR_NONE) {
gpr_log(GPR_INFO, "Failed to connect to channel, retrying");
- c->next_attempt =
- gpr_backoff_step(&c->backoff_state, gpr_now(GPR_CLOCK_MONOTONIC));
+ c->next_attempt = grpc_backoff_step(exec_ctx, &c->backoff_state);
continue_connect_locked(exec_ctx, c);
gpr_mu_unlock(&c->mu);
} else {
@@ -467,24 +463,22 @@ static void maybe_start_connecting_locked(grpc_exec_ctx *exec_ctx,
c->connecting = true;
GRPC_SUBCHANNEL_WEAK_REF(c, "connecting");
- gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
if (!c->backoff_begun) {
c->backoff_begun = true;
- c->next_attempt = gpr_backoff_begin(&c->backoff_state, now);
+ c->next_attempt = grpc_backoff_begin(exec_ctx, &c->backoff_state);
continue_connect_locked(exec_ctx, c);
} else {
GPR_ASSERT(!c->have_alarm);
c->have_alarm = true;
- gpr_timespec time_til_next = gpr_time_sub(c->next_attempt, now);
- if (gpr_time_cmp(time_til_next, gpr_time_0(time_til_next.clock_type)) <=
- 0) {
+ const grpc_millis time_til_next =
+ c->next_attempt - grpc_exec_ctx_now(exec_ctx);
+ if (time_til_next <= 0) {
gpr_log(GPR_INFO, "Retry immediately");
} else {
- gpr_log(GPR_INFO, "Retry in %" PRId64 ".%09d seconds",
- time_til_next.tv_sec, time_til_next.tv_nsec);
+ gpr_log(GPR_INFO, "Retry in %" PRIdPTR " milliseconds", time_til_next);
}
GRPC_CLOSURE_INIT(&c->on_alarm, on_alarm, c, grpc_schedule_on_exec_ctx);
- grpc_timer_init(exec_ctx, &c->alarm, c->next_attempt, &c->on_alarm, now);
+ grpc_timer_init(exec_ctx, &c->alarm, c->next_attempt, &c->on_alarm);
}
}
@@ -759,14 +753,15 @@ grpc_error *grpc_connected_subchannel_create_call(
grpc_call_stack *callstk = SUBCHANNEL_CALL_TO_CALL_STACK(*call);
(*call)->connection = GRPC_CONNECTED_SUBCHANNEL_REF(con, "subchannel_call");
const grpc_call_element_args call_args = {
- .call_stack = callstk,
- .server_transport_data = NULL,
- .context = args->context,
- .path = args->path,
- .start_time = args->start_time,
- .deadline = args->deadline,
- .arena = args->arena,
- .call_combiner = args->call_combiner};
+ callstk, /* call_stack */
+ NULL, /* server_transport_data */
+ args->context, /* context */
+ args->path, /* path */
+ args->start_time, /* start_time */
+ args->deadline, /* deadline */
+ args->arena, /* arena */
+ args->call_combiner /* call_combiner */
+ };
grpc_error *error = grpc_call_stack_init(
exec_ctx, chanstk, 1, subchannel_call_destroy, *call, &call_args);
if (error != GRPC_ERROR_NONE) {
diff --git a/src/core/ext/filters/client_channel/subchannel.h b/src/core/ext/filters/client_channel/subchannel.h
index 51d712f6a7..46b29f1fe0 100644
--- a/src/core/ext/filters/client_channel/subchannel.h
+++ b/src/core/ext/filters/client_channel/subchannel.h
@@ -26,6 +26,10 @@
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/lib/transport/metadata.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// Channel arg containing a grpc_resolved_address to connect to.
#define GRPC_ARG_SUBCHANNEL_ADDRESS "grpc.subchannel_address"
@@ -103,7 +107,7 @@ typedef struct {
grpc_polling_entity *pollent;
grpc_slice path;
gpr_timespec start_time;
- gpr_timespec deadline;
+ grpc_millis deadline;
gpr_arena *arena;
grpc_call_context_element *context;
grpc_call_combiner *call_combiner;
@@ -188,4 +192,8 @@ const char *grpc_get_subchannel_address_uri_arg(const grpc_channel_args *args);
/// Caller is responsible for freeing the string.
grpc_arg grpc_create_subchannel_address_arg(const grpc_resolved_address *addr);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SUBCHANNEL_H */
diff --git a/src/core/ext/filters/client_channel/subchannel_index.c b/src/core/ext/filters/client_channel/subchannel_index.cc
index d7a51f3899..1f466ec0b8 100644
--- a/src/core/ext/filters/client_channel/subchannel_index.c
+++ b/src/core/ext/filters/client_channel/subchannel_index.cc
@@ -114,11 +114,12 @@ static void *scv_avl_copy(void *p, void *unused) {
}
static const gpr_avl_vtable subchannel_avl_vtable = {
- .destroy_key = sck_avl_destroy,
- .copy_key = sck_avl_copy,
- .compare_keys = sck_avl_compare,
- .destroy_value = scv_avl_destroy,
- .copy_value = scv_avl_copy};
+ sck_avl_destroy, // destroy_key
+ sck_avl_copy, // copy_key
+ sck_avl_compare, // compare_keys
+ scv_avl_destroy, // destroy_value
+ scv_avl_copy // copy_value
+};
void grpc_subchannel_index_init(void) {
g_subchannel_index = gpr_avl_create(&subchannel_avl_vtable);
diff --git a/src/core/ext/filters/client_channel/subchannel_index.h b/src/core/ext/filters/client_channel/subchannel_index.h
index 92e36d5283..09bac3592c 100644
--- a/src/core/ext/filters/client_channel/subchannel_index.h
+++ b/src/core/ext/filters/client_channel/subchannel_index.h
@@ -21,6 +21,10 @@
#include "src/core/ext/filters/client_channel/subchannel.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** \file Provides an index of active subchannels so that they can be
shared amongst channels */
@@ -78,4 +82,8 @@ void grpc_subchannel_index_unref(void);
* force_creation set. */
void grpc_subchannel_index_test_only_set_force_creation(bool force_creation);
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SUBCHANNEL_INDEX_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SUBCHANNEL_INDEX_H */ \ No newline at end of file
diff --git a/src/core/ext/filters/client_channel/uri_parser.c b/src/core/ext/filters/client_channel/uri_parser.cc
index fb4fb8e694..fb4fb8e694 100644
--- a/src/core/ext/filters/client_channel/uri_parser.c
+++ b/src/core/ext/filters/client_channel/uri_parser.cc
diff --git a/src/core/ext/filters/client_channel/uri_parser.h b/src/core/ext/filters/client_channel/uri_parser.h
index 05ca2e00e4..43e8ae64e0 100644
--- a/src/core/ext/filters/client_channel/uri_parser.h
+++ b/src/core/ext/filters/client_channel/uri_parser.h
@@ -22,6 +22,10 @@
#include <stddef.h>
#include "src/core/lib/iomgr/exec_ctx.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct {
char *scheme;
char *authority;
@@ -47,4 +51,8 @@ const char *grpc_uri_get_query_arg(const grpc_uri *uri, const char *key);
/** destroy a uri */
void grpc_uri_destroy(grpc_uri *uri);
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_URI_PARSER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_URI_PARSER_H */ \ No newline at end of file
diff --git a/src/core/ext/filters/deadline/deadline_filter.c b/src/core/ext/filters/deadline/deadline_filter.cc
index 1aed488077..dc194ec068 100644
--- a/src/core/ext/filters/deadline/deadline_filter.c
+++ b/src/core/ext/filters/deadline/deadline_filter.cc
@@ -86,9 +86,8 @@ static void timer_callback(grpc_exec_ctx* exec_ctx, void* arg,
// synchronized.
static void start_timer_if_needed(grpc_exec_ctx* exec_ctx,
grpc_call_element* elem,
- gpr_timespec deadline) {
- deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC);
- if (gpr_time_cmp(deadline, gpr_inf_future(GPR_CLOCK_MONOTONIC)) == 0) {
+ grpc_millis deadline) {
+ if (deadline == GRPC_MILLIS_INF_FUTURE) {
return;
}
grpc_deadline_state* deadline_state = (grpc_deadline_state*)elem->call_data;
@@ -114,8 +113,7 @@ static void start_timer_if_needed(grpc_exec_ctx* exec_ctx,
}
GPR_ASSERT(closure != NULL);
GRPC_CALL_STACK_REF(deadline_state->call_stack, "deadline_timer");
- grpc_timer_init(exec_ctx, &deadline_state->timer, deadline, closure,
- gpr_now(GPR_CLOCK_MONOTONIC));
+ grpc_timer_init(exec_ctx, &deadline_state->timer, deadline, closure);
}
// Cancels the deadline timer.
@@ -155,7 +153,7 @@ static void inject_on_complete_cb(grpc_deadline_state* deadline_state,
struct start_timer_after_init_state {
bool in_call_combiner;
grpc_call_element* elem;
- gpr_timespec deadline;
+ grpc_millis deadline;
grpc_closure closure;
};
static void start_timer_after_init(grpc_exec_ctx* exec_ctx, void* arg,
@@ -182,14 +180,13 @@ static void start_timer_after_init(grpc_exec_ctx* exec_ctx, void* arg,
void grpc_deadline_state_init(grpc_exec_ctx* exec_ctx, grpc_call_element* elem,
grpc_call_stack* call_stack,
grpc_call_combiner* call_combiner,
- gpr_timespec deadline) {
+ grpc_millis deadline) {
grpc_deadline_state* deadline_state = (grpc_deadline_state*)elem->call_data;
deadline_state->call_stack = call_stack;
deadline_state->call_combiner = call_combiner;
// Deadline will always be infinite on servers, so the timer will only be
// set on clients with a finite deadline.
- deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC);
- if (gpr_time_cmp(deadline, gpr_inf_future(GPR_CLOCK_MONOTONIC)) != 0) {
+ if (deadline != GRPC_MILLIS_INF_FUTURE) {
// When the deadline passes, we indicate the failure by sending down
// an op with cancel_error set. However, we can't send down any ops
// until after the call stack is fully initialized. If we start the
@@ -214,7 +211,7 @@ void grpc_deadline_state_destroy(grpc_exec_ctx* exec_ctx,
}
void grpc_deadline_state_reset(grpc_exec_ctx* exec_ctx, grpc_call_element* elem,
- gpr_timespec new_deadline) {
+ grpc_millis new_deadline) {
grpc_deadline_state* deadline_state = (grpc_deadline_state*)elem->call_data;
cancel_timer_if_needed(exec_ctx, deadline_state);
start_timer_if_needed(exec_ctx, elem, new_deadline);
@@ -385,7 +382,7 @@ static bool maybe_add_deadline_filter(grpc_exec_ctx* exec_ctx,
: true;
}
-void grpc_deadline_filter_init(void) {
+extern "C" void grpc_deadline_filter_init(void) {
grpc_channel_init_register_stage(
GRPC_CLIENT_DIRECT_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
maybe_add_deadline_filter, (void*)&grpc_client_deadline_filter);
@@ -394,4 +391,4 @@ void grpc_deadline_filter_init(void) {
maybe_add_deadline_filter, (void*)&grpc_server_deadline_filter);
}
-void grpc_deadline_filter_shutdown(void) {}
+extern "C" void grpc_deadline_filter_shutdown(void) {}
diff --git a/src/core/ext/filters/deadline/deadline_filter.h b/src/core/ext/filters/deadline/deadline_filter.h
index 3eb102ad28..4a80535b14 100644
--- a/src/core/ext/filters/deadline/deadline_filter.h
+++ b/src/core/ext/filters/deadline/deadline_filter.h
@@ -20,6 +20,10 @@
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/iomgr/timer.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum grpc_deadline_timer_state {
GRPC_DEADLINE_STATE_INITIAL,
GRPC_DEADLINE_STATE_PENDING,
@@ -52,7 +56,8 @@ typedef struct grpc_deadline_state {
void grpc_deadline_state_init(grpc_exec_ctx* exec_ctx, grpc_call_element* elem,
grpc_call_stack* call_stack,
grpc_call_combiner* call_combiner,
- gpr_timespec deadline);
+ grpc_millis deadline);
+
void grpc_deadline_state_destroy(grpc_exec_ctx* exec_ctx,
grpc_call_element* elem);
@@ -66,7 +71,7 @@ void grpc_deadline_state_destroy(grpc_exec_ctx* exec_ctx,
//
// Note: Must be called while holding the call combiner.
void grpc_deadline_state_reset(grpc_exec_ctx* exec_ctx, grpc_call_element* elem,
- gpr_timespec new_deadline);
+ grpc_millis new_deadline);
// To be called from the client-side filter's start_transport_stream_op_batch()
// method. Ensures that the deadline timer is cancelled when the call
@@ -89,4 +94,8 @@ bool grpc_deadline_checking_enabled(const grpc_channel_args* args);
extern const grpc_channel_filter grpc_client_deadline_filter;
extern const grpc_channel_filter grpc_server_deadline_filter;
-#endif /* GRPC_CORE_EXT_FILTERS_DEADLINE_DEADLINE_FILTER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_FILTERS_DEADLINE_DEADLINE_FILTER_H */ \ No newline at end of file
diff --git a/src/core/ext/filters/http/client/http_client_filter.c b/src/core/ext/filters/http/client/http_client_filter.cc
index 6208089f2e..6208089f2e 100644
--- a/src/core/ext/filters/http/client/http_client_filter.c
+++ b/src/core/ext/filters/http/client/http_client_filter.cc
diff --git a/src/core/ext/filters/http/client/http_client_filter.h b/src/core/ext/filters/http/client/http_client_filter.h
index ec8177c436..9ed8e76915 100644
--- a/src/core/ext/filters/http/client/http_client_filter.h
+++ b/src/core/ext/filters/http/client/http_client_filter.h
@@ -20,10 +20,18 @@
#include "src/core/lib/channel/channel_stack.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Processes metadata on the client side for HTTP2 transports */
extern const grpc_channel_filter grpc_http_client_filter;
/* Channel arg to determine maximum size of payload eligable for GET request */
#define GRPC_ARG_MAX_PAYLOAD_SIZE_FOR_GET "grpc.max_payload_size_for_get"
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_FILTERS_HTTP_CLIENT_HTTP_CLIENT_FILTER_H */
diff --git a/src/core/ext/filters/http/http_filters_plugin.c b/src/core/ext/filters/http/http_filters_plugin.cc
index 88bd2250f9..8f5b856317 100644
--- a/src/core/ext/filters/http/http_filters_plugin.c
+++ b/src/core/ext/filters/http/http_filters_plugin.cc
@@ -64,7 +64,7 @@ static bool maybe_add_required_filter(grpc_exec_ctx *exec_ctx,
: true;
}
-void grpc_http_filters_init(void) {
+extern "C" void grpc_http_filters_init(void) {
grpc_register_tracer(&grpc_compression_trace);
grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL,
GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
@@ -86,4 +86,4 @@ void grpc_http_filters_init(void) {
maybe_add_required_filter, (void *)&grpc_http_server_filter);
}
-void grpc_http_filters_shutdown(void) {}
+extern "C" void grpc_http_filters_shutdown(void) {}
diff --git a/src/core/ext/filters/http/message_compress/message_compress_filter.c b/src/core/ext/filters/http/message_compress/message_compress_filter.cc
index b7c50fdc3a..b7c50fdc3a 100644
--- a/src/core/ext/filters/http/message_compress/message_compress_filter.c
+++ b/src/core/ext/filters/http/message_compress/message_compress_filter.cc
diff --git a/src/core/ext/filters/http/message_compress/message_compress_filter.h b/src/core/ext/filters/http/message_compress/message_compress_filter.h
index c121a391eb..92771d9858 100644
--- a/src/core/ext/filters/http/message_compress/message_compress_filter.h
+++ b/src/core/ext/filters/http/message_compress/message_compress_filter.h
@@ -23,6 +23,10 @@
#include "src/core/lib/channel/channel_stack.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** Compression filter for outgoing data.
*
* See <grpc/compression.h> for the available compression settings.
@@ -47,5 +51,9 @@
extern const grpc_channel_filter grpc_message_compress_filter;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_FILTERS_HTTP_MESSAGE_COMPRESS_MESSAGE_COMPRESS_FILTER_H \
*/
diff --git a/src/core/ext/filters/http/server/http_server_filter.c b/src/core/ext/filters/http/server/http_server_filter.cc
index 03958136b4..03958136b4 100644
--- a/src/core/ext/filters/http/server/http_server_filter.c
+++ b/src/core/ext/filters/http/server/http_server_filter.cc
diff --git a/src/core/ext/filters/http/server/http_server_filter.h b/src/core/ext/filters/http/server/http_server_filter.h
index c0f678a329..4b38cc5bf7 100644
--- a/src/core/ext/filters/http/server/http_server_filter.h
+++ b/src/core/ext/filters/http/server/http_server_filter.h
@@ -21,7 +21,15 @@
#include "src/core/lib/channel/channel_stack.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Processes metadata on the client side for HTTP2 transports */
extern const grpc_channel_filter grpc_http_server_filter;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_FILTERS_HTTP_SERVER_HTTP_SERVER_FILTER_H */
diff --git a/src/core/ext/filters/load_reporting/server_load_reporting_filter.c b/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc
index ca8a3b2a13..ca8a3b2a13 100644
--- a/src/core/ext/filters/load_reporting/server_load_reporting_filter.c
+++ b/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc
diff --git a/src/core/ext/filters/load_reporting/server_load_reporting_filter.h b/src/core/ext/filters/load_reporting/server_load_reporting_filter.h
index 9527868c9f..94d19cc249 100644
--- a/src/core/ext/filters/load_reporting/server_load_reporting_filter.h
+++ b/src/core/ext/filters/load_reporting/server_load_reporting_filter.h
@@ -22,7 +22,15 @@
#include "src/core/ext/filters/load_reporting/server_load_reporting_plugin.h"
#include "src/core/lib/channel/channel_stack.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern const grpc_channel_filter grpc_server_load_reporting_filter;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_FILTERS_LOAD_REPORTING_SERVER_LOAD_REPORTING_FILTER_H \
*/
diff --git a/src/core/ext/filters/load_reporting/server_load_reporting_plugin.c b/src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc
index 2486ead427..223fb3ee8b 100644
--- a/src/core/ext/filters/load_reporting/server_load_reporting_plugin.c
+++ b/src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc
@@ -61,10 +61,10 @@ grpc_arg grpc_load_reporting_enable_arg() {
/* Plugin registration */
-void grpc_server_load_reporting_plugin_init(void) {
+extern "C" void grpc_server_load_reporting_plugin_init(void) {
grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX,
maybe_add_server_load_reporting_filter,
(void *)&grpc_server_load_reporting_filter);
}
-void grpc_server_load_reporting_plugin_shutdown() {}
+extern "C" void grpc_server_load_reporting_plugin_shutdown() {}
diff --git a/src/core/ext/filters/load_reporting/server_load_reporting_plugin.h b/src/core/ext/filters/load_reporting/server_load_reporting_plugin.h
index 65a6d0900e..65e254eb53 100644
--- a/src/core/ext/filters/load_reporting/server_load_reporting_plugin.h
+++ b/src/core/ext/filters/load_reporting/server_load_reporting_plugin.h
@@ -23,6 +23,10 @@
#include "src/core/lib/channel/channel_stack.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** Identifiers for the invocation point of the users LR callback */
typedef enum grpc_load_reporting_source {
GRPC_LR_POINT_UNKNOWN = 0,
@@ -55,5 +59,9 @@ typedef struct grpc_load_reporting_call_data {
/** Return a \a grpc_arg enabling load reporting */
grpc_arg grpc_load_reporting_enable_arg();
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_FILTERS_LOAD_REPORTING_SERVER_LOAD_REPORTING_PLUGIN_H \
*/
diff --git a/src/core/ext/filters/max_age/max_age_filter.c b/src/core/ext/filters/max_age/max_age_filter.cc
index 0ac803ed41..ade2e5bc82 100644
--- a/src/core/ext/filters/max_age/max_age_filter.c
+++ b/src/core/ext/filters/max_age/max_age_filter.cc
@@ -33,9 +33,9 @@
#define MAX_CONNECTION_AGE_JITTER 0.1
#define MAX_CONNECTION_AGE_INTEGER_OPTIONS \
- (grpc_integer_options) { DEFAULT_MAX_CONNECTION_AGE_MS, 1, INT_MAX }
+ { DEFAULT_MAX_CONNECTION_AGE_MS, 1, INT_MAX }
#define MAX_CONNECTION_IDLE_INTEGER_OPTIONS \
- (grpc_integer_options) { DEFAULT_MAX_CONNECTION_IDLE_MS, 1, INT_MAX }
+ { DEFAULT_MAX_CONNECTION_IDLE_MS, 1, INT_MAX }
typedef struct channel_data {
/* We take a reference to the channel stack for the timer callback */
@@ -56,11 +56,11 @@ typedef struct channel_data {
max_connection_idle */
grpc_timer max_idle_timer;
/* Allowed max time a channel may have no outstanding rpcs */
- gpr_timespec max_connection_idle;
+ grpc_millis max_connection_idle;
/* Allowed max time a channel may exist */
- gpr_timespec max_connection_age;
+ grpc_millis max_connection_age;
/* Allowed grace period after the channel reaches its max age */
- gpr_timespec max_connection_age_grace;
+ grpc_millis max_connection_age_grace;
/* Closure to run when the channel's idle duration reaches max_connection_idle
and should be closed gracefully */
grpc_closure close_max_idle_channel;
@@ -99,10 +99,9 @@ static void increase_call_count(grpc_exec_ctx* exec_ctx, channel_data* chand) {
static void decrease_call_count(grpc_exec_ctx* exec_ctx, channel_data* chand) {
if (gpr_atm_full_fetch_add(&chand->call_count, -1) == 1) {
GRPC_CHANNEL_STACK_REF(chand->channel_stack, "max_age max_idle_timer");
- grpc_timer_init(
- exec_ctx, &chand->max_idle_timer,
- gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), chand->max_connection_idle),
- &chand->close_max_idle_channel, gpr_now(GPR_CLOCK_MONOTONIC));
+ grpc_timer_init(exec_ctx, &chand->max_idle_timer,
+ grpc_exec_ctx_now(exec_ctx) + chand->max_connection_idle,
+ &chand->close_max_idle_channel);
}
}
@@ -123,10 +122,9 @@ static void start_max_age_timer_after_init(grpc_exec_ctx* exec_ctx, void* arg,
gpr_mu_lock(&chand->max_age_timer_mu);
chand->max_age_timer_pending = true;
GRPC_CHANNEL_STACK_REF(chand->channel_stack, "max_age max_age_timer");
- grpc_timer_init(
- exec_ctx, &chand->max_age_timer,
- gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), chand->max_connection_age),
- &chand->close_max_age_channel, gpr_now(GPR_CLOCK_MONOTONIC));
+ grpc_timer_init(exec_ctx, &chand->max_age_timer,
+ grpc_exec_ctx_now(exec_ctx) + chand->max_connection_age,
+ &chand->close_max_age_channel);
gpr_mu_unlock(&chand->max_age_timer_mu);
grpc_transport_op* op = grpc_make_transport_op(NULL);
op->on_connectivity_state_change = &chand->channel_connectivity_changed,
@@ -144,11 +142,12 @@ static void start_max_age_grace_timer_after_goaway_op(grpc_exec_ctx* exec_ctx,
gpr_mu_lock(&chand->max_age_timer_mu);
chand->max_age_grace_timer_pending = true;
GRPC_CHANNEL_STACK_REF(chand->channel_stack, "max_age max_age_grace_timer");
- grpc_timer_init(exec_ctx, &chand->max_age_grace_timer,
- gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC),
- chand->max_connection_age_grace),
- &chand->force_close_max_age_channel,
- gpr_now(GPR_CLOCK_MONOTONIC));
+ grpc_timer_init(
+ exec_ctx, &chand->max_age_grace_timer,
+ chand->max_connection_age_grace == GRPC_MILLIS_INF_FUTURE
+ ? GRPC_MILLIS_INF_FUTURE
+ : grpc_exec_ctx_now(exec_ctx) + chand->max_connection_age_grace,
+ &chand->force_close_max_age_channel);
gpr_mu_unlock(&chand->max_age_timer_mu);
GRPC_CHANNEL_STACK_UNREF(exec_ctx, chand->channel_stack,
"max_age start_max_age_grace_timer_after_goaway_op");
@@ -249,7 +248,8 @@ static void channel_connectivity_changed(grpc_exec_ctx* exec_ctx, void* arg,
connection storms. Note that the MAX_CONNECTION_AGE option without jitter
would not create connection storms by itself, but if there happened to be a
connection storm it could cause it to repeat at a fixed period. */
-static int add_random_max_connection_age_jitter(int value) {
+static grpc_millis
+add_random_max_connection_age_jitter_and_convert_to_grpc_millis(int value) {
/* generate a random number between 1 - MAX_CONNECTION_AGE_JITTER and
1 + MAX_CONNECTION_AGE_JITTER */
double multiplier = rand() * MAX_CONNECTION_AGE_JITTER * 2.0 / RAND_MAX +
@@ -257,7 +257,9 @@ static int add_random_max_connection_age_jitter(int value) {
double result = multiplier * value;
/* INT_MAX - 0.5 converts the value to float, so that result will not be
cast to int implicitly before the comparison. */
- return result > INT_MAX - 0.5 ? INT_MAX : (int)result;
+ return result > ((double)GRPC_MILLIS_INF_FUTURE) - 0.5
+ ? GRPC_MILLIS_INF_FUTURE
+ : (grpc_millis)result;
}
/* Constructor for call_data. */
@@ -287,46 +289,36 @@ static grpc_error* init_channel_elem(grpc_exec_ctx* exec_ctx,
chand->max_age_grace_timer_pending = false;
chand->channel_stack = args->channel_stack;
chand->max_connection_age =
- DEFAULT_MAX_CONNECTION_AGE_MS == INT_MAX
- ? gpr_inf_future(GPR_TIMESPAN)
- : gpr_time_from_millis(add_random_max_connection_age_jitter(
- DEFAULT_MAX_CONNECTION_AGE_MS),
- GPR_TIMESPAN);
+ add_random_max_connection_age_jitter_and_convert_to_grpc_millis(
+ DEFAULT_MAX_CONNECTION_AGE_MS);
chand->max_connection_age_grace =
DEFAULT_MAX_CONNECTION_AGE_GRACE_MS == INT_MAX
- ? gpr_inf_future(GPR_TIMESPAN)
- : gpr_time_from_millis(DEFAULT_MAX_CONNECTION_AGE_GRACE_MS,
- GPR_TIMESPAN);
- chand->max_connection_idle =
- DEFAULT_MAX_CONNECTION_IDLE_MS == INT_MAX
- ? gpr_inf_future(GPR_TIMESPAN)
- : gpr_time_from_millis(DEFAULT_MAX_CONNECTION_IDLE_MS, GPR_TIMESPAN);
+ ? GRPC_MILLIS_INF_FUTURE
+ : DEFAULT_MAX_CONNECTION_AGE_GRACE_MS;
+ chand->max_connection_idle = DEFAULT_MAX_CONNECTION_IDLE_MS == INT_MAX
+ ? GRPC_MILLIS_INF_FUTURE
+ : DEFAULT_MAX_CONNECTION_IDLE_MS;
for (size_t i = 0; i < args->channel_args->num_args; ++i) {
if (0 == strcmp(args->channel_args->args[i].key,
GRPC_ARG_MAX_CONNECTION_AGE_MS)) {
const int value = grpc_channel_arg_get_integer(
&args->channel_args->args[i], MAX_CONNECTION_AGE_INTEGER_OPTIONS);
chand->max_connection_age =
- value == INT_MAX
- ? gpr_inf_future(GPR_TIMESPAN)
- : gpr_time_from_millis(
- add_random_max_connection_age_jitter(value), GPR_TIMESPAN);
+ add_random_max_connection_age_jitter_and_convert_to_grpc_millis(
+ value);
} else if (0 == strcmp(args->channel_args->args[i].key,
GRPC_ARG_MAX_CONNECTION_AGE_GRACE_MS)) {
const int value = grpc_channel_arg_get_integer(
&args->channel_args->args[i],
- (grpc_integer_options){DEFAULT_MAX_CONNECTION_AGE_GRACE_MS, 0,
- INT_MAX});
+ {DEFAULT_MAX_CONNECTION_AGE_GRACE_MS, 0, INT_MAX});
chand->max_connection_age_grace =
- value == INT_MAX ? gpr_inf_future(GPR_TIMESPAN)
- : gpr_time_from_millis(value, GPR_TIMESPAN);
+ value == INT_MAX ? GRPC_MILLIS_INF_FUTURE : value;
} else if (0 == strcmp(args->channel_args->args[i].key,
GRPC_ARG_MAX_CONNECTION_IDLE_MS)) {
const int value = grpc_channel_arg_get_integer(
&args->channel_args->args[i], MAX_CONNECTION_IDLE_INTEGER_OPTIONS);
chand->max_connection_idle =
- value == INT_MAX ? gpr_inf_future(GPR_TIMESPAN)
- : gpr_time_from_millis(value, GPR_TIMESPAN);
+ value == INT_MAX ? GRPC_MILLIS_INF_FUTURE : value;
}
}
GRPC_CLOSURE_INIT(&chand->close_max_idle_channel, close_max_idle_channel,
@@ -349,8 +341,7 @@ static grpc_error* init_channel_elem(grpc_exec_ctx* exec_ctx,
channel_connectivity_changed, chand,
grpc_schedule_on_exec_ctx);
- if (gpr_time_cmp(chand->max_connection_age, gpr_inf_future(GPR_TIMESPAN)) !=
- 0) {
+ if (chand->max_connection_age != GRPC_MILLIS_INF_FUTURE) {
/* When the channel reaches its max age, we send down an op with
goaway_error set. However, we can't send down any ops until after the
channel stack is fully initialized. If we start the timer here, we have
@@ -367,8 +358,7 @@ static grpc_error* init_channel_elem(grpc_exec_ctx* exec_ctx,
/* Initialize the number of calls as 1, so that the max_idle_timer will not
start until start_max_idle_timer_after_init is invoked. */
gpr_atm_rel_store(&chand->call_count, 1);
- if (gpr_time_cmp(chand->max_connection_idle, gpr_inf_future(GPR_TIMESPAN)) !=
- 0) {
+ if (chand->max_connection_idle != GRPC_MILLIS_INF_FUTURE) {
GRPC_CHANNEL_STACK_REF(chand->channel_stack,
"max_age start_max_idle_timer_after_init");
GRPC_CLOSURE_SCHED(exec_ctx, &chand->start_max_idle_timer_after_init,
@@ -414,10 +404,10 @@ static bool maybe_add_max_age_filter(grpc_exec_ctx* exec_ctx,
}
}
-void grpc_max_age_filter_init(void) {
+extern "C" void grpc_max_age_filter_init(void) {
grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL,
GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
maybe_add_max_age_filter, NULL);
}
-void grpc_max_age_filter_shutdown(void) {}
+extern "C" void grpc_max_age_filter_shutdown(void) {}
diff --git a/src/core/ext/filters/max_age/max_age_filter.h b/src/core/ext/filters/max_age/max_age_filter.h
index 68fb4a4ca5..eeeefd695e 100644
--- a/src/core/ext/filters/max_age/max_age_filter.h
+++ b/src/core/ext/filters/max_age/max_age_filter.h
@@ -19,6 +19,14 @@
#include "src/core/lib/channel/channel_stack.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern const grpc_channel_filter grpc_max_age_filter;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_FILTERS_MAX_AGE_MAX_AGE_FILTER_H */
diff --git a/src/core/ext/filters/message_size/message_size_filter.c b/src/core/ext/filters/message_size/message_size_filter.cc
index 47763b1deb..5dc131b9f6 100644
--- a/src/core/ext/filters/message_size/message_size_filter.c
+++ b/src/core/ext/filters/message_size/message_size_filter.cc
@@ -288,7 +288,7 @@ static bool maybe_add_message_size_filter(grpc_exec_ctx* exec_ctx,
}
}
-void grpc_message_size_filter_init(void) {
+extern "C" void grpc_message_size_filter_init(void) {
grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL,
GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
maybe_add_message_size_filter, NULL);
@@ -300,4 +300,4 @@ void grpc_message_size_filter_init(void) {
maybe_add_message_size_filter, NULL);
}
-void grpc_message_size_filter_shutdown(void) {}
+extern "C" void grpc_message_size_filter_shutdown(void) {}
diff --git a/src/core/ext/filters/message_size/message_size_filter.h b/src/core/ext/filters/message_size/message_size_filter.h
index d3667f7003..da325d6f89 100644
--- a/src/core/ext/filters/message_size/message_size_filter.h
+++ b/src/core/ext/filters/message_size/message_size_filter.h
@@ -19,6 +19,14 @@
#include "src/core/lib/channel/channel_stack.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern const grpc_channel_filter grpc_message_size_filter;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_FILTERS_MESSAGE_SIZE_MESSAGE_SIZE_FILTER_H */
diff --git a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc
index c8b2fe5f99..f77ed02421 100644
--- a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c
+++ b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc
@@ -196,7 +196,7 @@ static bool register_workaround_cronet_compression(
builder, &grpc_workaround_cronet_compression_filter, NULL, NULL);
}
-void grpc_workaround_cronet_compression_filter_init(void) {
+extern "C" void grpc_workaround_cronet_compression_filter_init(void) {
grpc_channel_init_register_stage(
GRPC_SERVER_CHANNEL, GRPC_WORKAROUND_PRIORITY_HIGH,
register_workaround_cronet_compression, NULL);
@@ -204,4 +204,4 @@ void grpc_workaround_cronet_compression_filter_init(void) {
parse_user_agent);
}
-void grpc_workaround_cronet_compression_filter_shutdown(void) {}
+extern "C" void grpc_workaround_cronet_compression_filter_shutdown(void) {}
diff --git a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h
index 9dae4f0734..c8b07df63e 100644
--- a/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h
+++ b/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h
@@ -19,7 +19,15 @@
#include "src/core/lib/channel/channel_stack.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern const grpc_channel_filter grpc_workaround_cronet_compression_filter;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_FILTERS_WORKAROUNDS_WORKAROUND_CRONET_COMPRESSION_FILTER_H \
*/
diff --git a/src/core/ext/filters/workarounds/workaround_utils.c b/src/core/ext/filters/workarounds/workaround_utils.cc
index e600fbee67..e600fbee67 100644
--- a/src/core/ext/filters/workarounds/workaround_utils.c
+++ b/src/core/ext/filters/workarounds/workaround_utils.cc
diff --git a/src/core/ext/filters/workarounds/workaround_utils.h b/src/core/ext/filters/workarounds/workaround_utils.h
index 2ad7a876d5..afd5291333 100644
--- a/src/core/ext/filters/workarounds/workaround_utils.h
+++ b/src/core/ext/filters/workarounds/workaround_utils.h
@@ -24,6 +24,10 @@
#define GRPC_WORKAROUND_PRIORITY_HIGH 10001
#define GRPC_WORKAROUND_PROIRITY_LOW 9999
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_workaround_user_agent_md {
bool workaround_active[GRPC_MAX_WORKAROUND_ID];
} grpc_workaround_user_agent_md;
@@ -34,4 +38,8 @@ typedef bool (*user_agent_parser)(grpc_mdelem);
void grpc_register_workaround(uint32_t id, user_agent_parser parser);
-#endif /* GRPC_CORE_EXT_FILTERS_WORKAROUNDS_WORKAROUND_UTILS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_FILTERS_WORKAROUNDS_WORKAROUND_UTILS_H */ \ No newline at end of file
diff --git a/src/core/ext/transport/chttp2/alpn/alpn.c b/src/core/ext/transport/chttp2/alpn/alpn.cc
index ca2e801ec8..ca2e801ec8 100644
--- a/src/core/ext/transport/chttp2/alpn/alpn.c
+++ b/src/core/ext/transport/chttp2/alpn/alpn.cc
diff --git a/src/core/ext/transport/chttp2/alpn/alpn.h b/src/core/ext/transport/chttp2/alpn/alpn.h
index 379af4b24c..5842204c20 100644
--- a/src/core/ext/transport/chttp2/alpn/alpn.h
+++ b/src/core/ext/transport/chttp2/alpn/alpn.h
@@ -21,6 +21,10 @@
#include <string.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Retuns 1 if the version is supported, 0 otherwise. */
int grpc_chttp2_is_alpn_version_supported(const char *version, size_t size);
@@ -31,4 +35,8 @@ size_t grpc_chttp2_num_alpn_versions(void);
* grpc_chttp2_num_alpn_versions()) */
const char *grpc_chttp2_get_alpn_version_index(size_t i);
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_ALPN_ALPN_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_ALPN_ALPN_H */ \ No newline at end of file
diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.c b/src/core/ext/transport/chttp2/client/chttp2_connector.cc
index 202bcd47f5..202bcd47f5 100644
--- a/src/core/ext/transport/chttp2/client/chttp2_connector.c
+++ b/src/core/ext/transport/chttp2/client/chttp2_connector.cc
diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.h b/src/core/ext/transport/chttp2/client/chttp2_connector.h
index e258892cfc..63f264e0ef 100644
--- a/src/core/ext/transport/chttp2/client/chttp2_connector.h
+++ b/src/core/ext/transport/chttp2/client/chttp2_connector.h
@@ -19,8 +19,16 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_CLIENT_CHTTP2_CONNECTOR_H
#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_CLIENT_CHTTP2_CONNECTOR_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "src/core/ext/filters/client_channel/connector.h"
grpc_connector* grpc_chttp2_connector_create();
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_CLIENT_CHTTP2_CONNECTOR_H */
diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.cc
index 6410a6043d..6410a6043d 100644
--- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c
+++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.cc
diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc
index dd88136f7b..dd88136f7b 100644
--- a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c
+++ b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc
diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc
index d4580f15f5..fe296cf4ff 100644
--- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c
+++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc
@@ -86,7 +86,8 @@ static grpc_subchannel_args *get_secure_naming_subchannel_args(
if (target_uri->path[0] != '\0') { // "path" may be empty
const grpc_slice key = grpc_slice_from_static_string(
target_uri->path[0] == '/' ? target_uri->path + 1 : target_uri->path);
- const char *value = grpc_slice_hash_table_get(targets_info, key);
+ const char *value =
+ (const char *)grpc_slice_hash_table_get(targets_info, key);
if (value != NULL) target_name_to_check = gpr_strdup(value);
grpc_slice_unref_internal(exec_ctx, key);
}
@@ -127,7 +128,8 @@ static grpc_subchannel_args *get_secure_naming_subchannel_args(
if (new_args_from_connector != NULL) {
grpc_channel_args_destroy(exec_ctx, new_args_from_connector);
}
- grpc_subchannel_args *final_sc_args = gpr_malloc(sizeof(*final_sc_args));
+ grpc_subchannel_args *final_sc_args =
+ (grpc_subchannel_args *)gpr_malloc(sizeof(*final_sc_args));
memcpy(final_sc_args, args, sizeof(*args));
final_sc_args->args = new_args;
return final_sc_args;
@@ -164,7 +166,7 @@ static grpc_channel *client_channel_factory_create_channel(
}
// Add channel arg containing the server URI.
grpc_arg arg = grpc_channel_arg_string_create(
- GRPC_ARG_SERVER_URI,
+ (char *)GRPC_ARG_SERVER_URI,
grpc_resolver_factory_add_default_prefix_if_needed(exec_ctx, target));
const char *to_remove[] = {GRPC_ARG_SERVER_URI};
grpc_channel_args *new_args =
diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.c b/src/core/ext/transport/chttp2/server/chttp2_server.cc
index 60244e163b..7ac7f4ece8 100644
--- a/src/core/ext/transport/chttp2/server/chttp2_server.c
+++ b/src/core/ext/transport/chttp2/server/chttp2_server.cc
@@ -20,6 +20,7 @@
#include <grpc/grpc.h>
+#include <inttypes.h>
#include <string.h>
#include <grpc/support/alloc.h>
@@ -133,8 +134,8 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp,
connection_state->handshake_mgr);
// TODO(roth): We should really get this timeout value from channel
// args instead of hard-coding it.
- const gpr_timespec deadline = gpr_time_add(
- gpr_now(GPR_CLOCK_MONOTONIC), gpr_time_from_seconds(120, GPR_TIMESPAN));
+ const grpc_millis deadline =
+ grpc_exec_ctx_now(exec_ctx) + 120 * GPR_MS_PER_SEC;
grpc_handshake_manager_do_handshake(exec_ctx, connection_state->handshake_mgr,
tcp, state->args, deadline, acceptor,
on_handshake_done, connection_state);
diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.h b/src/core/ext/transport/chttp2/server/chttp2_server.h
index ed968496f9..e1df28ed11 100644
--- a/src/core/ext/transport/chttp2/server/chttp2_server.h
+++ b/src/core/ext/transport/chttp2/server/chttp2_server.h
@@ -23,10 +23,18 @@
#include "src/core/lib/iomgr/exec_ctx.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/// Adds a port to \a server. Sets \a port_num to the port number.
/// Takes ownership of \a args.
grpc_error *grpc_chttp2_server_add_port(grpc_exec_ctx *exec_ctx,
grpc_server *server, const char *addr,
grpc_channel_args *args, int *port_num);
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_SERVER_CHTTP2_SERVER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_SERVER_CHTTP2_SERVER_H */ \ No newline at end of file
diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc
index d42b2d123e..d42b2d123e 100644
--- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c
+++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc
diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc
index e647067f73..e647067f73 100644
--- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c
+++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc
diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc
index 5ad63aaf1f..e74a138d23 100644
--- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c
+++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc
@@ -40,6 +40,8 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr,
grpc_error *err = GRPC_ERROR_NONE;
grpc_server_security_connector *sc = NULL;
int port_num = 0;
+ grpc_security_status status;
+ grpc_channel_args *args = NULL;
GRPC_API_TRACE(
"grpc_server_add_secure_http2_port("
"server=%p, addr=%s, creds=%p)",
@@ -50,7 +52,7 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr,
"No credentials specified for secure server port (creds==NULL)");
goto done;
}
- grpc_security_status status =
+ status =
grpc_server_credentials_create_security_connector(&exec_ctx, creds, &sc);
if (status != GRPC_SECURITY_OK) {
char *msg;
@@ -66,7 +68,7 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr,
grpc_arg args_to_add[2];
args_to_add[0] = grpc_server_credentials_to_arg(creds);
args_to_add[1] = grpc_security_connector_to_arg(&sc->base);
- grpc_channel_args *args =
+ args =
grpc_channel_args_copy_and_add(grpc_server_get_channel_args(server),
args_to_add, GPR_ARRAY_SIZE(args_to_add));
// Add server port.
diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.c b/src/core/ext/transport/chttp2/transport/bin_decoder.cc
index 5a99cbeffc..5a99cbeffc 100644
--- a/src/core/ext/transport/chttp2/transport/bin_decoder.c
+++ b/src/core/ext/transport/chttp2/transport/bin_decoder.cc
diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.h b/src/core/ext/transport/chttp2/transport/bin_decoder.h
index 047b33d587..f50e0a8ac4 100644
--- a/src/core/ext/transport/chttp2/transport/bin_decoder.h
+++ b/src/core/ext/transport/chttp2/transport/bin_decoder.h
@@ -22,6 +22,10 @@
#include <grpc/slice.h>
#include <stdbool.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct grpc_base64_decode_context {
/* input/output: */
uint8_t *input_cur;
@@ -49,4 +53,8 @@ grpc_slice grpc_chttp2_base64_decode_with_length(grpc_exec_ctx *exec_ctx,
grpc_slice input,
size_t output_length);
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H */ \ No newline at end of file
diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.c b/src/core/ext/transport/chttp2/transport/bin_encoder.cc
index 42d481b3c0..42d481b3c0 100644
--- a/src/core/ext/transport/chttp2/transport/bin_encoder.c
+++ b/src/core/ext/transport/chttp2/transport/bin_encoder.cc
diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.h b/src/core/ext/transport/chttp2/transport/bin_encoder.h
index a8f36a345a..ae8219c5ce 100644
--- a/src/core/ext/transport/chttp2/transport/bin_encoder.h
+++ b/src/core/ext/transport/chttp2/transport/bin_encoder.h
@@ -21,6 +21,10 @@
#include <grpc/slice.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* base64 encode a slice. Returns a new slice, does not take ownership of the
input */
grpc_slice grpc_chttp2_base64_encode(grpc_slice input);
@@ -36,4 +40,8 @@ grpc_slice grpc_chttp2_huffman_compress(grpc_slice input);
return y; */
grpc_slice grpc_chttp2_base64_encode_and_huffman_compress(grpc_slice input);
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H */ \ No newline at end of file
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_plugin.c b/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc
index 6d09953830..ac9ae5c395 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_plugin.c
+++ b/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc
@@ -20,7 +20,7 @@
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/transport/metadata.h"
-void grpc_chttp2_plugin_init(void) {
+extern "C" void grpc_chttp2_plugin_init(void) {
grpc_register_tracer(&grpc_http_trace);
grpc_register_tracer(&grpc_flowctl_trace);
grpc_register_tracer(&grpc_trace_http2_stream_state);
@@ -29,4 +29,4 @@ void grpc_chttp2_plugin_init(void) {
#endif
}
-void grpc_chttp2_plugin_shutdown(void) {}
+extern "C" void grpc_chttp2_plugin_shutdown(void) {}
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
index acf49632ff..e4b19a2c4a 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
@@ -18,6 +18,9 @@
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
+#include <grpc/support/port_platform.h>
+
+#include <inttypes.h>
#include <limits.h>
#include <math.h>
#include <stdio.h>
@@ -156,11 +159,9 @@ static void finish_bdp_ping_locked(grpc_exec_ctx *exec_ctx, void *tp,
static void cancel_pings(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
grpc_error *error);
-static void send_ping_locked(
- grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
- grpc_chttp2_ping_type ping_type, grpc_closure *on_initiate,
- grpc_closure *on_complete,
- grpc_chttp2_initiate_write_reason initiate_write_reason);
+static void send_ping_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
+ grpc_closure *on_initiate,
+ grpc_closure *on_complete);
static void retry_initiate_ping_locked(grpc_exec_ctx *exec_ctx, void *tp,
grpc_error *error);
@@ -276,6 +277,7 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
t->is_client = is_client;
t->flow_control.remote_window = DEFAULT_WINDOW;
t->flow_control.announced_window = DEFAULT_WINDOW;
+ t->flow_control.target_initial_window_size = DEFAULT_WINDOW;
t->flow_control.t = t;
t->deframe_state = is_client ? GRPC_DTS_FH_0 : GRPC_DTS_CLIENT_PREFIX_0;
t->is_first_frame = true;
@@ -314,16 +316,6 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
grpc_combiner_scheduler(t->combiner));
grpc_bdp_estimator_init(&t->flow_control.bdp_estimator, t->peer_string);
- t->flow_control.last_pid_update = gpr_now(GPR_CLOCK_MONOTONIC);
- grpc_pid_controller_init(
- &t->flow_control.pid_controller,
- (grpc_pid_controller_args){.gain_p = 4,
- .gain_i = 8,
- .gain_d = 0,
- .initial_control_value = log2(DEFAULT_WINDOW),
- .min_control_value = -1,
- .max_control_value = 25,
- .integral_range = 10});
grpc_chttp2_goaway_parser_init(&t->goaway_parser);
grpc_chttp2_hpack_parser_init(exec_ctx, &t->hpack_parser);
@@ -362,43 +354,33 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
queue_setting_update(exec_ctx, t,
GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS, 0);
}
- queue_setting_update(exec_ctx, t, GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE,
- DEFAULT_WINDOW);
queue_setting_update(exec_ctx, t, GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE,
DEFAULT_MAX_HEADER_LIST_SIZE);
queue_setting_update(exec_ctx, t,
GRPC_CHTTP2_SETTINGS_GRPC_ALLOW_TRUE_BINARY_METADATA, 1);
t->ping_policy.max_pings_without_data = g_default_max_pings_without_data;
- t->ping_policy.min_sent_ping_interval_without_data = gpr_time_from_millis(
- g_default_min_sent_ping_interval_without_data_ms, GPR_TIMESPAN);
+ t->ping_policy.min_sent_ping_interval_without_data =
+ g_default_min_sent_ping_interval_without_data_ms;
t->ping_policy.max_ping_strikes = g_default_max_ping_strikes;
- t->ping_policy.min_recv_ping_interval_without_data = gpr_time_from_millis(
- g_default_min_recv_ping_interval_without_data_ms, GPR_TIMESPAN);
+ t->ping_policy.min_recv_ping_interval_without_data =
+ g_default_min_recv_ping_interval_without_data_ms;
/* Keepalive setting */
if (t->is_client) {
- t->keepalive_time =
- g_default_client_keepalive_time_ms == INT_MAX
- ? gpr_inf_future(GPR_TIMESPAN)
- : gpr_time_from_millis(g_default_client_keepalive_time_ms,
- GPR_TIMESPAN);
- t->keepalive_timeout =
- g_default_client_keepalive_timeout_ms == INT_MAX
- ? gpr_inf_future(GPR_TIMESPAN)
- : gpr_time_from_millis(g_default_client_keepalive_timeout_ms,
- GPR_TIMESPAN);
+ t->keepalive_time = g_default_client_keepalive_time_ms == INT_MAX
+ ? GRPC_MILLIS_INF_FUTURE
+ : g_default_client_keepalive_time_ms;
+ t->keepalive_timeout = g_default_client_keepalive_timeout_ms == INT_MAX
+ ? GRPC_MILLIS_INF_FUTURE
+ : g_default_client_keepalive_timeout_ms;
} else {
- t->keepalive_time =
- g_default_server_keepalive_time_ms == INT_MAX
- ? gpr_inf_future(GPR_TIMESPAN)
- : gpr_time_from_millis(g_default_server_keepalive_time_ms,
- GPR_TIMESPAN);
- t->keepalive_timeout =
- g_default_server_keepalive_timeout_ms == INT_MAX
- ? gpr_inf_future(GPR_TIMESPAN)
- : gpr_time_from_millis(g_default_server_keepalive_timeout_ms,
- GPR_TIMESPAN);
+ t->keepalive_time = g_default_server_keepalive_time_ms == INT_MAX
+ ? GRPC_MILLIS_INF_FUTURE
+ : g_default_server_keepalive_time_ms;
+ t->keepalive_timeout = g_default_server_keepalive_timeout_ms == INT_MAX
+ ? GRPC_MILLIS_INF_FUTURE
+ : g_default_server_keepalive_timeout_ms;
}
t->keepalive_permit_without_calls = g_default_keepalive_permit_without_calls;
@@ -433,73 +415,63 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA)) {
t->ping_policy.max_pings_without_data = grpc_channel_arg_get_integer(
&channel_args->args[i],
- (grpc_integer_options){g_default_max_pings_without_data, 0,
- INT_MAX});
+ {g_default_max_pings_without_data, 0, INT_MAX});
} else if (0 == strcmp(channel_args->args[i].key,
GRPC_ARG_HTTP2_MAX_PING_STRIKES)) {
t->ping_policy.max_ping_strikes = grpc_channel_arg_get_integer(
- &channel_args->args[i],
- (grpc_integer_options){g_default_max_ping_strikes, 0, INT_MAX});
+ &channel_args->args[i], {g_default_max_ping_strikes, 0, INT_MAX});
} else if (0 ==
strcmp(
channel_args->args[i].key,
GRPC_ARG_HTTP2_MIN_SENT_PING_INTERVAL_WITHOUT_DATA_MS)) {
t->ping_policy.min_sent_ping_interval_without_data =
- gpr_time_from_millis(
- grpc_channel_arg_get_integer(
- &channel_args->args[i],
- (grpc_integer_options){
- g_default_min_sent_ping_interval_without_data_ms, 0,
- INT_MAX}),
- GPR_TIMESPAN);
+ grpc_channel_arg_get_integer(
+ &channel_args->args[i],
+ grpc_integer_options{
+ g_default_min_sent_ping_interval_without_data_ms, 0,
+ INT_MAX});
} else if (0 ==
strcmp(
channel_args->args[i].key,
GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS)) {
t->ping_policy.min_recv_ping_interval_without_data =
- gpr_time_from_millis(
- grpc_channel_arg_get_integer(
- &channel_args->args[i],
- (grpc_integer_options){
- g_default_min_recv_ping_interval_without_data_ms, 0,
- INT_MAX}),
- GPR_TIMESPAN);
+ grpc_channel_arg_get_integer(
+ &channel_args->args[i],
+ grpc_integer_options{
+ g_default_min_recv_ping_interval_without_data_ms, 0,
+ INT_MAX});
} else if (0 == strcmp(channel_args->args[i].key,
GRPC_ARG_HTTP2_WRITE_BUFFER_SIZE)) {
t->write_buffer_size = (uint32_t)grpc_channel_arg_get_integer(
- &channel_args->args[i],
- (grpc_integer_options){0, 0, MAX_WRITE_BUFFER_SIZE});
+ &channel_args->args[i], {0, 0, MAX_WRITE_BUFFER_SIZE});
} else if (0 ==
strcmp(channel_args->args[i].key, GRPC_ARG_HTTP2_BDP_PROBE)) {
- t->flow_control.enable_bdp_probe = grpc_channel_arg_get_integer(
- &channel_args->args[i], (grpc_integer_options){1, 0, 1});
+ t->flow_control.enable_bdp_probe =
+ grpc_channel_arg_get_integer(&channel_args->args[i], {1, 0, 1});
} else if (0 == strcmp(channel_args->args[i].key,
GRPC_ARG_KEEPALIVE_TIME_MS)) {
const int value = grpc_channel_arg_get_integer(
&channel_args->args[i],
- (grpc_integer_options){t->is_client
- ? g_default_client_keepalive_time_ms
- : g_default_server_keepalive_time_ms,
- 1, INT_MAX});
- t->keepalive_time = value == INT_MAX
- ? gpr_inf_future(GPR_TIMESPAN)
- : gpr_time_from_millis(value, GPR_TIMESPAN);
+ grpc_integer_options{t->is_client
+ ? g_default_client_keepalive_time_ms
+ : g_default_server_keepalive_time_ms,
+ 1, INT_MAX});
+ t->keepalive_time = value == INT_MAX ? GRPC_MILLIS_INF_FUTURE : value;
} else if (0 == strcmp(channel_args->args[i].key,
GRPC_ARG_KEEPALIVE_TIMEOUT_MS)) {
const int value = grpc_channel_arg_get_integer(
&channel_args->args[i],
- (grpc_integer_options){t->is_client
- ? g_default_client_keepalive_timeout_ms
- : g_default_server_keepalive_timeout_ms,
- 0, INT_MAX});
- t->keepalive_timeout = value == INT_MAX
- ? gpr_inf_future(GPR_TIMESPAN)
- : gpr_time_from_millis(value, GPR_TIMESPAN);
+ grpc_integer_options{t->is_client
+ ? g_default_client_keepalive_timeout_ms
+ : g_default_server_keepalive_timeout_ms,
+ 0, INT_MAX});
+ t->keepalive_timeout =
+ value == INT_MAX ? GRPC_MILLIS_INF_FUTURE : value;
} else if (0 == strcmp(channel_args->args[i].key,
GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS)) {
t->keepalive_permit_without_calls =
- (uint32_t)grpc_channel_arg_get_integer(
- &channel_args->args[i], (grpc_integer_options){0, 0, 1});
+ (uint32_t)grpc_channel_arg_get_integer(&channel_args->args[i],
+ {0, 0, 1});
} else if (0 == strcmp(channel_args->args[i].key,
GRPC_ARG_OPTIMIZATION_TARGET)) {
if (channel_args->args[i].type != GRPC_ARG_STRING) {
@@ -574,23 +546,27 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
t->ping_state.pings_before_data_required = 0;
t->ping_state.is_delayed_ping_timer_set = false;
- t->ping_recv_state.last_ping_recv_time = gpr_inf_past(GPR_CLOCK_MONOTONIC);
+ t->ping_recv_state.last_ping_recv_time = GRPC_MILLIS_INF_PAST;
t->ping_recv_state.ping_strikes = 0;
/* Start keepalive pings */
- if (gpr_time_cmp(t->keepalive_time, gpr_inf_future(GPR_TIMESPAN)) != 0) {
+ if (t->keepalive_time != GRPC_MILLIS_INF_FUTURE) {
t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_WAITING;
GRPC_CHTTP2_REF_TRANSPORT(t, "init keepalive ping");
- grpc_timer_init(
- exec_ctx, &t->keepalive_ping_timer,
- gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), t->keepalive_time),
- &t->init_keepalive_ping_locked, gpr_now(GPR_CLOCK_MONOTONIC));
+ grpc_timer_init(exec_ctx, &t->keepalive_ping_timer,
+ grpc_exec_ctx_now(exec_ctx) + t->keepalive_time,
+ &t->init_keepalive_ping_locked);
} else {
/* Use GRPC_CHTTP2_KEEPALIVE_STATE_DISABLED to indicate there are no
inflight keeaplive timers */
t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_DISABLED;
}
+ grpc_chttp2_act_on_flowctl_action(
+ exec_ctx,
+ grpc_chttp2_flowctl_get_action(exec_ctx, &t->flow_control, NULL), t,
+ NULL);
+
grpc_chttp2_initiate_write(exec_ctx, t,
GRPC_CHTTP2_INITIATE_WRITE_INITIAL_WRITE);
post_benign_reclaimer(exec_ctx, t);
@@ -701,7 +677,7 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt,
grpc_chttp2_incoming_metadata_buffer_init(&s->metadata_buffer[1], arena);
grpc_chttp2_data_parser_init(&s->data_parser);
grpc_slice_buffer_init(&s->flow_controlled_buffer);
- s->deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
+ s->deadline = GRPC_MILLIS_INF_FUTURE;
GRPC_CLOSURE_INIT(&s->complete_fetch_locked, complete_fetch_locked, s,
grpc_schedule_on_exec_ctx);
grpc_slice_buffer_init(&s->unprocessed_incoming_frames_buffer);
@@ -905,9 +881,6 @@ static void inc_initiate_write_reason(
case GRPC_CHTTP2_INITIATE_WRITE_SEND_SETTINGS:
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_SETTINGS(exec_ctx);
break;
- case GRPC_CHTTP2_INITIATE_WRITE_BDP_ESTIMATOR_PING:
- GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_BDP_ESTIMATOR_PING(exec_ctx);
- break;
case GRPC_CHTTP2_INITIATE_WRITE_FLOW_CONTROL_UNSTALLED_BY_SETTING:
GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_SETTING(
exec_ctx);
@@ -1045,6 +1018,7 @@ static void write_action_begin_locked(grpc_exec_ctx *exec_ctx, void *gt,
write_action, t, scheduler),
GRPC_ERROR_NONE);
} else {
+ GRPC_STATS_INC_HTTP2_SPURIOUS_WRITES_BEGUN(exec_ctx);
set_write_state(exec_ctx, t, GRPC_CHTTP2_WRITE_STATE_IDLE,
"begin writing nothing");
GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "writing");
@@ -1143,14 +1117,12 @@ void grpc_chttp2_add_incoming_goaway(grpc_exec_ctx *exec_ctx,
gpr_log(GPR_ERROR,
"Received a GOAWAY with error code ENHANCE_YOUR_CALM and debug "
"data equal to \"too_many_pings\"");
- double current_keepalive_time_ms =
- gpr_timespec_to_micros(t->keepalive_time) / 1000;
+ double current_keepalive_time_ms = (double)t->keepalive_time;
t->keepalive_time =
current_keepalive_time_ms > INT_MAX / KEEPALIVE_TIME_BACKOFF_MULTIPLIER
- ? gpr_inf_future(GPR_TIMESPAN)
- : gpr_time_from_millis((int64_t)(current_keepalive_time_ms *
- KEEPALIVE_TIME_BACKOFF_MULTIPLIER),
- GPR_TIMESPAN);
+ ? GRPC_MILLIS_INF_FUTURE
+ : (grpc_millis)(current_keepalive_time_ms *
+ KEEPALIVE_TIME_BACKOFF_MULTIPLIER);
}
/* lie: use transient failure from the transport to indicate goaway has been
@@ -1464,8 +1436,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op,
t->settings[GRPC_PEER_SETTINGS]
[GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE];
if (t->is_client) {
- s->deadline =
- gpr_time_min(s->deadline, s->send_initial_metadata->deadline);
+ s->deadline = GPR_MIN(s->deadline, s->send_initial_metadata->deadline);
}
if (metadata_size > metadata_peer_limit) {
grpc_chttp2_cancel_stream(
@@ -1649,8 +1620,8 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op,
&t->flow_control, &s->flow_control, GRPC_HEADER_SIZE_IN_BYTES,
already_received);
grpc_chttp2_act_on_flowctl_action(
- exec_ctx,
- grpc_chttp2_flowctl_get_action(&t->flow_control, &s->flow_control),
+ exec_ctx, grpc_chttp2_flowctl_get_action(exec_ctx, &t->flow_control,
+ &s->flow_control),
t, s);
}
}
@@ -1683,16 +1654,14 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt,
if (!t->is_client) {
if (op->send_initial_metadata) {
- gpr_timespec deadline =
+ grpc_millis deadline =
op->payload->send_initial_metadata.send_initial_metadata->deadline;
- GPR_ASSERT(0 ==
- gpr_time_cmp(gpr_inf_future(deadline.clock_type), deadline));
+ GPR_ASSERT(deadline == GRPC_MILLIS_INF_FUTURE);
}
if (op->send_trailing_metadata) {
- gpr_timespec deadline =
+ grpc_millis deadline =
op->payload->send_trailing_metadata.send_trailing_metadata->deadline;
- GPR_ASSERT(0 ==
- gpr_time_cmp(gpr_inf_future(deadline.clock_type), deadline));
+ GPR_ASSERT(deadline == GRPC_MILLIS_INF_FUTURE);
}
}
@@ -1716,28 +1685,21 @@ static void cancel_pings(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
grpc_error *error) {
/* callback remaining pings: they're not allowed to call into the transpot,
and maybe they hold resources that need to be freed */
- for (size_t i = 0; i < GRPC_CHTTP2_PING_TYPE_COUNT; i++) {
- grpc_chttp2_ping_queue *pq = &t->ping_queues[i];
- for (size_t j = 0; j < GRPC_CHTTP2_PCL_COUNT; j++) {
- grpc_closure_list_fail_all(&pq->lists[j], GRPC_ERROR_REF(error));
- GRPC_CLOSURE_LIST_SCHED(exec_ctx, &pq->lists[j]);
- }
+ grpc_chttp2_ping_queue *pq = &t->ping_queue;
+ for (size_t j = 0; j < GRPC_CHTTP2_PCL_COUNT; j++) {
+ grpc_closure_list_fail_all(&pq->lists[j], GRPC_ERROR_REF(error));
+ GRPC_CLOSURE_LIST_SCHED(exec_ctx, &pq->lists[j]);
}
GRPC_ERROR_UNREF(error);
}
-static void send_ping_locked(
- grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
- grpc_chttp2_ping_type ping_type, grpc_closure *on_initiate,
- grpc_closure *on_ack,
- grpc_chttp2_initiate_write_reason initiate_write_reason) {
- grpc_chttp2_ping_queue *pq = &t->ping_queues[ping_type];
+static void send_ping_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
+ grpc_closure *on_initiate, grpc_closure *on_ack) {
+ grpc_chttp2_ping_queue *pq = &t->ping_queue;
grpc_closure_list_append(&pq->lists[GRPC_CHTTP2_PCL_INITIATE], on_initiate,
GRPC_ERROR_NONE);
- if (grpc_closure_list_append(&pq->lists[GRPC_CHTTP2_PCL_NEXT], on_ack,
- GRPC_ERROR_NONE)) {
- grpc_chttp2_initiate_write(exec_ctx, t, initiate_write_reason);
- }
+ grpc_closure_list_append(&pq->lists[GRPC_CHTTP2_PCL_NEXT], on_ack,
+ GRPC_ERROR_NONE);
}
static void retry_initiate_ping_locked(grpc_exec_ctx *exec_ctx, void *tp,
@@ -1752,8 +1714,7 @@ static void retry_initiate_ping_locked(grpc_exec_ctx *exec_ctx, void *tp,
void grpc_chttp2_ack_ping(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
uint64_t id) {
- grpc_chttp2_ping_queue *pq =
- &t->ping_queues[id % GRPC_CHTTP2_PING_TYPE_COUNT];
+ grpc_chttp2_ping_queue *pq = &t->ping_queue;
if (pq->inflight_id != id) {
char *from = grpc_endpoint_get_peer(t->ep);
gpr_log(GPR_DEBUG, "Unknown ping response from %s: %" PRIx64, from, id);
@@ -1772,8 +1733,8 @@ static void send_goaway(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
t->sent_goaway_state = GRPC_CHTTP2_GOAWAY_SEND_SCHEDULED;
grpc_http2_error_code http_error;
grpc_slice slice;
- grpc_error_get_status(error, gpr_inf_future(GPR_CLOCK_MONOTONIC), NULL,
- &slice, &http_error);
+ grpc_error_get_status(exec_ctx, error, GRPC_MILLIS_INF_FUTURE, NULL, &slice,
+ &http_error);
grpc_chttp2_goaway_append(t->last_new_stream_id, (uint32_t)http_error,
grpc_slice_ref_internal(slice), &t->qbuf);
grpc_chttp2_initiate_write(exec_ctx, t,
@@ -1783,7 +1744,7 @@ static void send_goaway(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
void grpc_chttp2_add_ping_strike(grpc_exec_ctx *exec_ctx,
grpc_chttp2_transport *t) {
- gpr_log(GPR_DEBUG, "PING strike");
+ t->ping_recv_state.ping_strikes++;
if (++t->ping_recv_state.ping_strikes > t->ping_policy.max_ping_strikes &&
t->ping_policy.max_ping_strikes != 0) {
send_goaway(exec_ctx, t,
@@ -1823,9 +1784,9 @@ static void perform_transport_op_locked(grpc_exec_ctx *exec_ctx,
}
if (op->send_ping) {
- send_ping_locked(exec_ctx, t, GRPC_CHTTP2_PING_ON_NEXT_WRITE, NULL,
- op->send_ping,
- GRPC_CHTTP2_INITIATE_WRITE_APPLICATION_PING);
+ send_ping_locked(exec_ctx, t, NULL, op->send_ping);
+ grpc_chttp2_initiate_write(exec_ctx, t,
+ GRPC_CHTTP2_INITIATE_WRITE_APPLICATION_PING);
}
if (op->on_connectivity_state_change != NULL) {
@@ -1901,7 +1862,9 @@ void grpc_chttp2_maybe_complete_recv_message(grpc_exec_ctx *exec_ctx,
&s->frame_storage);
s->unprocessed_incoming_frames_decompressed = false;
}
- if (!s->unprocessed_incoming_frames_decompressed) {
+ if (!s->unprocessed_incoming_frames_decompressed &&
+ s->stream_decompression_method !=
+ GRPC_STREAM_COMPRESSION_IDENTITY_DECOMPRESS) {
GPR_ASSERT(s->decompressed_data_buffer.length == 0);
bool end_of_context;
if (!s->stream_decompression_ctx) {
@@ -2070,7 +2033,8 @@ void grpc_chttp2_cancel_stream(grpc_exec_ctx *exec_ctx,
if (!s->read_closed || !s->write_closed) {
if (s->id != 0) {
grpc_http2_error_code http_error;
- grpc_error_get_status(due_to_error, s->deadline, NULL, NULL, &http_error);
+ grpc_error_get_status(exec_ctx, due_to_error, s->deadline, NULL, NULL,
+ &http_error);
grpc_slice_buffer_add(
&t->qbuf, grpc_chttp2_rst_stream_create(s->id, (uint32_t)http_error,
&s->stats.outgoing));
@@ -2088,7 +2052,7 @@ void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
grpc_chttp2_stream *s, grpc_error *error) {
grpc_status_code status;
grpc_slice slice;
- grpc_error_get_status(error, s->deadline, &status, &slice, NULL);
+ grpc_error_get_status(exec_ctx, error, s->deadline, &status, &slice, NULL);
if (status != GRPC_STATUS_OK) {
s->seen_error = true;
@@ -2253,7 +2217,8 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
uint32_t len = 0;
grpc_status_code grpc_status;
grpc_slice slice;
- grpc_error_get_status(error, s->deadline, &grpc_status, &slice, NULL);
+ grpc_error_get_status(exec_ctx, error, s->deadline, &grpc_status, &slice,
+ NULL);
GPR_ASSERT(grpc_status >= 0 && (int)grpc_status < 100);
@@ -2470,10 +2435,8 @@ void grpc_chttp2_act_on_flowctl_action(grpc_exec_ctx *exec_ctx,
if (action.need_ping) {
GRPC_CHTTP2_REF_TRANSPORT(t, "bdp_ping");
grpc_bdp_estimator_schedule_ping(&t->flow_control.bdp_estimator);
- send_ping_locked(exec_ctx, t,
- GRPC_CHTTP2_PING_BEFORE_TRANSPORT_WINDOW_UPDATE,
- &t->start_bdp_ping_locked, &t->finish_bdp_ping_locked,
- GRPC_CHTTP2_INITIATE_WRITE_BDP_ESTIMATOR_PING);
+ send_ping_locked(exec_ctx, t, &t->start_bdp_ping_locked,
+ &t->finish_bdp_ping_locked);
}
}
@@ -2581,7 +2544,8 @@ static void read_action_locked(grpc_exec_ctx *exec_ctx, void *tp,
grpc_endpoint_read(exec_ctx, t->ep, &t->read_buffer,
&t->read_action_locked);
grpc_chttp2_act_on_flowctl_action(
- exec_ctx, grpc_chttp2_flowctl_get_bdp_action(&t->flow_control), t,
+ exec_ctx,
+ grpc_chttp2_flowctl_get_action(exec_ctx, &t->flow_control, NULL), t,
NULL);
GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "keep_reading");
} else {
@@ -2614,7 +2578,7 @@ static void finish_bdp_ping_locked(grpc_exec_ctx *exec_ctx, void *tp,
if (GRPC_TRACER_ON(grpc_http_trace)) {
gpr_log(GPR_DEBUG, "%s: Complete BDP ping", t->peer_string);
}
- grpc_bdp_estimator_complete_ping(&t->flow_control.bdp_estimator);
+ grpc_bdp_estimator_complete_ping(exec_ctx, &t->flow_control.bdp_estimator);
GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "bdp_ping");
}
@@ -2626,9 +2590,7 @@ void grpc_chttp2_config_default_keepalive_args(grpc_channel_args *args,
for (i = 0; i < args->num_args; i++) {
if (0 == strcmp(args->args[i].key, GRPC_ARG_KEEPALIVE_TIME_MS)) {
const int value = grpc_channel_arg_get_integer(
- &args->args[i],
- (grpc_integer_options){g_default_client_keepalive_time_ms, 1,
- INT_MAX});
+ &args->args[i], {g_default_client_keepalive_time_ms, 1, INT_MAX});
if (is_client) {
g_default_client_keepalive_time_ms = value;
} else {
@@ -2638,8 +2600,7 @@ void grpc_chttp2_config_default_keepalive_args(grpc_channel_args *args,
strcmp(args->args[i].key, GRPC_ARG_KEEPALIVE_TIMEOUT_MS)) {
const int value = grpc_channel_arg_get_integer(
&args->args[i],
- (grpc_integer_options){g_default_client_keepalive_timeout_ms, 0,
- INT_MAX});
+ {g_default_client_keepalive_timeout_ms, 0, INT_MAX});
if (is_client) {
g_default_client_keepalive_timeout_ms = value;
} else {
@@ -2650,18 +2611,15 @@ void grpc_chttp2_config_default_keepalive_args(grpc_channel_args *args,
g_default_keepalive_permit_without_calls =
(uint32_t)grpc_channel_arg_get_integer(
&args->args[i],
- (grpc_integer_options){g_default_keepalive_permit_without_calls,
- 0, 1});
+ {g_default_keepalive_permit_without_calls, 0, 1});
} else if (0 ==
strcmp(args->args[i].key, GRPC_ARG_HTTP2_MAX_PING_STRIKES)) {
g_default_max_ping_strikes = grpc_channel_arg_get_integer(
- &args->args[i],
- (grpc_integer_options){g_default_max_ping_strikes, 0, INT_MAX});
+ &args->args[i], {g_default_max_ping_strikes, 0, INT_MAX});
} else if (0 == strcmp(args->args[i].key,
GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA)) {
g_default_max_pings_without_data = grpc_channel_arg_get_integer(
- &args->args[i], (grpc_integer_options){
- g_default_max_pings_without_data, 0, INT_MAX});
+ &args->args[i], {g_default_max_pings_without_data, 0, INT_MAX});
} else if (0 ==
strcmp(
args->args[i].key,
@@ -2669,9 +2627,7 @@ void grpc_chttp2_config_default_keepalive_args(grpc_channel_args *args,
g_default_min_sent_ping_interval_without_data_ms =
grpc_channel_arg_get_integer(
&args->args[i],
- (grpc_integer_options){
- g_default_min_sent_ping_interval_without_data_ms, 0,
- INT_MAX});
+ {g_default_min_sent_ping_interval_without_data_ms, 0, INT_MAX});
} else if (0 ==
strcmp(
args->args[i].key,
@@ -2679,9 +2635,7 @@ void grpc_chttp2_config_default_keepalive_args(grpc_channel_args *args,
g_default_min_recv_ping_interval_without_data_ms =
grpc_channel_arg_get_integer(
&args->args[i],
- (grpc_integer_options){
- g_default_min_recv_ping_interval_without_data_ms, 0,
- INT_MAX});
+ {g_default_min_recv_ping_interval_without_data_ms, 0, INT_MAX});
}
}
}
@@ -2698,24 +2652,22 @@ static void init_keepalive_ping_locked(grpc_exec_ctx *exec_ctx, void *arg,
grpc_chttp2_stream_map_size(&t->stream_map) > 0) {
t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_PINGING;
GRPC_CHTTP2_REF_TRANSPORT(t, "keepalive ping end");
- send_ping_locked(exec_ctx, t, GRPC_CHTTP2_PING_ON_NEXT_WRITE,
- &t->start_keepalive_ping_locked,
- &t->finish_keepalive_ping_locked,
- GRPC_CHTTP2_INITIATE_WRITE_KEEPALIVE_PING);
+ send_ping_locked(exec_ctx, t, &t->start_keepalive_ping_locked,
+ &t->finish_keepalive_ping_locked);
+ grpc_chttp2_initiate_write(exec_ctx, t,
+ GRPC_CHTTP2_INITIATE_WRITE_KEEPALIVE_PING);
} else {
GRPC_CHTTP2_REF_TRANSPORT(t, "init keepalive ping");
- grpc_timer_init(
- exec_ctx, &t->keepalive_ping_timer,
- gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), t->keepalive_time),
- &t->init_keepalive_ping_locked, gpr_now(GPR_CLOCK_MONOTONIC));
+ grpc_timer_init(exec_ctx, &t->keepalive_ping_timer,
+ grpc_exec_ctx_now(exec_ctx) + t->keepalive_time,
+ &t->init_keepalive_ping_locked);
}
} else if (error == GRPC_ERROR_CANCELLED) {
/* The keepalive ping timer may be cancelled by bdp */
GRPC_CHTTP2_REF_TRANSPORT(t, "init keepalive ping");
- grpc_timer_init(
- exec_ctx, &t->keepalive_ping_timer,
- gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), t->keepalive_time),
- &t->init_keepalive_ping_locked, gpr_now(GPR_CLOCK_MONOTONIC));
+ grpc_timer_init(exec_ctx, &t->keepalive_ping_timer,
+ grpc_exec_ctx_now(exec_ctx) + t->keepalive_time,
+ &t->init_keepalive_ping_locked);
}
GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "init keepalive ping");
}
@@ -2724,10 +2676,9 @@ static void start_keepalive_ping_locked(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error *error) {
grpc_chttp2_transport *t = (grpc_chttp2_transport *)arg;
GRPC_CHTTP2_REF_TRANSPORT(t, "keepalive watchdog");
- grpc_timer_init(
- exec_ctx, &t->keepalive_watchdog_timer,
- gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), t->keepalive_timeout),
- &t->keepalive_watchdog_fired_locked, gpr_now(GPR_CLOCK_MONOTONIC));
+ grpc_timer_init(exec_ctx, &t->keepalive_watchdog_timer,
+ grpc_exec_ctx_now(exec_ctx) + t->keepalive_time,
+ &t->keepalive_watchdog_fired_locked);
}
static void finish_keepalive_ping_locked(grpc_exec_ctx *exec_ctx, void *arg,
@@ -2738,10 +2689,9 @@ static void finish_keepalive_ping_locked(grpc_exec_ctx *exec_ctx, void *arg,
t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_WAITING;
grpc_timer_cancel(exec_ctx, &t->keepalive_watchdog_timer);
GRPC_CHTTP2_REF_TRANSPORT(t, "init keepalive ping");
- grpc_timer_init(
- exec_ctx, &t->keepalive_ping_timer,
- gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), t->keepalive_time),
- &t->init_keepalive_ping_locked, gpr_now(GPR_CLOCK_MONOTONIC));
+ grpc_timer_init(exec_ctx, &t->keepalive_ping_timer,
+ grpc_exec_ctx_now(exec_ctx) + t->keepalive_time,
+ &t->init_keepalive_ping_locked);
}
}
GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "keepalive ping end");
@@ -2841,9 +2791,9 @@ static void incoming_byte_stream_next_locked(grpc_exec_ctx *exec_ctx,
bs->next_action.max_size_hint,
cur_length);
grpc_chttp2_act_on_flowctl_action(
- exec_ctx,
- grpc_chttp2_flowctl_get_action(&t->flow_control, &s->flow_control), t,
- s);
+ exec_ctx, grpc_chttp2_flowctl_get_action(exec_ctx, &t->flow_control,
+ &s->flow_control),
+ t, s);
}
GPR_ASSERT(s->unprocessed_incoming_frames_buffer.length == 0);
if (s->frame_storage.length > 0) {
@@ -3191,8 +3141,6 @@ const char *grpc_chttp2_initiate_write_reason_string(
return "TRANSPORT_FLOW_CONTROL";
case GRPC_CHTTP2_INITIATE_WRITE_SEND_SETTINGS:
return "SEND_SETTINGS";
- case GRPC_CHTTP2_INITIATE_WRITE_BDP_ESTIMATOR_PING:
- return "BDP_ESTIMATOR_PING";
case GRPC_CHTTP2_INITIATE_WRITE_FLOW_CONTROL_UNSTALLED_BY_SETTING:
return "FLOW_CONTROL_UNSTALLED_BY_SETTING";
case GRPC_CHTTP2_INITIATE_WRITE_FLOW_CONTROL_UNSTALLED_BY_UPDATE:
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.h b/src/core/ext/transport/chttp2/transport/chttp2_transport.h
index 55fb1a8343..321fca4c82 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.h
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.h
@@ -23,6 +23,10 @@
#include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/transport/transport.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern grpc_tracer_flag grpc_http_trace;
extern grpc_tracer_flag grpc_flowctl_trace;
extern grpc_tracer_flag grpc_trace_http2_stream_state;
@@ -41,4 +45,8 @@ void grpc_chttp2_transport_start_reading(grpc_exec_ctx *exec_ctx,
grpc_transport *transport,
grpc_slice_buffer *read_buffer);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H */
diff --git a/src/core/ext/transport/chttp2/transport/flow_control.c b/src/core/ext/transport/chttp2/transport/flow_control.cc
index 569a6349d3..639e51da70 100644
--- a/src/core/ext/transport/chttp2/transport/flow_control.c
+++ b/src/core/ext/transport/chttp2/transport/flow_control.cc
@@ -18,6 +18,7 @@
#include "src/core/ext/transport/chttp2/transport/internal.h"
+#include <inttypes.h>
#include <limits.h>
#include <math.h>
#include <string.h>
@@ -86,7 +87,7 @@ static char* fmt_uint32_diff_str(uint32_t old_val, uint32_t new_val) {
static void posttrace(shadow_flow_control* shadow_fc,
grpc_chttp2_transport_flowctl* tfc,
- grpc_chttp2_stream_flowctl* sfc, char* reason) {
+ grpc_chttp2_stream_flowctl* sfc, const char* reason) {
uint32_t acked_local_window =
tfc->t->settings[GRPC_SENT_SETTINGS]
[GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE];
@@ -128,7 +129,7 @@ static void posttrace(shadow_flow_control* shadow_fc,
gpr_free(saw_str);
}
-static char* urgency_to_string(grpc_chttp2_flowctl_urgency urgency) {
+static const char* urgency_to_string(grpc_chttp2_flowctl_urgency urgency) {
switch (urgency) {
case GRPC_CHTTP2_FLOWCTL_NO_ACTION_NEEDED:
return "no action";
@@ -175,11 +176,9 @@ static void trace_action(grpc_chttp2_transport_flowctl* tfc,
/* How many bytes of incoming flow control would we like to advertise */
static uint32_t grpc_chttp2_target_announced_window(
const grpc_chttp2_transport_flowctl* tfc) {
- return (uint32_t)GPR_MIN(
- (int64_t)((1u << 31) - 1),
- tfc->announced_stream_total_over_incoming_window +
- tfc->t->settings[GRPC_SENT_SETTINGS]
- [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]);
+ return (uint32_t)GPR_MIN((int64_t)((1u << 31) - 1),
+ tfc->announced_stream_total_over_incoming_window +
+ tfc->target_initial_window_size);
}
// we have sent data on the wire, we must track this in our bookkeeping for the
@@ -281,13 +280,14 @@ grpc_error* grpc_chttp2_flowctl_recv_data(grpc_chttp2_transport_flowctl* tfc,
// Returns a non zero announce integer if we should send a transport window
// update
uint32_t grpc_chttp2_flowctl_maybe_send_transport_update(
- grpc_chttp2_transport_flowctl* tfc) {
+ grpc_chttp2_transport_flowctl* tfc, bool writing_anyway) {
PRETRACE(tfc, NULL);
uint32_t target_announced_window = grpc_chttp2_target_announced_window(tfc);
uint32_t threshold_to_send_transport_window_update =
tfc->t->outbuf.count > 0 ? 3 * target_announced_window / 4
: target_announced_window / 2;
- if (tfc->announced_window <= threshold_to_send_transport_window_update &&
+ if ((writing_anyway ||
+ tfc->announced_window <= threshold_to_send_transport_window_update) &&
tfc->announced_window != target_announced_window) {
uint32_t announce = (uint32_t)GPR_CLAMP(
target_announced_window - tfc->announced_window, 0, UINT32_MAX);
@@ -392,15 +392,26 @@ static grpc_chttp2_flowctl_urgency delta_is_significant(
// Takes in a target and uses the pid controller to return a stabilized
// guess at the new bdp.
-static double get_pid_controller_guess(grpc_chttp2_transport_flowctl* tfc,
+static double get_pid_controller_guess(grpc_exec_ctx* exec_ctx,
+ grpc_chttp2_transport_flowctl* tfc,
double target) {
- double bdp_error = target - grpc_pid_controller_last(&tfc->pid_controller);
- gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
- gpr_timespec dt_timespec = gpr_time_sub(now, tfc->last_pid_update);
- double dt = (double)dt_timespec.tv_sec + dt_timespec.tv_nsec * 1e-9;
- if (dt > 0.1) {
- dt = 0.1;
+ grpc_millis now = grpc_exec_ctx_now(exec_ctx);
+ if (!tfc->pid_controller_initialized) {
+ tfc->last_pid_update = now;
+ tfc->pid_controller_initialized = true;
+ grpc_pid_controller_init(
+ &tfc->pid_controller,
+ (grpc_pid_controller_args){.gain_p = 4,
+ .gain_i = 8,
+ .gain_d = 0,
+ .initial_control_value = target,
+ .min_control_value = -1,
+ .max_control_value = 25,
+ .integral_range = 10});
+ return pow(2, target);
}
+ double bdp_error = target - grpc_pid_controller_last(&tfc->pid_controller);
+ double dt = (double)(now - tfc->last_pid_update) * 1e-3;
double log2_bdp_guess =
grpc_pid_controller_update(&tfc->pid_controller, bdp_error, dt);
tfc->last_pid_update = now;
@@ -413,20 +424,25 @@ static double get_target_under_memory_pressure(
// do not increase window under heavy memory pressure.
double memory_pressure = grpc_resource_quota_get_memory_pressure(
grpc_resource_user_quota(grpc_endpoint_get_resource_user(tfc->t->ep)));
- if (memory_pressure > 0.8) {
- target *= 1 - GPR_MIN(1, (memory_pressure - 0.8) / 0.1);
+ static const double kLowMemPressure = 0.1;
+ static const double kZeroTarget = 22;
+ static const double kHighMemPressure = 0.8;
+ static const double kMaxMemPressure = 0.9;
+ if (memory_pressure < kLowMemPressure && target < kZeroTarget) {
+ target = (target - kZeroTarget) * memory_pressure / kLowMemPressure +
+ kZeroTarget;
+ } else if (memory_pressure > kHighMemPressure) {
+ target *= 1 - GPR_MIN(1, (memory_pressure - kHighMemPressure) /
+ (kMaxMemPressure - kHighMemPressure));
}
return target;
}
grpc_chttp2_flowctl_action grpc_chttp2_flowctl_get_action(
- grpc_chttp2_transport_flowctl* tfc, grpc_chttp2_stream_flowctl* sfc) {
+ grpc_exec_ctx* exec_ctx, grpc_chttp2_transport_flowctl* tfc,
+ grpc_chttp2_stream_flowctl* sfc) {
grpc_chttp2_flowctl_action action;
memset(&action, 0, sizeof(action));
- uint32_t target_announced_window = grpc_chttp2_target_announced_window(tfc);
- if (tfc->announced_window < target_announced_window / 2) {
- action.send_transport_update = GRPC_CHTTP2_FLOWCTL_UPDATE_IMMEDIATELY;
- }
// TODO(ncteisen): tune this
if (sfc != NULL && !sfc->s->read_closed) {
uint32_t sent_init_window =
@@ -441,20 +457,12 @@ grpc_chttp2_flowctl_action grpc_chttp2_flowctl_get_action(
action.send_stream_update = GRPC_CHTTP2_FLOWCTL_QUEUE_UPDATE;
}
}
- TRACEACTION(tfc, action);
- return action;
-}
-
-grpc_chttp2_flowctl_action grpc_chttp2_flowctl_get_bdp_action(
- grpc_chttp2_transport_flowctl* tfc) {
- grpc_chttp2_flowctl_action action;
- memset(&action, 0, sizeof(action));
if (tfc->enable_bdp_probe) {
- action.need_ping = grpc_bdp_estimator_need_ping(&tfc->bdp_estimator);
+ action.need_ping =
+ grpc_bdp_estimator_need_ping(exec_ctx, &tfc->bdp_estimator);
// get bdp estimate and update initial_window accordingly.
int64_t estimate = -1;
- int32_t bdp = -1;
if (grpc_bdp_estimator_get_estimate(&tfc->bdp_estimator, &estimate)) {
double target = 1 + log2((double)estimate);
@@ -465,17 +473,18 @@ grpc_chttp2_flowctl_action grpc_chttp2_flowctl_get_bdp_action(
// run our target through the pid controller to stabilize change.
// TODO(ncteisen): experiment with other controllers here.
- double bdp_guess = get_pid_controller_guess(tfc, target);
+ double bdp_guess = get_pid_controller_guess(exec_ctx, tfc, target);
// Though initial window 'could' drop to 0, we keep the floor at 128
- bdp = GPR_MAX((int32_t)bdp_guess, 128);
+ tfc->target_initial_window_size =
+ (int32_t)GPR_CLAMP(bdp_guess, 128, INT32_MAX);
grpc_chttp2_flowctl_urgency init_window_update_urgency =
- delta_is_significant(tfc, bdp,
+ delta_is_significant(tfc, tfc->target_initial_window_size,
GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE);
if (init_window_update_urgency != GRPC_CHTTP2_FLOWCTL_NO_ACTION_NEEDED) {
action.send_setting_update = init_window_update_urgency;
- action.initial_window_size = (uint32_t)bdp;
+ action.initial_window_size = (uint32_t)tfc->target_initial_window_size;
}
}
@@ -484,8 +493,9 @@ grpc_chttp2_flowctl_action grpc_chttp2_flowctl_get_bdp_action(
if (grpc_bdp_estimator_get_bw(&tfc->bdp_estimator, &bw_dbl)) {
// we target the max of BDP or bandwidth in microseconds.
int32_t frame_size = (int32_t)GPR_CLAMP(
- GPR_MAX((int32_t)GPR_CLAMP(bw_dbl, 0, INT_MAX) / 1000, bdp), 16384,
- 16777215);
+ GPR_MAX((int32_t)GPR_CLAMP(bw_dbl, 0, INT_MAX) / 1000,
+ tfc->target_initial_window_size),
+ 16384, 16777215);
grpc_chttp2_flowctl_urgency frame_size_urgency = delta_is_significant(
tfc, frame_size, GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE);
if (frame_size_urgency != GRPC_CHTTP2_FLOWCTL_NO_ACTION_NEEDED) {
@@ -496,7 +506,10 @@ grpc_chttp2_flowctl_action grpc_chttp2_flowctl_get_bdp_action(
}
}
}
-
+ uint32_t target_announced_window = grpc_chttp2_target_announced_window(tfc);
+ if (tfc->announced_window < target_announced_window / 2) {
+ action.send_transport_update = GRPC_CHTTP2_FLOWCTL_UPDATE_IMMEDIATELY;
+ }
TRACEACTION(tfc, action);
return action;
}
diff --git a/src/core/ext/transport/chttp2/transport/frame.h b/src/core/ext/transport/chttp2/transport/frame.h
index dba4c004ec..e7debdad79 100644
--- a/src/core/ext/transport/chttp2/transport/frame.h
+++ b/src/core/ext/transport/chttp2/transport/frame.h
@@ -24,6 +24,10 @@
#include "src/core/lib/iomgr/error.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* defined in internal.h */
typedef struct grpc_chttp2_stream grpc_chttp2_stream;
typedef struct grpc_chttp2_transport grpc_chttp2_transport;
@@ -43,4 +47,8 @@ typedef struct grpc_chttp2_transport grpc_chttp2_transport;
#define GRPC_CHTTP2_DATA_FLAG_PADDED 8
#define GRPC_CHTTP2_FLAG_HAS_PRIORITY 0x20
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H */
diff --git a/src/core/ext/transport/chttp2/transport/frame_data.c b/src/core/ext/transport/chttp2/transport/frame_data.cc
index 73aaab1802..73aaab1802 100644
--- a/src/core/ext/transport/chttp2/transport/frame_data.c
+++ b/src/core/ext/transport/chttp2/transport/frame_data.cc
diff --git a/src/core/ext/transport/chttp2/transport/frame_data.h b/src/core/ext/transport/chttp2/transport/frame_data.h
index 3f1c787847..2df99ccf98 100644
--- a/src/core/ext/transport/chttp2/transport/frame_data.h
+++ b/src/core/ext/transport/chttp2/transport/frame_data.h
@@ -28,6 +28,10 @@
#include "src/core/lib/transport/byte_stream.h"
#include "src/core/lib/transport/transport.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum {
GRPC_CHTTP2_DATA_FH_0,
GRPC_CHTTP2_DATA_FH_1,
@@ -80,4 +84,8 @@ grpc_error *grpc_deframe_unprocessed_incoming_frames(
grpc_slice_buffer *slices, grpc_slice *slice_out,
grpc_byte_stream **stream_out);
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_DATA_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_DATA_H */ \ No newline at end of file
diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.c b/src/core/ext/transport/chttp2/transport/frame_goaway.cc
index 78ec08e177..78ec08e177 100644
--- a/src/core/ext/transport/chttp2/transport/frame_goaway.c
+++ b/src/core/ext/transport/chttp2/transport/frame_goaway.cc
diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.h b/src/core/ext/transport/chttp2/transport/frame_goaway.h
index abc48f30c6..ce6f18b35c 100644
--- a/src/core/ext/transport/chttp2/transport/frame_goaway.h
+++ b/src/core/ext/transport/chttp2/transport/frame_goaway.h
@@ -25,6 +25,10 @@
#include "src/core/ext/transport/chttp2/transport/frame.h"
#include "src/core/lib/iomgr/exec_ctx.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum {
GRPC_CHTTP2_GOAWAY_LSI0,
GRPC_CHTTP2_GOAWAY_LSI1,
@@ -60,4 +64,8 @@ void grpc_chttp2_goaway_append(uint32_t last_stream_id, uint32_t error_code,
grpc_slice debug_data,
grpc_slice_buffer *slice_buffer);
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H */ \ No newline at end of file
diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.c b/src/core/ext/transport/chttp2/transport/frame_ping.cc
index d431d6b2df..1cfa883ee1 100644
--- a/src/core/ext/transport/chttp2/transport/frame_ping.c
+++ b/src/core/ext/transport/chttp2/transport/frame_ping.cc
@@ -89,10 +89,10 @@ grpc_error *grpc_chttp2_ping_parser_parse(grpc_exec_ctx *exec_ctx, void *parser,
grpc_chttp2_ack_ping(exec_ctx, t, p->opaque_8bytes);
} else {
if (!t->is_client) {
- gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
- gpr_timespec next_allowed_ping =
- gpr_time_add(t->ping_recv_state.last_ping_recv_time,
- t->ping_policy.min_recv_ping_interval_without_data);
+ grpc_millis now = grpc_exec_ctx_now(exec_ctx);
+ grpc_millis next_allowed_ping =
+ t->ping_recv_state.last_ping_recv_time +
+ t->ping_policy.min_recv_ping_interval_without_data;
if (t->keepalive_permit_without_calls == 0 &&
grpc_chttp2_stream_map_size(&t->stream_map) == 0) {
@@ -100,11 +100,10 @@ grpc_error *grpc_chttp2_ping_parser_parse(grpc_exec_ctx *exec_ctx, void *parser,
no less than two hours. When there is no outstanding streams, we
restrict the number of PINGS equivalent to TCP Keep-Alive. */
next_allowed_ping =
- gpr_time_add(t->ping_recv_state.last_ping_recv_time,
- gpr_time_from_seconds(7200, GPR_TIMESPAN));
+ t->ping_recv_state.last_ping_recv_time + 7200 * GPR_MS_PER_SEC;
}
- if (gpr_time_cmp(next_allowed_ping, now) > 0) {
+ if (next_allowed_ping > now) {
grpc_chttp2_add_ping_strike(exec_ctx, t);
}
diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.h b/src/core/ext/transport/chttp2/transport/frame_ping.h
index 5969ace9bd..91f16f050f 100644
--- a/src/core/ext/transport/chttp2/transport/frame_ping.h
+++ b/src/core/ext/transport/chttp2/transport/frame_ping.h
@@ -23,6 +23,10 @@
#include "src/core/ext/transport/chttp2/transport/frame.h"
#include "src/core/lib/iomgr/exec_ctx.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct {
uint8_t byte;
uint8_t is_ack;
@@ -41,4 +45,8 @@ grpc_error *grpc_chttp2_ping_parser_parse(grpc_exec_ctx *exec_ctx, void *parser,
/* Test-only function for disabling ping ack */
void grpc_set_disable_ping_ack(bool disable_ping_ack);
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H */ \ No newline at end of file
diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c b/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc
index 0133b6efa2..0133b6efa2 100644
--- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c
+++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc
diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h
index d088221b52..bdca064a91 100644
--- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h
+++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h
@@ -24,6 +24,10 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/transport/transport.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct {
uint8_t byte;
uint8_t reason_bytes[4];
@@ -40,4 +44,8 @@ grpc_error *grpc_chttp2_rst_stream_parser_parse(grpc_exec_ctx *exec_ctx,
grpc_chttp2_stream *s,
grpc_slice slice, int is_last);
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H */ \ No newline at end of file
diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.c b/src/core/ext/transport/chttp2/transport/frame_settings.cc
index 2995bf7310..2995bf7310 100644
--- a/src/core/ext/transport/chttp2/transport/frame_settings.c
+++ b/src/core/ext/transport/chttp2/transport/frame_settings.cc
diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.h b/src/core/ext/transport/chttp2/transport/frame_settings.h
index 47479d675d..f0793f0e73 100644
--- a/src/core/ext/transport/chttp2/transport/frame_settings.h
+++ b/src/core/ext/transport/chttp2/transport/frame_settings.h
@@ -25,6 +25,10 @@
#include "src/core/ext/transport/chttp2/transport/http2_settings.h"
#include "src/core/lib/iomgr/exec_ctx.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum {
GRPC_CHTTP2_SPS_ID0,
GRPC_CHTTP2_SPS_ID1,
@@ -58,4 +62,8 @@ grpc_error *grpc_chttp2_settings_parser_parse(grpc_exec_ctx *exec_ctx,
grpc_chttp2_stream *s,
grpc_slice slice, int is_last);
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H */ \ No newline at end of file
diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.c b/src/core/ext/transport/chttp2/transport/frame_window_update.cc
index c9ab8d1b50..c9ab8d1b50 100644
--- a/src/core/ext/transport/chttp2/transport/frame_window_update.c
+++ b/src/core/ext/transport/chttp2/transport/frame_window_update.cc
diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.h b/src/core/ext/transport/chttp2/transport/frame_window_update.h
index 698da4e351..29cf0cc740 100644
--- a/src/core/ext/transport/chttp2/transport/frame_window_update.h
+++ b/src/core/ext/transport/chttp2/transport/frame_window_update.h
@@ -24,6 +24,10 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/transport/transport.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct {
uint8_t byte;
uint8_t is_connection_update;
@@ -39,4 +43,8 @@ grpc_error *grpc_chttp2_window_update_parser_parse(
grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t,
grpc_chttp2_stream *s, grpc_slice slice, int is_last);
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H */ \ No newline at end of file
diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.c b/src/core/ext/transport/chttp2/transport/hpack_encoder.cc
index a404b664e3..17b8c4ab85 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_encoder.c
+++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.cc
@@ -57,7 +57,7 @@ static const grpc_slice terminal_slice = {
{{0, 0}} /* data.refcounted */
};
-extern grpc_tracer_flag grpc_http_trace;
+extern "C" grpc_tracer_flag grpc_http_trace;
typedef struct {
int is_first_frame;
@@ -535,12 +535,12 @@ static void hpack_enc(grpc_exec_ctx *exec_ctx, grpc_chttp2_hpack_compressor *c,
#define TIMEOUT_KEY "grpc-timeout"
static void deadline_enc(grpc_exec_ctx *exec_ctx,
- grpc_chttp2_hpack_compressor *c, gpr_timespec deadline,
+ grpc_chttp2_hpack_compressor *c, grpc_millis deadline,
framer_state *st) {
char timeout_str[GRPC_HTTP2_TIMEOUT_ENCODE_MIN_BUFSIZE];
grpc_mdelem mdelem;
- grpc_http2_encode_timeout(
- gpr_time_sub(deadline, gpr_now(deadline.clock_type)), timeout_str);
+ grpc_http2_encode_timeout(deadline - grpc_exec_ctx_now(exec_ctx),
+ timeout_str);
mdelem = grpc_mdelem_from_slices(exec_ctx, GRPC_MDSTR_GRPC_TIMEOUT,
grpc_slice_from_copied_string(timeout_str));
hpack_enc(exec_ctx, c, mdelem, st);
@@ -660,8 +660,8 @@ void grpc_chttp2_encode_header(grpc_exec_ctx *exec_ctx,
for (grpc_linked_mdelem *l = metadata->list.head; l; l = l->next) {
hpack_enc(exec_ctx, c, l->md, &st);
}
- gpr_timespec deadline = metadata->deadline;
- if (gpr_time_cmp(deadline, gpr_inf_future(deadline.clock_type)) != 0) {
+ grpc_millis deadline = metadata->deadline;
+ if (deadline != GRPC_MILLIS_INF_FUTURE) {
deadline_enc(exec_ctx, c, deadline, &st);
}
diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.h b/src/core/ext/transport/chttp2/transport/hpack_encoder.h
index 271192f894..dc28b5566a 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_encoder.h
+++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.h
@@ -34,6 +34,10 @@
/* maximum table size we'll actually use */
#define GRPC_CHTTP2_HPACKC_MAX_TABLE_SIZE (1024 * 1024)
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct {
uint32_t filter_elems_sum;
uint32_t max_table_size;
@@ -91,4 +95,8 @@ void grpc_chttp2_encode_header(grpc_exec_ctx *exec_ctx,
const grpc_encode_header_options *options,
grpc_slice_buffer *outbuf);
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H */ \ No newline at end of file
diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.cc
index 3d1df19bc3..3d1df19bc3 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_parser.c
+++ b/src/core/ext/transport/chttp2/transport/hpack_parser.cc
diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.h b/src/core/ext/transport/chttp2/transport/hpack_parser.h
index 8fbc6a602b..6c36ebdf8d 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_parser.h
+++ b/src/core/ext/transport/chttp2/transport/hpack_parser.h
@@ -27,6 +27,10 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/transport/metadata.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_chttp2_hpack_parser grpc_chttp2_hpack_parser;
typedef grpc_error *(*grpc_chttp2_hpack_parser_state)(
@@ -111,4 +115,8 @@ grpc_error *grpc_chttp2_header_parser_parse(grpc_exec_ctx *exec_ctx,
grpc_chttp2_stream *s,
grpc_slice slice, int is_last);
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSER_H */ \ No newline at end of file
diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.c b/src/core/ext/transport/chttp2/transport/hpack_table.cc
index bbd135a318..82c284b36e 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_table.c
+++ b/src/core/ext/transport/chttp2/transport/hpack_table.cc
@@ -28,7 +28,7 @@
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/support/murmur_hash.h"
-extern grpc_tracer_flag grpc_http_trace;
+extern "C" grpc_tracer_flag grpc_http_trace;
static struct {
const char *key;
diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.h b/src/core/ext/transport/chttp2/transport/hpack_table.h
index 2cf8f68506..a3ce2730a8 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_table.h
+++ b/src/core/ext/transport/chttp2/transport/hpack_table.h
@@ -24,6 +24,10 @@
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/transport/metadata.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* HPACK header table */
/* last index in the static table */
@@ -94,4 +98,8 @@ typedef struct {
grpc_chttp2_hptbl_find_result grpc_chttp2_hptbl_find(
const grpc_chttp2_hptbl *tbl, grpc_mdelem md);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_TABLE_H */
diff --git a/src/core/ext/transport/chttp2/transport/http2_settings.c b/src/core/ext/transport/chttp2/transport/http2_settings.cc
index 46b7c0c49c..46b7c0c49c 100644
--- a/src/core/ext/transport/chttp2/transport/http2_settings.c
+++ b/src/core/ext/transport/chttp2/transport/http2_settings.cc
diff --git a/src/core/ext/transport/chttp2/transport/http2_settings.h b/src/core/ext/transport/chttp2/transport/http2_settings.h
index 706dfc3139..01e80b8d01 100644
--- a/src/core/ext/transport/chttp2/transport/http2_settings.h
+++ b/src/core/ext/transport/chttp2/transport/http2_settings.h
@@ -35,6 +35,10 @@ typedef enum {
} grpc_chttp2_setting_id;
#define GRPC_CHTTP2_NUM_SETTINGS 7
+
+#ifdef __cplusplus
+extern "C" {
+#endif
extern const uint16_t grpc_setting_id_to_wire_id[];
bool grpc_wire_id_to_setting_id(uint32_t wire_id, grpc_chttp2_setting_id *out);
@@ -56,4 +60,8 @@ typedef struct {
extern const grpc_chttp2_setting_parameters
grpc_chttp2_settings_parameters[GRPC_CHTTP2_NUM_SETTINGS];
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HTTP2_SETTINGS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HTTP2_SETTINGS_H */ \ No newline at end of file
diff --git a/src/core/ext/transport/chttp2/transport/huffsyms.c b/src/core/ext/transport/chttp2/transport/huffsyms.cc
index f28d8cc30a..f28d8cc30a 100644
--- a/src/core/ext/transport/chttp2/transport/huffsyms.c
+++ b/src/core/ext/transport/chttp2/transport/huffsyms.cc
diff --git a/src/core/ext/transport/chttp2/transport/huffsyms.h b/src/core/ext/transport/chttp2/transport/huffsyms.h
index 2e2a5dacae..4002706bc0 100644
--- a/src/core/ext/transport/chttp2/transport/huffsyms.h
+++ b/src/core/ext/transport/chttp2/transport/huffsyms.h
@@ -19,6 +19,10 @@
#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HUFFSYMS_H
#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HUFFSYMS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* HPACK static huffman table */
#define GRPC_CHTTP2_NUM_HUFFSYMS 257
@@ -30,4 +34,8 @@ typedef struct {
extern const grpc_chttp2_huffsym grpc_chttp2_huffsyms[GRPC_CHTTP2_NUM_HUFFSYMS];
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HUFFSYMS_H */
diff --git a/src/core/ext/transport/chttp2/transport/incoming_metadata.c b/src/core/ext/transport/chttp2/transport/incoming_metadata.cc
index ba680a89db..187ce0ea87 100644
--- a/src/core/ext/transport/chttp2/transport/incoming_metadata.c
+++ b/src/core/ext/transport/chttp2/transport/incoming_metadata.cc
@@ -29,7 +29,7 @@ void grpc_chttp2_incoming_metadata_buffer_init(
grpc_chttp2_incoming_metadata_buffer *buffer, gpr_arena *arena) {
buffer->arena = arena;
grpc_metadata_batch_init(&buffer->batch);
- buffer->batch.deadline = gpr_inf_future(GPR_CLOCK_REALTIME);
+ buffer->batch.deadline = GRPC_MILLIS_INF_FUTURE;
}
void grpc_chttp2_incoming_metadata_buffer_destroy(
@@ -62,7 +62,7 @@ grpc_error *grpc_chttp2_incoming_metadata_buffer_replace_or_add(
}
void grpc_chttp2_incoming_metadata_buffer_set_deadline(
- grpc_chttp2_incoming_metadata_buffer *buffer, gpr_timespec deadline) {
+ grpc_chttp2_incoming_metadata_buffer *buffer, grpc_millis deadline) {
buffer->batch.deadline = deadline;
}
diff --git a/src/core/ext/transport/chttp2/transport/incoming_metadata.h b/src/core/ext/transport/chttp2/transport/incoming_metadata.h
index a951d8764c..995e8001b1 100644
--- a/src/core/ext/transport/chttp2/transport/incoming_metadata.h
+++ b/src/core/ext/transport/chttp2/transport/incoming_metadata.h
@@ -21,6 +21,10 @@
#include "src/core/lib/transport/transport.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct {
gpr_arena *arena;
grpc_metadata_batch batch;
@@ -43,6 +47,10 @@ grpc_error *grpc_chttp2_incoming_metadata_buffer_replace_or_add(
grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_metadata_buffer *buffer,
grpc_mdelem elem) GRPC_MUST_USE_RESULT;
void grpc_chttp2_incoming_metadata_buffer_set_deadline(
- grpc_chttp2_incoming_metadata_buffer *buffer, gpr_timespec deadline);
+ grpc_chttp2_incoming_metadata_buffer *buffer, grpc_millis deadline);
+
+#ifdef __cplusplus
+}
+#endif
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INCOMING_METADATA_H */
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INCOMING_METADATA_H */ \ No newline at end of file
diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h
index 49022155aa..b51854fcf8 100644
--- a/src/core/ext/transport/chttp2/transport/internal.h
+++ b/src/core/ext/transport/chttp2/transport/internal.h
@@ -42,6 +42,10 @@
#include "src/core/lib/transport/pid_controller.h"
#include "src/core/lib/transport/transport_impl.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* streams are kept in various linked lists depending on what things need to
happen to them... this enum labels each list */
typedef enum {
@@ -62,12 +66,6 @@ typedef enum {
} grpc_chttp2_write_state;
typedef enum {
- GRPC_CHTTP2_PING_ON_NEXT_WRITE = 0,
- GRPC_CHTTP2_PING_BEFORE_TRANSPORT_WINDOW_UPDATE,
- GRPC_CHTTP2_PING_TYPE_COUNT /* must be last */
-} grpc_chttp2_ping_type;
-
-typedef enum {
GRPC_CHTTP2_OPTIMIZE_FOR_LATENCY,
GRPC_CHTTP2_OPTIMIZE_FOR_THROUGHPUT,
} grpc_chttp2_optimization_target;
@@ -93,7 +91,6 @@ typedef enum {
GRPC_CHTTP2_INITIATE_WRITE_STREAM_FLOW_CONTROL,
GRPC_CHTTP2_INITIATE_WRITE_TRANSPORT_FLOW_CONTROL,
GRPC_CHTTP2_INITIATE_WRITE_SEND_SETTINGS,
- GRPC_CHTTP2_INITIATE_WRITE_BDP_ESTIMATOR_PING,
GRPC_CHTTP2_INITIATE_WRITE_FLOW_CONTROL_UNSTALLED_BY_SETTING,
GRPC_CHTTP2_INITIATE_WRITE_FLOW_CONTROL_UNSTALLED_BY_UPDATE,
GRPC_CHTTP2_INITIATE_WRITE_APPLICATION_PING,
@@ -114,19 +111,19 @@ typedef struct {
typedef struct {
int max_pings_without_data;
int max_ping_strikes;
- gpr_timespec min_sent_ping_interval_without_data;
- gpr_timespec min_recv_ping_interval_without_data;
+ grpc_millis min_sent_ping_interval_without_data;
+ grpc_millis min_recv_ping_interval_without_data;
} grpc_chttp2_repeated_ping_policy;
typedef struct {
- gpr_timespec last_ping_sent_time;
+ grpc_millis last_ping_sent_time;
int pings_before_data_required;
grpc_timer delayed_ping_timer;
bool is_delayed_ping_timer_set;
} grpc_chttp2_repeated_ping_state;
typedef struct {
- gpr_timespec last_ping_recv_time;
+ grpc_millis last_ping_recv_time;
int ping_strikes;
} grpc_chttp2_server_ping_recv_state;
@@ -265,6 +262,8 @@ typedef struct {
* to send WINDOW_UPDATE frames. */
int64_t announced_window;
+ int32_t target_initial_window_size;
+
/** should we probe bdp? */
bool enable_bdp_probe;
@@ -272,8 +271,9 @@ typedef struct {
grpc_bdp_estimator bdp_estimator;
/* pid controller */
+ bool pid_controller_initialized;
grpc_pid_controller pid_controller;
- gpr_timespec last_pid_update;
+ grpc_millis last_pid_update;
// pointer back to transport for tracing
const grpc_chttp2_transport *t;
@@ -370,7 +370,7 @@ struct grpc_chttp2_transport {
uint32_t last_new_stream_id;
/** ping queues for various ping insertion points */
- grpc_chttp2_ping_queue ping_queues[GRPC_CHTTP2_PING_TYPE_COUNT];
+ grpc_chttp2_ping_queue ping_queue;
grpc_chttp2_repeated_ping_policy ping_policy;
grpc_chttp2_repeated_ping_state ping_state;
uint64_t ping_ctr; /* unique id for pings */
@@ -455,9 +455,9 @@ struct grpc_chttp2_transport {
/** watchdog to kill the transport when waiting for the keepalive ping */
grpc_timer keepalive_watchdog_timer;
/** time duration in between pings */
- gpr_timespec keepalive_time;
+ grpc_millis keepalive_time;
/** grace period for a ping to complete before watchdog kicks in */
- gpr_timespec keepalive_timeout;
+ grpc_millis keepalive_timeout;
/** if keepalive pings are allowed when there's no outstanding streams */
bool keepalive_permit_without_calls;
/** keep-alive state machine state */
@@ -566,7 +566,7 @@ struct grpc_chttp2_stream {
grpc_error *byte_stream_error; /* protected by t combiner */
bool received_last_frame; /* protected by t combiner */
- gpr_timespec deadline;
+ grpc_millis deadline;
/** saw some stream level error */
grpc_error *forced_close_error;
@@ -707,7 +707,7 @@ grpc_error *grpc_chttp2_flowctl_recv_data(grpc_chttp2_transport_flowctl *tfc,
// returns an announce if we should send a transport update to our peer,
// else returns zero
uint32_t grpc_chttp2_flowctl_maybe_send_transport_update(
- grpc_chttp2_transport_flowctl *tfc);
+ grpc_chttp2_transport_flowctl *tfc, bool writing_anyway);
// returns an announce if we should send a stream update to our peer, else
// returns zero
@@ -754,10 +754,8 @@ typedef struct {
// Reads the flow control data and returns and actionable struct that will tell
// chttp2 exactly what it needs to do
grpc_chttp2_flowctl_action grpc_chttp2_flowctl_get_action(
- grpc_chttp2_transport_flowctl *tfc, grpc_chttp2_stream_flowctl *sfc);
-
-grpc_chttp2_flowctl_action grpc_chttp2_flowctl_get_bdp_action(
- grpc_chttp2_transport_flowctl *tfc);
+ grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_flowctl *tfc,
+ grpc_chttp2_stream_flowctl *sfc);
// Takes in a flow control action and performs all the needed operations.
void grpc_chttp2_act_on_flowctl_action(grpc_exec_ctx *exec_ctx,
@@ -908,4 +906,8 @@ void grpc_chttp2_fail_pending_writes(grpc_exec_ctx *exec_ctx,
void grpc_chttp2_config_default_keepalive_args(grpc_channel_args *args,
bool is_client);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INTERNAL_H */
diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.cc
index 3db1ad4123..78886b497a 100644
--- a/src/core/ext/transport/chttp2/transport/parsing.c
+++ b/src/core/ext/transport/chttp2/transport/parsing.cc
@@ -359,8 +359,9 @@ static grpc_error *init_data_frame_parser(grpc_exec_ctx *exec_ctx,
s == NULL ? NULL : &s->flow_control,
t->incoming_frame_size);
grpc_chttp2_act_on_flowctl_action(
- exec_ctx, grpc_chttp2_flowctl_get_action(
- &t->flow_control, s == NULL ? NULL : &s->flow_control),
+ exec_ctx,
+ grpc_chttp2_flowctl_get_action(exec_ctx, &t->flow_control,
+ s == NULL ? NULL : &s->flow_control),
t, s);
if (err != GRPC_ERROR_NONE) {
goto error_handler;
@@ -385,7 +386,7 @@ error_handler:
t->parser_data = &s->data_parser;
t->ping_state.pings_before_data_required =
t->ping_policy.max_pings_without_data;
- t->ping_state.last_ping_sent_time = gpr_inf_past(GPR_CLOCK_MONOTONIC);
+ t->ping_state.last_ping_sent_time = GRPC_MILLIS_INF_PAST;
return GRPC_ERROR_NONE;
} else if (grpc_error_get_int(err, GRPC_ERROR_INT_STREAM_ID, NULL)) {
/* handle stream errors by closing the stream */
@@ -430,26 +431,27 @@ static void on_initial_header(grpc_exec_ctx *exec_ctx, void *tp,
}
if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_GRPC_TIMEOUT)) {
- gpr_timespec *cached_timeout =
- (gpr_timespec *)grpc_mdelem_get_user_data(md, free_timeout);
- gpr_timespec timeout;
+ grpc_millis *cached_timeout =
+ static_cast<grpc_millis *>(grpc_mdelem_get_user_data(md, free_timeout));
+ grpc_millis timeout;
if (cached_timeout == NULL) {
/* not already parsed: parse it now, and store the result away */
- cached_timeout = (gpr_timespec *)gpr_malloc(sizeof(gpr_timespec));
+ cached_timeout = (grpc_millis *)gpr_malloc(sizeof(grpc_millis));
if (!grpc_http2_decode_timeout(GRPC_MDVALUE(md), cached_timeout)) {
char *val = grpc_slice_to_c_string(GRPC_MDVALUE(md));
gpr_log(GPR_ERROR, "Ignoring bad timeout value '%s'", val);
gpr_free(val);
- *cached_timeout = gpr_inf_future(GPR_TIMESPAN);
+ *cached_timeout = GRPC_MILLIS_INF_FUTURE;
}
timeout = *cached_timeout;
grpc_mdelem_set_user_data(md, free_timeout, cached_timeout);
} else {
timeout = *cached_timeout;
}
- grpc_chttp2_incoming_metadata_buffer_set_deadline(
- &s->metadata_buffer[0],
- gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), timeout));
+ if (timeout != GRPC_MILLIS_INF_FUTURE) {
+ grpc_chttp2_incoming_metadata_buffer_set_deadline(
+ &s->metadata_buffer[0], grpc_exec_ctx_now(exec_ctx) + timeout);
+ }
GRPC_MDELEM_UNREF(exec_ctx, md);
} else {
const size_t new_size = s->metadata_buffer[0].size + GRPC_MDELEM_LENGTH(md);
@@ -564,7 +566,7 @@ static grpc_error *init_header_frame_parser(grpc_exec_ctx *exec_ctx,
t->ping_state.pings_before_data_required =
t->ping_policy.max_pings_without_data;
- t->ping_state.last_ping_sent_time = gpr_inf_past(GPR_CLOCK_MONOTONIC);
+ t->ping_state.last_ping_sent_time = GRPC_MILLIS_INF_PAST;
/* could be a new grpc_chttp2_stream or an existing grpc_chttp2_stream */
s = grpc_chttp2_parsing_lookup_stream(t, t->incoming_stream_id);
diff --git a/src/core/ext/transport/chttp2/transport/stream_lists.c b/src/core/ext/transport/chttp2/transport/stream_lists.cc
index 47cd22d177..9f731a397f 100644
--- a/src/core/ext/transport/chttp2/transport/stream_lists.c
+++ b/src/core/ext/transport/chttp2/transport/stream_lists.cc
@@ -16,11 +16,12 @@
*
*/
+#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/ext/transport/chttp2/transport/internal.h"
#include <grpc/support/log.h>
-static char *stream_list_id_string(grpc_chttp2_stream_list_id id) {
+static const char *stream_list_id_string(grpc_chttp2_stream_list_id id) {
switch (id) {
case GRPC_CHTTP2_LIST_WRITABLE:
return "writable";
diff --git a/src/core/ext/transport/chttp2/transport/stream_map.c b/src/core/ext/transport/chttp2/transport/stream_map.cc
index d6079a9a33..d6079a9a33 100644
--- a/src/core/ext/transport/chttp2/transport/stream_map.c
+++ b/src/core/ext/transport/chttp2/transport/stream_map.cc
diff --git a/src/core/ext/transport/chttp2/transport/stream_map.h b/src/core/ext/transport/chttp2/transport/stream_map.h
index 30c50ba32e..364d37c33a 100644
--- a/src/core/ext/transport/chttp2/transport/stream_map.h
+++ b/src/core/ext/transport/chttp2/transport/stream_map.h
@@ -23,6 +23,10 @@
#include <stddef.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Data structure to map a uint32_t to a data object (represented by a void*)
Represented as a sorted array of keys, and a corresponding array of values.
@@ -65,4 +69,8 @@ void grpc_chttp2_stream_map_for_each(grpc_chttp2_stream_map *map,
void *value),
void *user_data);
-#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_STREAM_MAP_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_STREAM_MAP_H */ \ No newline at end of file
diff --git a/src/core/ext/transport/chttp2/transport/varint.c b/src/core/ext/transport/chttp2/transport/varint.cc
index 0d94ddcbc3..0d94ddcbc3 100644
--- a/src/core/ext/transport/chttp2/transport/varint.c
+++ b/src/core/ext/transport/chttp2/transport/varint.cc
diff --git a/src/core/ext/transport/chttp2/transport/varint.h b/src/core/ext/transport/chttp2/transport/varint.h
index 5a2b670f06..d3a9d902c4 100644
--- a/src/core/ext/transport/chttp2/transport/varint.h
+++ b/src/core/ext/transport/chttp2/transport/varint.h
@@ -21,6 +21,10 @@
#include <grpc/support/port_platform.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Helpers for hpack varint encoding */
/* length of a value that needs varint tail encoding (it's bigger than can be
@@ -57,4 +61,8 @@ void grpc_chttp2_hpack_write_varint_tail(uint32_t tail_value, uint8_t* target,
} \
} while (0)
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_VARINT_H */
diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.cc
index be1af16019..4134890f3f 100644
--- a/src/core/ext/transport/chttp2/transport/writing.c
+++ b/src/core/ext/transport/chttp2/transport/writing.cc
@@ -42,18 +42,9 @@ static void finish_write_cb(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
t->write_cb_pool = cb;
}
-static void collapse_pings_from_into(grpc_chttp2_transport *t,
- grpc_chttp2_ping_type ping_type,
- grpc_chttp2_ping_queue *pq) {
- for (size_t i = 0; i < GRPC_CHTTP2_PCL_COUNT; i++) {
- grpc_closure_list_move(&t->ping_queues[ping_type].lists[i], &pq->lists[i]);
- }
-}
-
static void maybe_initiate_ping(grpc_exec_ctx *exec_ctx,
- grpc_chttp2_transport *t,
- grpc_chttp2_ping_type ping_type) {
- grpc_chttp2_ping_queue *pq = &t->ping_queues[ping_type];
+ grpc_chttp2_transport *t) {
+ grpc_chttp2_ping_queue *pq = &t->ping_queue;
if (grpc_closure_list_empty(pq->lists[GRPC_CHTTP2_PCL_NEXT])) {
/* no ping needed: wait */
return;
@@ -62,7 +53,8 @@ static void maybe_initiate_ping(grpc_exec_ctx *exec_ctx,
/* ping already in-flight: wait */
if (GRPC_TRACER_ON(grpc_http_trace) ||
GRPC_TRACER_ON(grpc_bdp_estimator_trace)) {
- gpr_log(GPR_DEBUG, "Ping delayed [%p]: already pinging", t->peer_string);
+ gpr_log(GPR_DEBUG, "%s: Ping delayed [%p]: already pinging",
+ t->is_client ? "CLIENT" : "SERVER", t->peer_string);
}
return;
}
@@ -71,51 +63,38 @@ static void maybe_initiate_ping(grpc_exec_ctx *exec_ctx,
/* need to receive something of substance before sending a ping again */
if (GRPC_TRACER_ON(grpc_http_trace) ||
GRPC_TRACER_ON(grpc_bdp_estimator_trace)) {
- gpr_log(GPR_DEBUG, "Ping delayed [%p]: too many recent pings: %d/%d",
- t->peer_string, t->ping_state.pings_before_data_required,
+ gpr_log(GPR_DEBUG, "%s: Ping delayed [%p]: too many recent pings: %d/%d",
+ t->is_client ? "CLIENT" : "SERVER", t->peer_string,
+ t->ping_state.pings_before_data_required,
t->ping_policy.max_pings_without_data);
}
return;
}
- gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
- gpr_timespec next_allowed_ping =
- gpr_time_add(t->ping_state.last_ping_sent_time,
- t->ping_policy.min_sent_ping_interval_without_data);
+ grpc_millis now = grpc_exec_ctx_now(exec_ctx);
+ grpc_millis next_allowed_ping =
+ t->ping_state.last_ping_sent_time +
+ t->ping_policy.min_sent_ping_interval_without_data;
if (t->keepalive_permit_without_calls == 0 &&
grpc_chttp2_stream_map_size(&t->stream_map) == 0) {
- next_allowed_ping = gpr_time_add(t->ping_recv_state.last_ping_recv_time,
- gpr_time_from_seconds(7200, GPR_TIMESPAN));
+ next_allowed_ping =
+ t->ping_recv_state.last_ping_recv_time + 7200 * GPR_MS_PER_SEC;
}
- /* gpr_log(GPR_DEBUG, "next_allowed_ping:%d.%09d now:%d.%09d",
- (int)next_allowed_ping.tv_sec, (int)next_allowed_ping.tv_nsec,
- (int)now.tv_sec, (int)now.tv_nsec); */
- if (gpr_time_cmp(next_allowed_ping, now) > 0) {
+ if (next_allowed_ping > now) {
/* not enough elapsed time between successive pings */
if (GRPC_TRACER_ON(grpc_http_trace) ||
GRPC_TRACER_ON(grpc_bdp_estimator_trace)) {
gpr_log(GPR_DEBUG,
- "Ping delayed [%p]: not enough time elapsed since last ping",
- t->peer_string);
+ "%s: Ping delayed [%p]: not enough time elapsed since last ping",
+ t->is_client ? "CLIENT" : "SERVER", t->peer_string);
}
if (!t->ping_state.is_delayed_ping_timer_set) {
t->ping_state.is_delayed_ping_timer_set = true;
grpc_timer_init(exec_ctx, &t->ping_state.delayed_ping_timer,
- next_allowed_ping, &t->retry_initiate_ping_locked,
- gpr_now(GPR_CLOCK_MONOTONIC));
+ next_allowed_ping, &t->retry_initiate_ping_locked);
}
return;
}
- /* coalesce equivalent pings into this one */
- switch (ping_type) {
- case GRPC_CHTTP2_PING_BEFORE_TRANSPORT_WINDOW_UPDATE:
- collapse_pings_from_into(t, GRPC_CHTTP2_PING_ON_NEXT_WRITE, pq);
- break;
- case GRPC_CHTTP2_PING_ON_NEXT_WRITE:
- break;
- case GRPC_CHTTP2_PING_TYPE_COUNT:
- GPR_UNREACHABLE_CODE(break);
- }
- pq->inflight_id = t->ping_ctr * GRPC_CHTTP2_PING_TYPE_COUNT + ping_type;
+ pq->inflight_id = t->ping_ctr;
t->ping_ctr++;
GRPC_CLOSURE_LIST_SCHED(exec_ctx, &pq->lists[GRPC_CHTTP2_PCL_INITIATE]);
grpc_closure_list_move(&pq->lists[GRPC_CHTTP2_PCL_NEXT],
@@ -126,7 +105,8 @@ static void maybe_initiate_ping(grpc_exec_ctx *exec_ctx,
t->ping_state.last_ping_sent_time = now;
if (GRPC_TRACER_ON(grpc_http_trace) ||
GRPC_TRACER_ON(grpc_bdp_estimator_trace)) {
- gpr_log(GPR_DEBUG, "Ping sent [%p]: %d/%d", t->peer_string,
+ gpr_log(GPR_DEBUG, "%s: Ping sent [%p]: %d/%d",
+ t->is_client ? "CLIENT" : "SERVER", t->peer_string,
t->ping_state.pings_before_data_required,
t->ping_policy.max_pings_without_data);
}
@@ -156,6 +136,25 @@ static bool update_list(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
return sched_any;
}
+static void report_stall(grpc_chttp2_transport *t, grpc_chttp2_stream *s,
+ const char *staller) {
+ gpr_log(
+ GPR_DEBUG,
+ "%s:%p stream %d stalled by %s [fc:pending=%" PRIdPTR ":flowed=%" PRId64
+ ":peer_initwin=%d:t_win=%" PRId64 ":s_win=%d:s_delta=%" PRId64 "]",
+ t->peer_string, t, s->id, staller, s->flow_controlled_buffer.length,
+ s->flow_controlled_bytes_flowed,
+ t->settings[GRPC_ACKED_SETTINGS]
+ [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE],
+ t->flow_control.remote_window,
+ (uint32_t)GPR_MAX(
+ 0,
+ s->flow_control.remote_window_delta +
+ (int64_t)t->settings[GRPC_PEER_SETTINGS]
+ [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]),
+ s->flow_control.remote_window_delta);
+}
+
static bool stream_ref_if_not_destroyed(gpr_refcount *r) {
gpr_atm count;
do {
@@ -202,6 +201,12 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write(
GRPC_STATS_INC_HTTP2_SETTINGS_WRITES(exec_ctx);
}
+ for (size_t i = 0; i < t->ping_ack_count; i++) {
+ grpc_slice_buffer_add(&t->outbuf,
+ grpc_chttp2_ping_create(1, t->ping_acks[i]));
+ }
+ t->ping_ack_count = 0;
+
/* simple writes are queued to qbuf, and flushed here */
grpc_slice_buffer_move_into(&t->qbuf, &t->outbuf);
GPR_ASSERT(t->qbuf.count == 0);
@@ -257,21 +262,20 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write(
s->send_trailing_metadata == NULL ||
!is_default_initial_metadata(s->send_initial_metadata)) {
grpc_encode_header_options hopt = {
- .stream_id = s->id,
- .is_eof = false,
- .use_true_binary_metadata =
- t->settings
- [GRPC_PEER_SETTINGS]
- [GRPC_CHTTP2_SETTINGS_GRPC_ALLOW_TRUE_BINARY_METADATA] != 0,
- .max_frame_size = t->settings[GRPC_PEER_SETTINGS]
- [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE],
- .stats = &s->stats.outgoing};
+ s->id, // stream_id
+ false, // is_eof
+ t->settings[GRPC_PEER_SETTINGS]
+ [GRPC_CHTTP2_SETTINGS_GRPC_ALLOW_TRUE_BINARY_METADATA] !=
+ 0, // use_true_binary_metadata
+ t->settings[GRPC_PEER_SETTINGS]
+ [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE], // max_frame_size
+ &s->stats.outgoing // stats
+ };
grpc_chttp2_encode_header(exec_ctx, &t->hpack_compressor, NULL, 0,
s->send_initial_metadata, &hopt, &t->outbuf);
now_writing = true;
if (!t->is_client) {
- t->ping_recv_state.last_ping_recv_time =
- gpr_inf_past(GPR_CLOCK_MONOTONIC);
+ t->ping_recv_state.last_ping_recv_time = GRPC_MILLIS_INF_PAST;
t->ping_recv_state.ping_strikes = 0;
}
initial_metadata_writes++;
@@ -300,6 +304,7 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write(
exec_ctx, t, s, &s->send_initial_metadata_finished, GRPC_ERROR_NONE,
"send_initial_metadata_finished");
}
+
/* send any window updates */
uint32_t stream_announce = grpc_chttp2_flowctl_maybe_send_stream_update(
&t->flow_control, &s->flow_control);
@@ -308,8 +313,7 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write(
&t->outbuf, grpc_chttp2_window_update_create(s->id, stream_announce,
&s->stats.outgoing));
if (!t->is_client) {
- t->ping_recv_state.last_ping_recv_time =
- gpr_inf_past(GPR_CLOCK_MONOTONIC);
+ t->ping_recv_state.last_ping_recv_time = GRPC_MILLIS_INF_PAST;
t->ping_recv_state.ping_strikes = 0;
}
flow_control_writes++;
@@ -386,8 +390,7 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write(
}
}
if (!t->is_client) {
- t->ping_recv_state.last_ping_recv_time =
- gpr_inf_past(GPR_CLOCK_MONOTONIC);
+ t->ping_recv_state.last_ping_recv_time = 0;
t->ping_recv_state.ping_strikes = 0;
}
if (is_last_frame) {
@@ -414,9 +417,11 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write(
}
message_writes++;
} else if (t->flow_control.remote_window == 0) {
+ report_stall(t, s, "transport");
grpc_chttp2_list_add_stalled_by_transport(t, s);
now_writing = true;
} else if (stream_remote_window == 0) {
+ report_stall(t, s, "stream");
grpc_chttp2_list_add_stalled_by_stream(t, s);
now_writing = true;
}
@@ -431,17 +436,16 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write(
&s->stats.outgoing, &t->outbuf);
} else {
grpc_encode_header_options hopt = {
- .stream_id = s->id,
- .is_eof = true,
- .use_true_binary_metadata =
- t->settings
+ s->id, true,
+
+ t->settings
[GRPC_PEER_SETTINGS]
[GRPC_CHTTP2_SETTINGS_GRPC_ALLOW_TRUE_BINARY_METADATA] !=
0,
- .max_frame_size =
- t->settings[GRPC_PEER_SETTINGS]
- [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE],
- .stats = &s->stats.outgoing};
+
+ t->settings[GRPC_PEER_SETTINGS]
+ [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE],
+ &s->stats.outgoing};
grpc_chttp2_encode_header(exec_ctx, &t->hpack_compressor,
extra_headers_for_trailing_metadata,
num_extra_headers_for_trailing_metadata,
@@ -451,6 +455,10 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write(
}
s->send_trailing_metadata = NULL;
s->sent_trailing_metadata = true;
+ if (!t->is_client) {
+ t->ping_recv_state.last_ping_recv_time = GRPC_MILLIS_INF_PAST;
+ t->ping_recv_state.ping_strikes = 0;
+ }
if (!t->is_client && !s->read_closed) {
grpc_slice_buffer_add(
&t->outbuf, grpc_chttp2_rst_stream_create(
@@ -484,30 +492,21 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write(
}
}
- uint32_t transport_announce =
- grpc_chttp2_flowctl_maybe_send_transport_update(&t->flow_control);
+ maybe_initiate_ping(exec_ctx, t);
+
+ uint32_t transport_announce = grpc_chttp2_flowctl_maybe_send_transport_update(
+ &t->flow_control, t->outbuf.count > 0);
if (transport_announce) {
- maybe_initiate_ping(exec_ctx, t,
- GRPC_CHTTP2_PING_BEFORE_TRANSPORT_WINDOW_UPDATE);
grpc_transport_one_way_stats throwaway_stats;
grpc_slice_buffer_add(
&t->outbuf, grpc_chttp2_window_update_create(0, transport_announce,
&throwaway_stats));
if (!t->is_client) {
- t->ping_recv_state.last_ping_recv_time =
- gpr_inf_past(GPR_CLOCK_MONOTONIC);
+ t->ping_recv_state.last_ping_recv_time = GRPC_MILLIS_INF_PAST;
t->ping_recv_state.ping_strikes = 0;
}
}
- for (size_t i = 0; i < t->ping_ack_count; i++) {
- grpc_slice_buffer_add(&t->outbuf,
- grpc_chttp2_ping_create(1, t->ping_acks[i]));
- }
- t->ping_ack_count = 0;
-
- maybe_initiate_ping(exec_ctx, t, GRPC_CHTTP2_PING_ON_NEXT_WRITE);
-
GPR_TIMER_END("grpc_chttp2_begin_write", 0);
result.writing = t->outbuf.count > 0;
diff --git a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc
index 83365192e3..b280487ca3 100644
--- a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c
+++ b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc
@@ -21,6 +21,8 @@
#include <stdio.h>
#include <string.h>
+#include <grpc/grpc_cronet.h>
+
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
diff --git a/src/core/ext/transport/cronet/transport/cronet_api_dummy.c b/src/core/ext/transport/cronet/transport/cronet_api_dummy.cc
index 4f248ad919..4f248ad919 100644
--- a/src/core/ext/transport/cronet/transport/cronet_api_dummy.c
+++ b/src/core/ext/transport/cronet/transport/cronet_api_dummy.cc
diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.cc
index 587a3b83b5..ff1367fb28 100644
--- a/src/core/ext/transport/cronet/transport/cronet_transport.c
+++ b/src/core/ext/transport/cronet/transport/cronet_transport.cc
@@ -27,6 +27,7 @@
#include <grpc/support/useful.h>
#include "src/core/ext/transport/chttp2/transport/incoming_metadata.h"
+#include "src/core/ext/transport/cronet/transport/cronet_transport.h"
#include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_internal.h"
@@ -288,7 +289,7 @@ static void maybe_flush_read(stream_obj *s) {
CRONET_LOG(GPR_DEBUG, "%p: Flush read", s);
s->state.flush_read = true;
null_and_maybe_free_read_buffer(s);
- s->state.rs.read_buffer = gpr_malloc(GRPC_FLUSH_READ_SIZE);
+ s->state.rs.read_buffer = (char *)gpr_malloc(GRPC_FLUSH_READ_SIZE);
if (!s->state.pending_read_from_cronet) {
CRONET_LOG(GPR_DEBUG, "bidirectional_stream_read(%p)", s->cbs);
bidirectional_stream_read(s->cbs, s->state.rs.read_buffer,
@@ -313,7 +314,8 @@ static void add_to_storage(struct stream_obj *s,
struct op_storage *storage = &s->storage;
/* add new op at the beginning of the linked list. The memory is freed
in remove_from_storage */
- struct op_and_state *new_op = gpr_malloc(sizeof(struct op_and_state));
+ struct op_and_state *new_op =
+ (struct op_and_state *)gpr_malloc(sizeof(struct op_and_state));
memcpy(&new_op->op, op, sizeof(grpc_transport_stream_op_batch));
memset(&new_op->state, 0, sizeof(new_op->state));
new_op->s = s;
@@ -685,7 +687,7 @@ static void create_grpc_frame(grpc_exec_ctx *exec_ctx,
size_t length = GRPC_SLICE_LENGTH(slice);
*p_write_buffer_size = length + GRPC_HEADER_SIZE_IN_BYTES;
/* This is freed in the on_write_completed callback */
- char *write_buffer = gpr_malloc(length + GRPC_HEADER_SIZE_IN_BYTES);
+ char *write_buffer = (char *)gpr_malloc(length + GRPC_HEADER_SIZE_IN_BYTES);
*pp_write_buffer = write_buffer;
uint8_t *p = (uint8_t *)write_buffer;
/* Append 5 byte header */
@@ -1182,7 +1184,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx,
stream_state->rs.length_field);
if (stream_state->rs.length_field > 0) {
stream_state->rs.read_buffer =
- gpr_malloc((size_t)stream_state->rs.length_field);
+ (char *)gpr_malloc((size_t)stream_state->rs.length_field);
GPR_ASSERT(stream_state->rs.read_buffer);
stream_state->rs.remaining_bytes = stream_state->rs.length_field;
stream_state->rs.received_bytes = 0;
@@ -1452,13 +1454,14 @@ static const grpc_transport_vtable grpc_cronet_vtable = {
grpc_transport *grpc_create_cronet_transport(void *engine, const char *target,
const grpc_channel_args *args,
void *reserved) {
- grpc_cronet_transport *ct = gpr_malloc(sizeof(grpc_cronet_transport));
+ grpc_cronet_transport *ct =
+ (grpc_cronet_transport *)gpr_malloc(sizeof(grpc_cronet_transport));
if (!ct) {
goto error;
}
ct->base.vtable = &grpc_cronet_vtable;
- ct->engine = engine;
- ct->host = gpr_malloc(strlen(target) + 1);
+ ct->engine = (stream_engine *)engine;
+ ct->host = (char *)gpr_malloc(strlen(target) + 1);
if (!ct->host) {
goto error;
}
diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.h b/src/core/ext/transport/cronet/transport/cronet_transport.h
index 3bd4249b79..43ff391f79 100644
--- a/src/core/ext/transport/cronet/transport/cronet_transport.h
+++ b/src/core/ext/transport/cronet/transport/cronet_transport.h
@@ -21,8 +21,16 @@
#include "src/core/lib/transport/transport.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
grpc_transport *grpc_create_cronet_transport(void *engine, const char *target,
const grpc_channel_args *args,
void *reserved);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_EXT_TRANSPORT_CRONET_TRANSPORT_CRONET_TRANSPORT_H */
diff --git a/src/core/ext/transport/inproc/inproc_plugin.c b/src/core/ext/transport/inproc/inproc_plugin.cc
index 6a796a0b19..5d8a1c74ab 100644
--- a/src/core/ext/transport/inproc/inproc_plugin.c
+++ b/src/core/ext/transport/inproc/inproc_plugin.cc
@@ -21,9 +21,11 @@
grpc_tracer_flag grpc_inproc_trace = GRPC_TRACER_INITIALIZER(false, "inproc");
-void grpc_inproc_plugin_init(void) {
+extern "C" void grpc_inproc_plugin_init(void) {
grpc_register_tracer(&grpc_inproc_trace);
grpc_inproc_transport_init();
}
-void grpc_inproc_plugin_shutdown(void) { grpc_inproc_transport_shutdown(); }
+extern "C" void grpc_inproc_plugin_shutdown(void) {
+ grpc_inproc_transport_shutdown();
+}
diff --git a/src/core/ext/transport/inproc/inproc_transport.c b/src/core/ext/transport/inproc/inproc_transport.cc
index 31739d07dd..1001d74c22 100644
--- a/src/core/ext/transport/inproc/inproc_transport.c
+++ b/src/core/ext/transport/inproc/inproc_transport.cc
@@ -150,7 +150,7 @@ typedef struct inproc_stream {
grpc_metadata_batch write_buffer_initial_md;
bool write_buffer_initial_md_filled;
uint32_t write_buffer_initial_md_flags;
- gpr_timespec write_buffer_deadline;
+ grpc_millis write_buffer_deadline;
slice_buffer_list write_buffer_message;
grpc_metadata_batch write_buffer_trailing_md;
bool write_buffer_trailing_md_filled;
@@ -180,7 +180,7 @@ typedef struct inproc_stream {
grpc_error *cancel_self_error;
grpc_error *cancel_other_error;
- gpr_timespec deadline;
+ grpc_millis deadline;
bool listed;
struct inproc_stream *stream_list_prev;
@@ -377,8 +377,8 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt,
s->cancel_self_error = GRPC_ERROR_NONE;
s->cancel_other_error = GRPC_ERROR_NONE;
s->write_buffer_cancel_error = GRPC_ERROR_NONE;
- s->deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
- s->write_buffer_deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
+ s->deadline = GRPC_MILLIS_INF_FUTURE;
+ s->write_buffer_deadline = GRPC_MILLIS_INF_FUTURE;
s->stream_list_prev = NULL;
gpr_mu_lock(&t->mu->mu);
@@ -421,7 +421,7 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt,
cs->write_buffer_initial_md_flags,
&s->to_read_initial_md, &s->to_read_initial_md_flags,
&s->to_read_initial_md_filled);
- s->deadline = gpr_time_min(s->deadline, cs->write_buffer_deadline);
+ s->deadline = GPR_MIN(s->deadline, cs->write_buffer_deadline);
grpc_metadata_batch_clear(exec_ctx, &cs->write_buffer_initial_md);
cs->write_buffer_initial_md_filled = false;
}
@@ -956,10 +956,10 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt,
dest, destflags, destfilled);
}
if (s->t->is_client) {
- gpr_timespec *dl =
+ grpc_millis *dl =
(other == NULL) ? &s->write_buffer_deadline : &other->deadline;
- *dl = gpr_time_min(*dl, op->payload->send_initial_metadata
- .send_initial_metadata->deadline);
+ *dl = GPR_MIN(*dl, op->payload->send_initial_metadata
+ .send_initial_metadata->deadline);
s->initial_md_sent = true;
}
}
diff --git a/src/core/lib/support/backoff.c b/src/core/lib/backoff/backoff.cc
index 6dc0df473b..fe0a751817 100644
--- a/src/core/lib/support/backoff.c
+++ b/src/core/lib/backoff/backoff.cc
@@ -16,13 +16,14 @@
*
*/
-#include "src/core/lib/support/backoff.h"
+#include "src/core/lib/backoff/backoff.h"
#include <grpc/support/useful.h>
-void gpr_backoff_init(gpr_backoff *backoff, int64_t initial_connect_timeout,
- double multiplier, double jitter,
- int64_t min_timeout_millis, int64_t max_timeout_millis) {
+void grpc_backoff_init(grpc_backoff *backoff,
+ grpc_millis initial_connect_timeout, double multiplier,
+ double jitter, grpc_millis min_timeout_millis,
+ grpc_millis max_timeout_millis) {
backoff->initial_connect_timeout = initial_connect_timeout;
backoff->multiplier = multiplier;
backoff->jitter = jitter;
@@ -31,11 +32,11 @@ void gpr_backoff_init(gpr_backoff *backoff, int64_t initial_connect_timeout,
backoff->rng_state = (uint32_t)gpr_now(GPR_CLOCK_REALTIME).tv_nsec;
}
-gpr_timespec gpr_backoff_begin(gpr_backoff *backoff, gpr_timespec now) {
+grpc_millis grpc_backoff_begin(grpc_exec_ctx *exec_ctx, grpc_backoff *backoff) {
backoff->current_timeout_millis = backoff->initial_connect_timeout;
- const int64_t first_timeout =
+ const grpc_millis first_timeout =
GPR_MAX(backoff->current_timeout_millis, backoff->min_timeout_millis);
- return gpr_time_add(now, gpr_time_from_millis(first_timeout, GPR_TIMESPAN));
+ return grpc_exec_ctx_now(exec_ctx) + first_timeout;
}
/* Generate a random number between 0 and 1. */
@@ -44,11 +45,11 @@ static double generate_uniform_random_number(uint32_t *rng_state) {
return *rng_state / (double)((uint32_t)1 << 31);
}
-gpr_timespec gpr_backoff_step(gpr_backoff *backoff, gpr_timespec now) {
+grpc_millis grpc_backoff_step(grpc_exec_ctx *exec_ctx, grpc_backoff *backoff) {
const double new_timeout_millis =
backoff->multiplier * (double)backoff->current_timeout_millis;
backoff->current_timeout_millis =
- GPR_MIN((int64_t)new_timeout_millis, backoff->max_timeout_millis);
+ GPR_MIN((grpc_millis)new_timeout_millis, backoff->max_timeout_millis);
const double jitter_range_width = backoff->jitter * new_timeout_millis;
const double jitter =
@@ -56,17 +57,17 @@ gpr_timespec gpr_backoff_step(gpr_backoff *backoff, gpr_timespec now) {
jitter_range_width;
backoff->current_timeout_millis =
- (int64_t)((double)(backoff->current_timeout_millis) + jitter);
+ (grpc_millis)((double)(backoff->current_timeout_millis) + jitter);
- const gpr_timespec current_deadline = gpr_time_add(
- now, gpr_time_from_millis(backoff->current_timeout_millis, GPR_TIMESPAN));
+ const grpc_millis current_deadline =
+ grpc_exec_ctx_now(exec_ctx) + backoff->current_timeout_millis;
- const gpr_timespec min_deadline = gpr_time_add(
- now, gpr_time_from_millis(backoff->min_timeout_millis, GPR_TIMESPAN));
+ const grpc_millis min_deadline =
+ grpc_exec_ctx_now(exec_ctx) + backoff->min_timeout_millis;
- return gpr_time_max(current_deadline, min_deadline);
+ return GPR_MAX(current_deadline, min_deadline);
}
-void gpr_backoff_reset(gpr_backoff *backoff) {
+void grpc_backoff_reset(grpc_backoff *backoff) {
backoff->current_timeout_millis = backoff->initial_connect_timeout;
}
diff --git a/src/core/lib/support/backoff.h b/src/core/lib/backoff/backoff.h
index 6e0cc3a4b6..80e49ea52a 100644
--- a/src/core/lib/support/backoff.h
+++ b/src/core/lib/backoff/backoff.h
@@ -16,41 +16,51 @@
*
*/
-#ifndef GRPC_CORE_LIB_SUPPORT_BACKOFF_H
-#define GRPC_CORE_LIB_SUPPORT_BACKOFF_H
+#ifndef GRPC_CORE_LIB_BACKOFF_BACKOFF_H
+#define GRPC_CORE_LIB_BACKOFF_BACKOFF_H
-#include <grpc/support/time.h>
+#include "src/core/lib/iomgr/exec_ctx.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
typedef struct {
/// const: how long to wait after the first failure before retrying
- int64_t initial_connect_timeout;
+ grpc_millis initial_connect_timeout;
/// const: factor with which to multiply backoff after a failed retry
double multiplier;
/// const: amount to randomize backoffs
double jitter;
/// const: minimum time between retries in milliseconds
- int64_t min_timeout_millis;
+ grpc_millis min_timeout_millis;
/// const: maximum time between retries in milliseconds
- int64_t max_timeout_millis;
+ grpc_millis max_timeout_millis;
/// random number generator
uint32_t rng_state;
/// current retry timeout in milliseconds
- int64_t current_timeout_millis;
-} gpr_backoff;
+ grpc_millis current_timeout_millis;
+} grpc_backoff;
/// Initialize backoff machinery - does not need to be destroyed
-void gpr_backoff_init(gpr_backoff *backoff, int64_t initial_connect_timeout,
- double multiplier, double jitter,
- int64_t min_timeout_millis, int64_t max_timeout_millis);
+void grpc_backoff_init(grpc_backoff *backoff,
+ grpc_millis initial_connect_timeout, double multiplier,
+ double jitter, grpc_millis min_timeout_millis,
+ grpc_millis max_timeout_millis);
/// Begin retry loop: returns a timespec for the NEXT retry
-gpr_timespec gpr_backoff_begin(gpr_backoff *backoff, gpr_timespec now);
+grpc_millis grpc_backoff_begin(grpc_exec_ctx *exec_ctx, grpc_backoff *backoff);
/// Step a retry loop: returns a timespec for the NEXT retry
-gpr_timespec gpr_backoff_step(gpr_backoff *backoff, gpr_timespec now);
-/// Reset the backoff, so the next gpr_backoff_step will be a gpr_backoff_begin
+grpc_millis grpc_backoff_step(grpc_exec_ctx *exec_ctx, grpc_backoff *backoff);
+/// Reset the backoff, so the next grpc_backoff_step will be a
+/// grpc_backoff_begin
/// instead
-void gpr_backoff_reset(gpr_backoff *backoff);
+void grpc_backoff_reset(grpc_backoff *backoff);
+
+#ifdef __cplusplus
+}
+#endif
-#endif /* GRPC_CORE_LIB_SUPPORT_BACKOFF_H */
+#endif /* GRPC_CORE_LIB_BACKOFF_BACKOFF_H */
diff --git a/src/core/lib/channel/channel_args.c b/src/core/lib/channel/channel_args.cc
index 69980586aa..69980586aa 100644
--- a/src/core/lib/channel/channel_args.c
+++ b/src/core/lib/channel/channel_args.cc
diff --git a/src/core/lib/channel/channel_args.h b/src/core/lib/channel/channel_args.h
index f649a8d9ec..c6a4b00a42 100644
--- a/src/core/lib/channel/channel_args.h
+++ b/src/core/lib/channel/channel_args.h
@@ -23,6 +23,10 @@
#include <grpc/grpc.h>
#include "src/core/lib/iomgr/socket_mutator.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// Channel args are intentionally immutable, to avoid the need for locking.
/** Copy the arguments in \a src into a new instance */
@@ -118,4 +122,8 @@ grpc_arg grpc_channel_arg_integer_create(char *name, int value);
grpc_arg grpc_channel_arg_pointer_create(char *name, void *value,
const grpc_arg_pointer_vtable *vtable);
-#endif /* GRPC_CORE_LIB_CHANNEL_CHANNEL_ARGS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_CHANNEL_CHANNEL_ARGS_H */ \ No newline at end of file
diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.cc
index 775c8bc667..775c8bc667 100644
--- a/src/core/lib/channel/channel_stack.c
+++ b/src/core/lib/channel/channel_stack.cc
diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h
index f0de80f0c0..5c00c09889 100644
--- a/src/core/lib/channel/channel_stack.h
+++ b/src/core/lib/channel/channel_stack.h
@@ -70,7 +70,7 @@ typedef struct {
grpc_call_context_element *context;
grpc_slice path;
gpr_timespec start_time;
- gpr_timespec deadline;
+ grpc_millis deadline;
gpr_arena *arena;
grpc_call_combiner *call_combiner;
} grpc_call_element_args;
diff --git a/src/core/lib/channel/channel_stack_builder.c b/src/core/lib/channel/channel_stack_builder.cc
index b663ebfb52..b663ebfb52 100644
--- a/src/core/lib/channel/channel_stack_builder.c
+++ b/src/core/lib/channel/channel_stack_builder.cc
diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.cc
index 4f37908958..4f37908958 100644
--- a/src/core/lib/channel/connected_channel.c
+++ b/src/core/lib/channel/connected_channel.cc
diff --git a/src/core/lib/channel/connected_channel.h b/src/core/lib/channel/connected_channel.h
index 10c98cce54..b55a1089a0 100644
--- a/src/core/lib/channel/connected_channel.h
+++ b/src/core/lib/channel/connected_channel.h
@@ -21,6 +21,10 @@
#include "src/core/lib/channel/channel_stack_builder.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern const grpc_channel_filter grpc_connected_filter;
bool grpc_add_connected_filter(grpc_exec_ctx *exec_ctx,
@@ -30,4 +34,8 @@ bool grpc_add_connected_filter(grpc_exec_ctx *exec_ctx,
/* Debug helper to dig the transport stream out of a call element */
grpc_stream *grpc_connected_channel_get_stream(grpc_call_element *elem);
-#endif /* GRPC_CORE_LIB_CHANNEL_CONNECTED_CHANNEL_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_CHANNEL_CONNECTED_CHANNEL_H */ \ No newline at end of file
diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.cc
index 1753da5721..b27ee37e5b 100644
--- a/src/core/lib/channel/handshaker.c
+++ b/src/core/lib/channel/handshaker.cc
@@ -232,7 +232,7 @@ static void on_timeout(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) {
void grpc_handshake_manager_do_handshake(
grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr,
grpc_endpoint* endpoint, const grpc_channel_args* channel_args,
- gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor,
+ grpc_millis deadline, grpc_tcp_server_acceptor* acceptor,
grpc_iomgr_cb_func on_handshake_done, void* user_data) {
gpr_mu_lock(&mgr->mu);
GPR_ASSERT(mgr->index == 0);
@@ -255,9 +255,7 @@ void grpc_handshake_manager_do_handshake(
gpr_ref(&mgr->refs);
GRPC_CLOSURE_INIT(&mgr->on_timeout, on_timeout, mgr,
grpc_schedule_on_exec_ctx);
- grpc_timer_init(exec_ctx, &mgr->deadline_timer,
- gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC),
- &mgr->on_timeout, gpr_now(GPR_CLOCK_MONOTONIC));
+ grpc_timer_init(exec_ctx, &mgr->deadline_timer, deadline, &mgr->on_timeout);
// Start first handshaker, which also owns a ref.
gpr_ref(&mgr->refs);
bool done = call_next_handshaker_locked(exec_ctx, mgr, GRPC_ERROR_NONE);
diff --git a/src/core/lib/channel/handshaker.h b/src/core/lib/channel/handshaker.h
index eb9a59bd08..51ee56af43 100644
--- a/src/core/lib/channel/handshaker.h
+++ b/src/core/lib/channel/handshaker.h
@@ -26,6 +26,10 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/tcp_server.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/// Handshakers are used to perform initial handshakes on a connection
/// before the client sends the initial request. Some examples of what
/// a handshaker can be used for includes support for HTTP CONNECT on
@@ -145,7 +149,7 @@ void grpc_handshake_manager_shutdown(grpc_exec_ctx* exec_ctx,
void grpc_handshake_manager_do_handshake(
grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr,
grpc_endpoint* endpoint, const grpc_channel_args* channel_args,
- gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor,
+ grpc_millis deadline, grpc_tcp_server_acceptor* acceptor,
grpc_iomgr_cb_func on_handshake_done, void* user_data);
/// Add \a mgr to the server side list of all pending handshake managers, the
@@ -164,4 +168,8 @@ void grpc_handshake_manager_pending_list_remove(grpc_handshake_manager** head,
void grpc_handshake_manager_pending_list_shutdown_all(
grpc_exec_ctx* exec_ctx, grpc_handshake_manager* head, grpc_error* why);
-#endif /* GRPC_CORE_LIB_CHANNEL_HANDSHAKER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_CHANNEL_HANDSHAKER_H */ \ No newline at end of file
diff --git a/src/core/lib/channel/handshaker_factory.c b/src/core/lib/channel/handshaker_factory.cc
index 4deb280c60..4deb280c60 100644
--- a/src/core/lib/channel/handshaker_factory.c
+++ b/src/core/lib/channel/handshaker_factory.cc
diff --git a/src/core/lib/channel/handshaker_factory.h b/src/core/lib/channel/handshaker_factory.h
index 6238e735dc..2a130de252 100644
--- a/src/core/lib/channel/handshaker_factory.h
+++ b/src/core/lib/channel/handshaker_factory.h
@@ -24,6 +24,10 @@
#include "src/core/lib/channel/handshaker.h"
#include "src/core/lib/iomgr/exec_ctx.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// A handshaker factory is used to create handshakers.
typedef struct grpc_handshaker_factory grpc_handshaker_factory;
@@ -48,4 +52,8 @@ void grpc_handshaker_factory_add_handshakers(
void grpc_handshaker_factory_destroy(
grpc_exec_ctx *exec_ctx, grpc_handshaker_factory *handshaker_factory);
-#endif /* GRPC_CORE_LIB_CHANNEL_HANDSHAKER_FACTORY_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_CHANNEL_HANDSHAKER_FACTORY_H */ \ No newline at end of file
diff --git a/src/core/lib/channel/handshaker_registry.c b/src/core/lib/channel/handshaker_registry.cc
index c6bc87d704..c6bc87d704 100644
--- a/src/core/lib/channel/handshaker_registry.c
+++ b/src/core/lib/channel/handshaker_registry.cc
diff --git a/src/core/lib/channel/handshaker_registry.h b/src/core/lib/channel/handshaker_registry.h
index a3b2ac1dc7..e96bf06b6a 100644
--- a/src/core/lib/channel/handshaker_registry.h
+++ b/src/core/lib/channel/handshaker_registry.h
@@ -24,6 +24,10 @@
#include "src/core/lib/channel/handshaker_factory.h"
#include "src/core/lib/iomgr/exec_ctx.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum {
HANDSHAKER_CLIENT = 0,
HANDSHAKER_SERVER,
@@ -45,4 +49,8 @@ void grpc_handshakers_add(grpc_exec_ctx* exec_ctx,
const grpc_channel_args* args,
grpc_handshake_manager* handshake_mgr);
-#endif /* GRPC_CORE_LIB_CHANNEL_HANDSHAKER_REGISTRY_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_CHANNEL_HANDSHAKER_REGISTRY_H */ \ No newline at end of file
diff --git a/src/core/lib/compression/algorithm_metadata.h b/src/core/lib/compression/algorithm_metadata.h
index 7db771ea74..23333ac0c4 100644
--- a/src/core/lib/compression/algorithm_metadata.h
+++ b/src/core/lib/compression/algorithm_metadata.h
@@ -23,6 +23,10 @@
#include "src/core/lib/compression/compression_internal.h"
#include "src/core/lib/transport/metadata.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** Return compression algorithm based metadata value */
grpc_slice grpc_compression_algorithm_slice(
grpc_compression_algorithm algorithm);
@@ -56,4 +60,8 @@ grpc_message_compression_algorithm_from_slice(grpc_slice str);
grpc_stream_compression_algorithm grpc_stream_compression_algorithm_from_slice(
grpc_slice str);
-#endif /* GRPC_CORE_LIB_COMPRESSION_ALGORITHM_METADATA_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_COMPRESSION_ALGORITHM_METADATA_H */ \ No newline at end of file
diff --git a/src/core/lib/compression/compression.c b/src/core/lib/compression/compression.cc
index af2391ba10..31349a58cd 100644
--- a/src/core/lib/compression/compression.c
+++ b/src/core/lib/compression/compression.cc
@@ -94,12 +94,12 @@ grpc_compression_algorithm grpc_compression_algorithm_for_level(
grpc_message_compression_algorithm_for_level(
grpc_compression_level_to_message_compression_level(level),
grpc_compression_bitset_to_message_bitset(accepted_encodings)),
- 0));
+ (grpc_stream_compression_algorithm)0));
return algo;
} else if (level <= GRPC_COMPRESS_LEVEL_STREAM_HIGH) {
GPR_ASSERT(
grpc_compression_algorithm_from_message_stream_compression_algorithm(
- &algo, 0,
+ &algo, (grpc_message_compression_algorithm)0,
grpc_stream_compression_algorithm_for_level(
grpc_compression_level_to_stream_compression_level(level),
grpc_compression_bitset_to_stream_bitset(accepted_encodings))));
diff --git a/src/core/lib/compression/compression_internal.c b/src/core/lib/compression/compression_internal.cc
index e31eb830f1..e31eb830f1 100644
--- a/src/core/lib/compression/compression_internal.c
+++ b/src/core/lib/compression/compression_internal.cc
diff --git a/src/core/lib/compression/compression_internal.h b/src/core/lib/compression/compression_internal.h
index dcd49c8c11..aab5324b67 100644
--- a/src/core/lib/compression/compression_internal.h
+++ b/src/core/lib/compression/compression_internal.h
@@ -21,6 +21,10 @@
#include <grpc/impl/codegen/compression_types.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum {
GRPC_MESSAGE_COMPRESS_NONE = 0,
GRPC_MESSAGE_COMPRESS_DEFLATE,
@@ -107,4 +111,8 @@ grpc_stream_compression_algorithm grpc_stream_compression_algorithm_for_level(
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 */
diff --git a/src/core/lib/compression/message_compress.c b/src/core/lib/compression/message_compress.cc
index d174992355..d174992355 100644
--- a/src/core/lib/compression/message_compress.c
+++ b/src/core/lib/compression/message_compress.cc
diff --git a/src/core/lib/compression/message_compress.h b/src/core/lib/compression/message_compress.h
index 2882bf7075..7c2eb99443 100644
--- a/src/core/lib/compression/message_compress.h
+++ b/src/core/lib/compression/message_compress.h
@@ -23,6 +23,10 @@
#include "src/core/lib/compression/compression_internal.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* 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. */
@@ -37,4 +41,8 @@ int grpc_msg_decompress(grpc_exec_ctx* exec_ctx,
grpc_message_compression_algorithm algorithm,
grpc_slice_buffer* input, grpc_slice_buffer* output);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_COMPRESSION_MESSAGE_COMPRESS_H */
diff --git a/src/core/lib/compression/stream_compression.c b/src/core/lib/compression/stream_compression.cc
index 411489f029..7faeb0d34f 100644
--- a/src/core/lib/compression/stream_compression.c
+++ b/src/core/lib/compression/stream_compression.cc
@@ -21,7 +21,7 @@
#include "src/core/lib/compression/stream_compression.h"
#include "src/core/lib/compression/stream_compression_gzip.h"
-extern const grpc_stream_compression_vtable
+extern "C" const grpc_stream_compression_vtable
grpc_stream_compression_identity_vtable;
bool grpc_stream_compress(grpc_stream_compression_context *ctx,
diff --git a/src/core/lib/compression/stream_compression.h b/src/core/lib/compression/stream_compression.h
index 6d073280fa..6ee3ac1966 100644
--- a/src/core/lib/compression/stream_compression.h
+++ b/src/core/lib/compression/stream_compression.h
@@ -26,6 +26,10 @@
#include "src/core/lib/transport/static_metadata.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_stream_compression_vtable grpc_stream_compression_vtable;
/* Stream compression/decompression context */
@@ -111,4 +115,8 @@ void grpc_stream_compression_context_destroy(
int grpc_stream_compression_method_parse(
grpc_slice value, bool is_compress, grpc_stream_compression_method *method);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/src/core/lib/compression/stream_compression_gzip.c b/src/core/lib/compression/stream_compression_gzip.cc
index abcbdb3a91..087b018be5 100644
--- a/src/core/lib/compression/stream_compression_gzip.c
+++ b/src/core/lib/compression/stream_compression_gzip.cc
@@ -222,7 +222,6 @@ static void grpc_stream_compression_context_destroy_gzip(
}
const grpc_stream_compression_vtable grpc_stream_compression_gzip_vtable = {
- .compress = grpc_stream_compress_gzip,
- .decompress = grpc_stream_decompress_gzip,
- .context_create = grpc_stream_compression_context_create_gzip,
- .context_destroy = grpc_stream_compression_context_destroy_gzip};
+ grpc_stream_compress_gzip, grpc_stream_decompress_gzip,
+ grpc_stream_compression_context_create_gzip,
+ grpc_stream_compression_context_destroy_gzip};
diff --git a/src/core/lib/compression/stream_compression_gzip.h b/src/core/lib/compression/stream_compression_gzip.h
index 7cf49a0de9..a3f1b0406f 100644
--- a/src/core/lib/compression/stream_compression_gzip.h
+++ b/src/core/lib/compression/stream_compression_gzip.h
@@ -21,6 +21,14 @@
#include "src/core/lib/compression/stream_compression.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern const grpc_stream_compression_vtable grpc_stream_compression_gzip_vtable;
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/src/core/lib/compression/stream_compression_identity.c b/src/core/lib/compression/stream_compression_identity.cc
index 3dfcf53b85..9b2e6062e1 100644
--- a/src/core/lib/compression/stream_compression_identity.c
+++ b/src/core/lib/compression/stream_compression_identity.cc
@@ -27,7 +27,7 @@
/* Singleton context used for all identity streams. */
static grpc_stream_compression_context identity_ctx = {
- .vtable = &grpc_stream_compression_identity_vtable};
+ &grpc_stream_compression_identity_vtable};
static void grpc_stream_compression_pass_through(grpc_slice_buffer *in,
grpc_slice_buffer *out,
@@ -88,7 +88,6 @@ static void grpc_stream_compression_context_destroy_identity(
}
const grpc_stream_compression_vtable grpc_stream_compression_identity_vtable = {
- .compress = grpc_stream_compress_identity,
- .decompress = grpc_stream_decompress_identity,
- .context_create = grpc_stream_compression_context_create_identity,
- .context_destroy = grpc_stream_compression_context_destroy_identity};
+ grpc_stream_compress_identity, grpc_stream_decompress_identity,
+ grpc_stream_compression_context_create_identity,
+ grpc_stream_compression_context_destroy_identity};
diff --git a/src/core/lib/compression/stream_compression_identity.h b/src/core/lib/compression/stream_compression_identity.h
index 41926e949e..3a729fafad 100644
--- a/src/core/lib/compression/stream_compression_identity.h
+++ b/src/core/lib/compression/stream_compression_identity.h
@@ -21,7 +21,15 @@
#include "src/core/lib/compression/stream_compression.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern const grpc_stream_compression_vtable
grpc_stream_compression_identity_vtable;
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/src/core/lib/debug/stats.c b/src/core/lib/debug/stats.cc
index 4096384dd9..4096384dd9 100644
--- a/src/core/lib/debug/stats.c
+++ b/src/core/lib/debug/stats.cc
diff --git a/src/core/lib/debug/stats.h b/src/core/lib/debug/stats.h
index 09d190d488..fec1d651e6 100644
--- a/src/core/lib/debug/stats.h
+++ b/src/core/lib/debug/stats.h
@@ -23,6 +23,10 @@
#include "src/core/lib/debug/stats_data.h"
#include "src/core/lib/iomgr/exec_ctx.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_stats_data {
gpr_atm counters[GRPC_STATS_COUNTER_COUNT];
gpr_atm histograms[GRPC_STATS_HISTOGRAM_BUCKETS];
@@ -58,4 +62,8 @@ double grpc_stats_histo_percentile(const grpc_stats_data *data,
size_t grpc_stats_histo_count(const grpc_stats_data *data,
grpc_stats_histograms histogram);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/src/core/lib/debug/stats_data.c b/src/core/lib/debug/stats_data.cc
index fb6055f795..5bd7884e28 100644
--- a/src/core/lib/debug/stats_data.c
+++ b/src/core/lib/debug/stats_data.cc
@@ -77,6 +77,7 @@ const char *grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT] = {
"http2_initiate_write_due_to_transport_flow_control_unstalled",
"http2_initiate_write_due_to_ping_response",
"http2_initiate_write_due_to_force_rst_stream",
+ "http2_spurious_writes_begun",
"hpack_recv_indexed",
"hpack_recv_lithdr_incidx",
"hpack_recv_lithdr_incidx_v",
@@ -109,8 +110,6 @@ const char *grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT] = {
"executor_wakeup_initiated",
"executor_queue_drained",
"executor_push_retries",
- "executor_threads_created",
- "executor_threads_used",
"server_requested_calls",
"server_slowpath_requests_queued",
};
@@ -179,6 +178,7 @@ const char *grpc_stats_counter_doc[GRPC_STATS_COUNTER_COUNT] = {
"'transport_flow_control_unstalled'",
"Number of HTTP2 writes initiated due to 'ping_response'",
"Number of HTTP2 writes initiated due to 'force_rst_stream'",
+ "Number of HTTP2 writes initiated with nothing to write",
"Number of HPACK indexed fields received",
"Number of HPACK literal headers received with incremental indexing",
"Number of HPACK literal headers received with incremental indexing and "
@@ -219,8 +219,6 @@ const char *grpc_stats_counter_doc[GRPC_STATS_COUNTER_COUNT] = {
"Number of times an executor queue was drained",
"Number of times we raced and were forced to retry pushing a closure to "
"the executor",
- "Size of the backing thread pool for overflow gRPC Core work",
- "How many executor threads actually got used",
"How many calls were requested (not necessarily received) by the server",
"How many times was the server slow path taken (indicates too few "
"outstanding requests)",
@@ -238,7 +236,6 @@ const char *grpc_stats_histogram_name[GRPC_STATS_HISTOGRAM_COUNT] = {
"http2_send_message_per_write",
"http2_send_trailing_metadata_per_write",
"http2_send_flowctl_per_write",
- "executor_closures_per_wakeup",
"server_cqs_checked",
};
const char *grpc_stats_histogram_doc[GRPC_STATS_HISTOGRAM_COUNT] = {
@@ -254,7 +251,6 @@ const char *grpc_stats_histogram_doc[GRPC_STATS_HISTOGRAM_COUNT] = {
"Number of streams whose payload was written per TCP write",
"Number of streams terminated per TCP write",
"Number of flow control updates written per TCP write",
- "Number of closures executed each time an executor wakes up",
"How many completion queues were checked looking for a CQ that had "
"requested the incoming call",
};
@@ -326,7 +322,6 @@ const uint8_t grpc_stats_table_7[102] = {
const int grpc_stats_table_8[9] = {0, 1, 2, 4, 7, 13, 23, 39, 64};
const uint8_t grpc_stats_table_9[9] = {0, 0, 1, 2, 2, 3, 4, 4, 5};
void grpc_stats_inc_call_initial_size(grpc_exec_ctx *exec_ctx, int value) {
- /* Automatically generated by tools/codegen/core/gen_stats_data.py */
value = GPR_CLAMP(value, 0, 262144);
if (value < 6) {
GRPC_STATS_INC_HISTOGRAM((exec_ctx), GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE,
@@ -352,7 +347,6 @@ void grpc_stats_inc_call_initial_size(grpc_exec_ctx *exec_ctx, int value) {
(exec_ctx), value, grpc_stats_table_0, 64));
}
void grpc_stats_inc_poll_events_returned(grpc_exec_ctx *exec_ctx, int value) {
- /* Automatically generated by tools/codegen/core/gen_stats_data.py */
value = GPR_CLAMP(value, 0, 1024);
if (value < 29) {
GRPC_STATS_INC_HISTOGRAM((exec_ctx),
@@ -379,7 +373,6 @@ void grpc_stats_inc_poll_events_returned(grpc_exec_ctx *exec_ctx, int value) {
(exec_ctx), value, grpc_stats_table_2, 128));
}
void grpc_stats_inc_tcp_write_size(grpc_exec_ctx *exec_ctx, int value) {
- /* Automatically generated by tools/codegen/core/gen_stats_data.py */
value = GPR_CLAMP(value, 0, 16777216);
if (value < 5) {
GRPC_STATS_INC_HISTOGRAM((exec_ctx), GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE,
@@ -405,7 +398,6 @@ void grpc_stats_inc_tcp_write_size(grpc_exec_ctx *exec_ctx, int value) {
(exec_ctx), value, grpc_stats_table_4, 64));
}
void grpc_stats_inc_tcp_write_iov_size(grpc_exec_ctx *exec_ctx, int value) {
- /* Automatically generated by tools/codegen/core/gen_stats_data.py */
value = GPR_CLAMP(value, 0, 1024);
if (value < 13) {
GRPC_STATS_INC_HISTOGRAM((exec_ctx),
@@ -431,7 +423,6 @@ void grpc_stats_inc_tcp_write_iov_size(grpc_exec_ctx *exec_ctx, int value) {
(exec_ctx), value, grpc_stats_table_6, 64));
}
void grpc_stats_inc_tcp_read_size(grpc_exec_ctx *exec_ctx, int value) {
- /* Automatically generated by tools/codegen/core/gen_stats_data.py */
value = GPR_CLAMP(value, 0, 16777216);
if (value < 5) {
GRPC_STATS_INC_HISTOGRAM((exec_ctx), GRPC_STATS_HISTOGRAM_TCP_READ_SIZE,
@@ -457,7 +448,6 @@ void grpc_stats_inc_tcp_read_size(grpc_exec_ctx *exec_ctx, int value) {
(exec_ctx), value, grpc_stats_table_4, 64));
}
void grpc_stats_inc_tcp_read_offer(grpc_exec_ctx *exec_ctx, int value) {
- /* Automatically generated by tools/codegen/core/gen_stats_data.py */
value = GPR_CLAMP(value, 0, 16777216);
if (value < 5) {
GRPC_STATS_INC_HISTOGRAM((exec_ctx), GRPC_STATS_HISTOGRAM_TCP_READ_OFFER,
@@ -484,7 +474,6 @@ void grpc_stats_inc_tcp_read_offer(grpc_exec_ctx *exec_ctx, int value) {
}
void grpc_stats_inc_tcp_read_offer_iov_size(grpc_exec_ctx *exec_ctx,
int value) {
- /* Automatically generated by tools/codegen/core/gen_stats_data.py */
value = GPR_CLAMP(value, 0, 1024);
if (value < 13) {
GRPC_STATS_INC_HISTOGRAM(
@@ -512,7 +501,6 @@ void grpc_stats_inc_tcp_read_offer_iov_size(grpc_exec_ctx *exec_ctx,
}
void grpc_stats_inc_http2_send_message_size(grpc_exec_ctx *exec_ctx,
int value) {
- /* Automatically generated by tools/codegen/core/gen_stats_data.py */
value = GPR_CLAMP(value, 0, 16777216);
if (value < 5) {
GRPC_STATS_INC_HISTOGRAM(
@@ -540,7 +528,6 @@ void grpc_stats_inc_http2_send_message_size(grpc_exec_ctx *exec_ctx,
}
void grpc_stats_inc_http2_send_initial_metadata_per_write(
grpc_exec_ctx *exec_ctx, int value) {
- /* Automatically generated by tools/codegen/core/gen_stats_data.py */
value = GPR_CLAMP(value, 0, 1024);
if (value < 13) {
GRPC_STATS_INC_HISTOGRAM(
@@ -570,7 +557,6 @@ void grpc_stats_inc_http2_send_initial_metadata_per_write(
}
void grpc_stats_inc_http2_send_message_per_write(grpc_exec_ctx *exec_ctx,
int value) {
- /* Automatically generated by tools/codegen/core/gen_stats_data.py */
value = GPR_CLAMP(value, 0, 1024);
if (value < 13) {
GRPC_STATS_INC_HISTOGRAM(
@@ -598,7 +584,6 @@ void grpc_stats_inc_http2_send_message_per_write(grpc_exec_ctx *exec_ctx,
}
void grpc_stats_inc_http2_send_trailing_metadata_per_write(
grpc_exec_ctx *exec_ctx, int value) {
- /* Automatically generated by tools/codegen/core/gen_stats_data.py */
value = GPR_CLAMP(value, 0, 1024);
if (value < 13) {
GRPC_STATS_INC_HISTOGRAM(
@@ -628,7 +613,6 @@ void grpc_stats_inc_http2_send_trailing_metadata_per_write(
}
void grpc_stats_inc_http2_send_flowctl_per_write(grpc_exec_ctx *exec_ctx,
int value) {
- /* Automatically generated by tools/codegen/core/gen_stats_data.py */
value = GPR_CLAMP(value, 0, 1024);
if (value < 13) {
GRPC_STATS_INC_HISTOGRAM(
@@ -654,36 +638,7 @@ void grpc_stats_inc_http2_send_flowctl_per_write(grpc_exec_ctx *exec_ctx,
grpc_stats_histo_find_bucket_slow(
(exec_ctx), value, grpc_stats_table_6, 64));
}
-void grpc_stats_inc_executor_closures_per_wakeup(grpc_exec_ctx *exec_ctx,
- int value) {
- /* Automatically generated by tools/codegen/core/gen_stats_data.py */
- value = GPR_CLAMP(value, 0, 1024);
- if (value < 13) {
- GRPC_STATS_INC_HISTOGRAM(
- (exec_ctx), GRPC_STATS_HISTOGRAM_EXECUTOR_CLOSURES_PER_WAKEUP, value);
- return;
- }
- union {
- double dbl;
- uint64_t uint;
- } _val, _bkt;
- _val.dbl = value;
- if (_val.uint < 4637863191261478912ull) {
- int bucket =
- grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13;
- _bkt.dbl = grpc_stats_table_6[bucket];
- bucket -= (_val.uint < _bkt.uint);
- GRPC_STATS_INC_HISTOGRAM(
- (exec_ctx), GRPC_STATS_HISTOGRAM_EXECUTOR_CLOSURES_PER_WAKEUP, bucket);
- return;
- }
- GRPC_STATS_INC_HISTOGRAM((exec_ctx),
- GRPC_STATS_HISTOGRAM_EXECUTOR_CLOSURES_PER_WAKEUP,
- grpc_stats_histo_find_bucket_slow(
- (exec_ctx), value, grpc_stats_table_6, 64));
-}
void grpc_stats_inc_server_cqs_checked(grpc_exec_ctx *exec_ctx, int value) {
- /* Automatically generated by tools/codegen/core/gen_stats_data.py */
value = GPR_CLAMP(value, 0, 64);
if (value < 3) {
GRPC_STATS_INC_HISTOGRAM((exec_ctx),
@@ -708,17 +663,17 @@ void grpc_stats_inc_server_cqs_checked(grpc_exec_ctx *exec_ctx, int value) {
grpc_stats_histo_find_bucket_slow(
(exec_ctx), value, grpc_stats_table_8, 8));
}
-const int grpc_stats_histo_buckets[14] = {64, 128, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 8};
-const int grpc_stats_histo_start[14] = {0, 64, 192, 256, 320, 384, 448,
- 512, 576, 640, 704, 768, 832, 896};
-const int *const grpc_stats_histo_bucket_boundaries[14] = {
+const int grpc_stats_histo_buckets[13] = {64, 128, 64, 64, 64, 64, 64,
+ 64, 64, 64, 64, 64, 8};
+const int grpc_stats_histo_start[13] = {0, 64, 192, 256, 320, 384, 448,
+ 512, 576, 640, 704, 768, 832};
+const int *const grpc_stats_histo_bucket_boundaries[13] = {
grpc_stats_table_0, grpc_stats_table_2, grpc_stats_table_4,
grpc_stats_table_6, grpc_stats_table_4, grpc_stats_table_4,
grpc_stats_table_6, grpc_stats_table_4, grpc_stats_table_6,
grpc_stats_table_6, grpc_stats_table_6, grpc_stats_table_6,
- grpc_stats_table_6, grpc_stats_table_8};
-void (*const grpc_stats_inc_histogram[14])(grpc_exec_ctx *exec_ctx, int x) = {
+ grpc_stats_table_8};
+void (*const grpc_stats_inc_histogram[13])(grpc_exec_ctx *exec_ctx, int x) = {
grpc_stats_inc_call_initial_size,
grpc_stats_inc_poll_events_returned,
grpc_stats_inc_tcp_write_size,
@@ -731,5 +686,4 @@ void (*const grpc_stats_inc_histogram[14])(grpc_exec_ctx *exec_ctx, int x) = {
grpc_stats_inc_http2_send_message_per_write,
grpc_stats_inc_http2_send_trailing_metadata_per_write,
grpc_stats_inc_http2_send_flowctl_per_write,
- grpc_stats_inc_executor_closures_per_wakeup,
grpc_stats_inc_server_cqs_checked};
diff --git a/src/core/lib/debug/stats_data.h b/src/core/lib/debug/stats_data.h
index 6c0ad30543..d8e4e7d264 100644
--- a/src/core/lib/debug/stats_data.h
+++ b/src/core/lib/debug/stats_data.h
@@ -24,6 +24,10 @@
#include <inttypes.h>
#include "src/core/lib/iomgr/exec_ctx.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum {
GRPC_STATS_COUNTER_CLIENT_CALLS_CREATED,
GRPC_STATS_COUNTER_SERVER_CALLS_CREATED,
@@ -79,6 +83,7 @@ typedef enum {
GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL_UNSTALLED,
GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_PING_RESPONSE,
GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM,
+ GRPC_STATS_COUNTER_HTTP2_SPURIOUS_WRITES_BEGUN,
GRPC_STATS_COUNTER_HPACK_RECV_INDEXED,
GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_INCIDX,
GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_INCIDX_V,
@@ -111,8 +116,6 @@ typedef enum {
GRPC_STATS_COUNTER_EXECUTOR_WAKEUP_INITIATED,
GRPC_STATS_COUNTER_EXECUTOR_QUEUE_DRAINED,
GRPC_STATS_COUNTER_EXECUTOR_PUSH_RETRIES,
- GRPC_STATS_COUNTER_EXECUTOR_THREADS_CREATED,
- GRPC_STATS_COUNTER_EXECUTOR_THREADS_USED,
GRPC_STATS_COUNTER_SERVER_REQUESTED_CALLS,
GRPC_STATS_COUNTER_SERVER_SLOWPATH_REQUESTS_QUEUED,
GRPC_STATS_COUNTER_COUNT
@@ -132,7 +135,6 @@ typedef enum {
GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_PER_WRITE,
GRPC_STATS_HISTOGRAM_HTTP2_SEND_TRAILING_METADATA_PER_WRITE,
GRPC_STATS_HISTOGRAM_HTTP2_SEND_FLOWCTL_PER_WRITE,
- GRPC_STATS_HISTOGRAM_EXECUTOR_CLOSURES_PER_WAKEUP,
GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED,
GRPC_STATS_HISTOGRAM_COUNT
} grpc_stats_histograms;
@@ -163,11 +165,9 @@ typedef enum {
GRPC_STATS_HISTOGRAM_HTTP2_SEND_TRAILING_METADATA_PER_WRITE_BUCKETS = 64,
GRPC_STATS_HISTOGRAM_HTTP2_SEND_FLOWCTL_PER_WRITE_FIRST_SLOT = 768,
GRPC_STATS_HISTOGRAM_HTTP2_SEND_FLOWCTL_PER_WRITE_BUCKETS = 64,
- GRPC_STATS_HISTOGRAM_EXECUTOR_CLOSURES_PER_WAKEUP_FIRST_SLOT = 832,
- GRPC_STATS_HISTOGRAM_EXECUTOR_CLOSURES_PER_WAKEUP_BUCKETS = 64,
- GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED_FIRST_SLOT = 896,
+ GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED_FIRST_SLOT = 832,
GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED_BUCKETS = 8,
- GRPC_STATS_HISTOGRAM_BUCKETS = 904
+ GRPC_STATS_HISTOGRAM_BUCKETS = 840
} grpc_stats_histogram_constants;
#define GRPC_STATS_INC_CLIENT_CALLS_CREATED(exec_ctx) \
GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_CLIENT_CALLS_CREATED)
@@ -331,6 +331,9 @@ typedef enum {
GRPC_STATS_INC_COUNTER( \
(exec_ctx), \
GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM)
+#define GRPC_STATS_INC_HTTP2_SPURIOUS_WRITES_BEGUN(exec_ctx) \
+ GRPC_STATS_INC_COUNTER((exec_ctx), \
+ GRPC_STATS_COUNTER_HTTP2_SPURIOUS_WRITES_BEGUN)
#define GRPC_STATS_INC_HPACK_RECV_INDEXED(exec_ctx) \
GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_HPACK_RECV_INDEXED)
#define GRPC_STATS_INC_HPACK_RECV_LITHDR_INCIDX(exec_ctx) \
@@ -417,11 +420,6 @@ typedef enum {
GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_EXECUTOR_QUEUE_DRAINED)
#define GRPC_STATS_INC_EXECUTOR_PUSH_RETRIES(exec_ctx) \
GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_EXECUTOR_PUSH_RETRIES)
-#define GRPC_STATS_INC_EXECUTOR_THREADS_CREATED(exec_ctx) \
- GRPC_STATS_INC_COUNTER((exec_ctx), \
- GRPC_STATS_COUNTER_EXECUTOR_THREADS_CREATED)
-#define GRPC_STATS_INC_EXECUTOR_THREADS_USED(exec_ctx) \
- GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_EXECUTOR_THREADS_USED)
#define GRPC_STATS_INC_SERVER_REQUESTED_CALLS(exec_ctx) \
GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_SERVER_REQUESTED_CALLS)
#define GRPC_STATS_INC_SERVER_SLOWPATH_REQUESTS_QUEUED(exec_ctx) \
@@ -468,17 +466,17 @@ void grpc_stats_inc_http2_send_trailing_metadata_per_write(
grpc_stats_inc_http2_send_flowctl_per_write((exec_ctx), (int)(value))
void grpc_stats_inc_http2_send_flowctl_per_write(grpc_exec_ctx *exec_ctx,
int x);
-#define GRPC_STATS_INC_EXECUTOR_CLOSURES_PER_WAKEUP(exec_ctx, value) \
- grpc_stats_inc_executor_closures_per_wakeup((exec_ctx), (int)(value))
-void grpc_stats_inc_executor_closures_per_wakeup(grpc_exec_ctx *exec_ctx,
- int x);
#define GRPC_STATS_INC_SERVER_CQS_CHECKED(exec_ctx, value) \
grpc_stats_inc_server_cqs_checked((exec_ctx), (int)(value))
void grpc_stats_inc_server_cqs_checked(grpc_exec_ctx *exec_ctx, int x);
-extern const int grpc_stats_histo_buckets[14];
-extern const int grpc_stats_histo_start[14];
-extern const int *const grpc_stats_histo_bucket_boundaries[14];
-extern void (*const grpc_stats_inc_histogram[14])(grpc_exec_ctx *exec_ctx,
+extern const int grpc_stats_histo_buckets[13];
+extern const int grpc_stats_histo_start[13];
+extern const int *const grpc_stats_histo_bucket_boundaries[13];
+extern void (*const grpc_stats_inc_histogram[13])(grpc_exec_ctx *exec_ctx,
int x);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_DEBUG_STATS_DATA_H */
diff --git a/src/core/lib/debug/stats_data.yaml b/src/core/lib/debug/stats_data.yaml
index de575f01c7..5c0ab2262e 100644
--- a/src/core/lib/debug/stats_data.yaml
+++ b/src/core/lib/debug/stats_data.yaml
@@ -189,6 +189,8 @@
doc: Number of HTTP2 writes initiated due to 'ping_response'
- counter: http2_initiate_write_due_to_force_rst_stream
doc: Number of HTTP2 writes initiated due to 'force_rst_stream'
+- counter: http2_spurious_writes_begun
+ doc: Number of HTTP2 writes initiated with nothing to write
- counter: hpack_recv_indexed
doc: Number of HPACK indexed fields received
- counter: hpack_recv_lithdr_incidx
@@ -259,14 +261,6 @@
- counter: executor_push_retries
doc: Number of times we raced and were forced to retry pushing a closure to
the executor
-- counter: executor_threads_created
- doc: Size of the backing thread pool for overflow gRPC Core work
-- counter: executor_threads_used
- doc: How many executor threads actually got used
-- histogram: executor_closures_per_wakeup
- max: 1024
- buckets: 64
- doc: Number of closures executed each time an executor wakes up
# server
- counter: server_requested_calls
doc: How many calls were requested (not necessarily received) by the server
@@ -278,3 +272,4 @@
- counter: server_slowpath_requests_queued
doc: How many times was the server slow path taken (indicates too few
outstanding requests)
+
diff --git a/src/core/lib/debug/stats_data_bq_schema.sql b/src/core/lib/debug/stats_data_bq_schema.sql
index 0611ccaff0..54869977b0 100644
--- a/src/core/lib/debug/stats_data_bq_schema.sql
+++ b/src/core/lib/debug/stats_data_bq_schema.sql
@@ -52,6 +52,7 @@ http2_initiate_write_due_to_keepalive_ping_per_iteration:FLOAT,
http2_initiate_write_due_to_transport_flow_control_unstalled_per_iteration:FLOAT,
http2_initiate_write_due_to_ping_response_per_iteration:FLOAT,
http2_initiate_write_due_to_force_rst_stream_per_iteration:FLOAT,
+http2_spurious_writes_begun_per_iteration:FLOAT,
hpack_recv_indexed_per_iteration:FLOAT,
hpack_recv_lithdr_incidx_per_iteration:FLOAT,
hpack_recv_lithdr_incidx_v_per_iteration:FLOAT,
@@ -84,7 +85,5 @@ executor_scheduled_to_self_per_iteration:FLOAT,
executor_wakeup_initiated_per_iteration:FLOAT,
executor_queue_drained_per_iteration:FLOAT,
executor_push_retries_per_iteration:FLOAT,
-executor_threads_created_per_iteration:FLOAT,
-executor_threads_used_per_iteration:FLOAT,
server_requested_calls_per_iteration:FLOAT,
server_slowpath_requests_queued_per_iteration:FLOAT
diff --git a/src/core/lib/debug/trace.c b/src/core/lib/debug/trace.cc
index 7cb2789a19..21b0d8c3a6 100644
--- a/src/core/lib/debug/trace.c
+++ b/src/core/lib/debug/trace.cc
@@ -20,6 +20,7 @@
#include <string.h>
+#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "src/core/lib/support/env.h"
diff --git a/src/core/lib/debug/trace.h b/src/core/lib/debug/trace.h
index 64f2e3fc33..558ba942bb 100644
--- a/src/core/lib/debug/trace.h
+++ b/src/core/lib/debug/trace.h
@@ -23,6 +23,10 @@
#include <grpc/support/port_platform.h>
#include <stdbool.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#if defined(__has_feature)
#if __has_feature(thread_sanitizer)
#define GRPC_THREADSAFE_TRACER
@@ -52,4 +56,8 @@ void grpc_register_tracer(grpc_tracer_flag *flag);
void grpc_tracer_init(const char *env_var_name);
void grpc_tracer_shutdown(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_DEBUG_TRACE_H */
diff --git a/src/core/lib/http/format_request.c b/src/core/lib/http/format_request.cc
index 88fb0ab0b6..88fb0ab0b6 100644
--- a/src/core/lib/http/format_request.c
+++ b/src/core/lib/http/format_request.cc
diff --git a/src/core/lib/http/format_request.h b/src/core/lib/http/format_request.h
index 12b42e42fa..a559aac660 100644
--- a/src/core/lib/http/format_request.h
+++ b/src/core/lib/http/format_request.h
@@ -22,6 +22,10 @@
#include <grpc/slice.h>
#include "src/core/lib/http/httpcli.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
grpc_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request);
grpc_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request,
const char *body_bytes,
@@ -29,4 +33,8 @@ grpc_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request,
grpc_slice grpc_httpcli_format_connect_request(
const grpc_httpcli_request *request);
-#endif /* GRPC_CORE_LIB_HTTP_FORMAT_REQUEST_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_HTTP_FORMAT_REQUEST_H */ \ No newline at end of file
diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.cc
index db995943a9..c96800b85c 100644
--- a/src/core/lib/http/httpcli.c
+++ b/src/core/lib/http/httpcli.cc
@@ -44,7 +44,7 @@ typedef struct {
grpc_endpoint *ep;
char *host;
char *ssl_host_override;
- gpr_timespec deadline;
+ grpc_millis deadline;
int have_read_byte;
const grpc_httpcli_handshaker *handshaker;
grpc_closure *on_done;
@@ -65,7 +65,7 @@ static grpc_httpcli_post_override g_post_override = NULL;
static void plaintext_handshake(grpc_exec_ctx *exec_ctx, void *arg,
grpc_endpoint *endpoint, const char *host,
- gpr_timespec deadline,
+ grpc_millis deadline,
void (*on_done)(grpc_exec_ctx *exec_ctx,
void *arg,
grpc_endpoint *endpoint)) {
@@ -240,7 +240,7 @@ static void internal_request_begin(grpc_exec_ctx *exec_ctx,
grpc_polling_entity *pollent,
grpc_resource_quota *resource_quota,
const grpc_httpcli_request *request,
- gpr_timespec deadline, grpc_closure *on_done,
+ grpc_millis deadline, grpc_closure *on_done,
grpc_httpcli_response *response,
const char *name, grpc_slice request_text) {
internal_request *req =
@@ -278,9 +278,8 @@ static void internal_request_begin(grpc_exec_ctx *exec_ctx,
void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context,
grpc_polling_entity *pollent,
grpc_resource_quota *resource_quota,
- const grpc_httpcli_request *request,
- gpr_timespec deadline, grpc_closure *on_done,
- grpc_httpcli_response *response) {
+ const grpc_httpcli_request *request, grpc_millis deadline,
+ grpc_closure *on_done, grpc_httpcli_response *response) {
char *name;
if (g_get_override &&
g_get_override(exec_ctx, request, deadline, on_done, response)) {
@@ -298,7 +297,7 @@ void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context,
grpc_resource_quota *resource_quota,
const grpc_httpcli_request *request,
const char *body_bytes, size_t body_size,
- gpr_timespec deadline, grpc_closure *on_done,
+ grpc_millis deadline, grpc_closure *on_done,
grpc_httpcli_response *response) {
char *name;
if (g_post_override &&
diff --git a/src/core/lib/http/httpcli.h b/src/core/lib/http/httpcli.h
index 809618695e..3e6bdc0e46 100644
--- a/src/core/lib/http/httpcli.h
+++ b/src/core/lib/http/httpcli.h
@@ -32,6 +32,10 @@
/* User agent this library reports */
#define GRPC_HTTPCLI_USER_AGENT "grpc-httpcli/0.0"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Tracks in-progress http requests
TODO(ctiller): allow caching and capturing multiple requests for the
same content and combining them */
@@ -42,7 +46,7 @@ typedef struct grpc_httpcli_context {
typedef struct {
const char *default_port;
void (*handshake)(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *endpoint,
- const char *host, gpr_timespec deadline,
+ const char *host, grpc_millis deadline,
void (*on_done)(grpc_exec_ctx *exec_ctx, void *arg,
grpc_endpoint *endpoint));
} grpc_httpcli_handshaker;
@@ -83,8 +87,8 @@ void grpc_httpcli_context_destroy(grpc_exec_ctx *exec_ctx,
void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context,
grpc_polling_entity *pollent,
grpc_resource_quota *resource_quota,
- const grpc_httpcli_request *request,
- gpr_timespec deadline, grpc_closure *on_complete,
+ const grpc_httpcli_request *request, grpc_millis deadline,
+ grpc_closure *on_complete,
grpc_httpcli_response *response);
/* Asynchronously perform a HTTP POST.
@@ -106,21 +110,25 @@ void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context,
grpc_resource_quota *resource_quota,
const grpc_httpcli_request *request,
const char *body_bytes, size_t body_size,
- gpr_timespec deadline, grpc_closure *on_complete,
+ grpc_millis deadline, grpc_closure *on_complete,
grpc_httpcli_response *response);
/* override functions return 1 if they handled the request, 0 otherwise */
typedef int (*grpc_httpcli_get_override)(grpc_exec_ctx *exec_ctx,
const grpc_httpcli_request *request,
- gpr_timespec deadline,
+ grpc_millis deadline,
grpc_closure *on_complete,
grpc_httpcli_response *response);
typedef int (*grpc_httpcli_post_override)(
grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request,
- const char *body_bytes, size_t body_size, gpr_timespec deadline,
+ const char *body_bytes, size_t body_size, grpc_millis deadline,
grpc_closure *on_complete, grpc_httpcli_response *response);
void grpc_httpcli_set_override(grpc_httpcli_get_override get,
grpc_httpcli_post_override post);
-#endif /* GRPC_CORE_LIB_HTTP_HTTPCLI_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_HTTP_HTTPCLI_H */ \ No newline at end of file
diff --git a/src/core/lib/http/httpcli_security_connector.c b/src/core/lib/http/httpcli_security_connector.cc
index c553fa3981..ef6c4a509b 100644
--- a/src/core/lib/http/httpcli_security_connector.c
+++ b/src/core/lib/http/httpcli_security_connector.cc
@@ -106,7 +106,8 @@ static grpc_security_status httpcli_ssl_channel_security_connector_create(
return GRPC_SECURITY_ERROR;
}
- c = gpr_zalloc(sizeof(grpc_httpcli_ssl_channel_security_connector));
+ c = (grpc_httpcli_ssl_channel_security_connector *)gpr_zalloc(
+ sizeof(grpc_httpcli_ssl_channel_security_connector));
gpr_ref_init(&c->base.base.refcount, 1);
c->base.base.vtable = &httpcli_ssl_vtable;
@@ -137,8 +138,8 @@ typedef struct {
static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error *error) {
- grpc_handshaker_args *args = arg;
- on_done_closure *c = args->user_data;
+ grpc_handshaker_args *args = (grpc_handshaker_args *)arg;
+ on_done_closure *c = (on_done_closure *)args->user_data;
if (error != GRPC_ERROR_NONE) {
const char *msg = grpc_error_string(error);
gpr_log(GPR_ERROR, "Secure transport setup failed: %s", msg);
@@ -156,10 +157,10 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg,
static void ssl_handshake(grpc_exec_ctx *exec_ctx, void *arg,
grpc_endpoint *tcp, const char *host,
- gpr_timespec deadline,
+ grpc_millis deadline,
void (*on_done)(grpc_exec_ctx *exec_ctx, void *arg,
grpc_endpoint *endpoint)) {
- on_done_closure *c = gpr_malloc(sizeof(*c));
+ on_done_closure *c = (on_done_closure *)gpr_malloc(sizeof(*c));
const char *pem_root_certs = grpc_get_default_ssl_roots();
if (pem_root_certs == NULL) {
gpr_log(GPR_ERROR, "Could not get default pem root certs.");
diff --git a/src/core/lib/http/parser.c b/src/core/lib/http/parser.cc
index 0950bd655e..0950bd655e 100644
--- a/src/core/lib/http/parser.c
+++ b/src/core/lib/http/parser.cc
diff --git a/src/core/lib/http/parser.h b/src/core/lib/http/parser.h
index c8dced3901..5484948bea 100644
--- a/src/core/lib/http/parser.h
+++ b/src/core/lib/http/parser.h
@@ -27,6 +27,10 @@
/* Maximum length of a header string of the form 'Key: Value\r\n' */
#define GRPC_HTTP_PARSER_MAX_HEADER_LENGTH 4096
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* A single header to be passed in a request */
typedef struct grpc_http_header {
char *key;
@@ -109,4 +113,8 @@ void grpc_http_response_destroy(grpc_http_response *response);
extern grpc_tracer_flag grpc_http1_trace;
-#endif /* GRPC_CORE_LIB_HTTP_PARSER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_HTTP_PARSER_H */ \ No newline at end of file
diff --git a/src/core/lib/support/block_annotate.h b/src/core/lib/iomgr/block_annotate.h
index 8e3ef7df65..fcbfe9eb1a 100644
--- a/src/core/lib/support/block_annotate.h
+++ b/src/core/lib/iomgr/block_annotate.h
@@ -16,8 +16,8 @@
*
*/
-#ifndef GRPC_CORE_LIB_SUPPORT_BLOCK_ANNOTATE_H
-#define GRPC_CORE_LIB_SUPPORT_BLOCK_ANNOTATE_H
+#ifndef GRPC_CORE_LIB_IOMGR_BLOCK_ANNOTATE_H
+#define GRPC_CORE_LIB_IOMGR_BLOCK_ANNOTATE_H
#ifdef __cplusplus
extern "C" {
@@ -39,17 +39,26 @@ void gpr_thd_end_blocking_region();
do { \
gpr_thd_start_blocking_region(); \
} while (0)
-#define GRPC_SCHEDULING_END_BLOCKING_REGION \
- do { \
- gpr_thd_end_blocking_region(); \
+#define GRPC_SCHEDULING_END_BLOCKING_REGION_NO_EXEC_CTX \
+ do { \
+ gpr_thd_end_blocking_region(); \
+ } while (0)
+#define GRPC_SCHEDULING_END_BLOCKING_REGION_WITH_EXEC_CTX(ec) \
+ do { \
+ gpr_thd_end_blocking_region(); \
+ grpc_exec_ctx_invalidate_now((ec)); \
} while (0)
#else
#define GRPC_SCHEDULING_START_BLOCKING_REGION \
do { \
} while (0)
-#define GRPC_SCHEDULING_END_BLOCKING_REGION \
- do { \
+#define GRPC_SCHEDULING_END_BLOCKING_REGION_NO_EXEC_CTX \
+ do { \
+ } while (0)
+#define GRPC_SCHEDULING_END_BLOCKING_REGION_WITH_EXEC_CTX(ec) \
+ do { \
+ grpc_exec_ctx_invalidate_now((ec)); \
} while (0)
#endif
-#endif /* GRPC_CORE_LIB_SUPPORT_BLOCK_ANNOTATE_H */
+#endif /* GRPC_CORE_LIB_IOMGR_BLOCK_ANNOTATE_H */
diff --git a/src/core/lib/iomgr/call_combiner.c b/src/core/lib/iomgr/call_combiner.cc
index 48d8eaec18..bab3df021a 100644
--- a/src/core/lib/iomgr/call_combiner.c
+++ b/src/core/lib/iomgr/call_combiner.cc
@@ -18,6 +18,8 @@
#include "src/core/lib/iomgr/call_combiner.h"
+#include <inttypes.h>
+
#include <grpc/support/log.h>
grpc_tracer_flag grpc_call_combiner_trace =
diff --git a/src/core/lib/iomgr/call_combiner.h b/src/core/lib/iomgr/call_combiner.h
index 5cfb3f0c07..527f84fce0 100644
--- a/src/core/lib/iomgr/call_combiner.h
+++ b/src/core/lib/iomgr/call_combiner.h
@@ -27,6 +27,10 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/support/mpscq.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// A simple, lock-free mechanism for serializing activity related to a
// single call. This is similar to a combiner but is more lightweight.
//
@@ -118,4 +122,8 @@ void grpc_call_combiner_cancel(grpc_exec_ctx* exec_ctx,
grpc_call_combiner* call_combiner,
grpc_error* error);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_IOMGR_CALL_COMBINER_H */
diff --git a/src/core/lib/iomgr/closure.c b/src/core/lib/iomgr/closure.cc
index 00edefc6ae..00edefc6ae 100644
--- a/src/core/lib/iomgr/closure.c
+++ b/src/core/lib/iomgr/closure.cc
diff --git a/src/core/lib/iomgr/combiner.c b/src/core/lib/iomgr/combiner.cc
index f899b25f10..0e707ef839 100644
--- a/src/core/lib/iomgr/combiner.c
+++ b/src/core/lib/iomgr/combiner.cc
@@ -19,6 +19,7 @@
#include "src/core/lib/iomgr/combiner.h"
#include <assert.h>
+#include <inttypes.h>
#include <string.h>
#include <grpc/support/alloc.h>
diff --git a/src/core/lib/iomgr/combiner.h b/src/core/lib/iomgr/combiner.h
index 8e0434369d..10e5fb480d 100644
--- a/src/core/lib/iomgr/combiner.h
+++ b/src/core/lib/iomgr/combiner.h
@@ -26,6 +26,10 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/support/mpscq.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// Provides serialized access to some resource.
// Each action queued on a combiner is executed serially in a borrowed thread.
// The actual thread executing actions may change over time (but there will only
@@ -63,4 +67,8 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx);
extern grpc_tracer_flag grpc_combiner_trace;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_IOMGR_COMBINER_H */
diff --git a/src/core/lib/iomgr/endpoint.c b/src/core/lib/iomgr/endpoint.cc
index 37cce335ca..37cce335ca 100644
--- a/src/core/lib/iomgr/endpoint.c
+++ b/src/core/lib/iomgr/endpoint.cc
diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h
index 8f0523a981..16ff0ab733 100644
--- a/src/core/lib/iomgr/endpoint.h
+++ b/src/core/lib/iomgr/endpoint.h
@@ -26,6 +26,10 @@
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/resource_quota.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* An endpoint caps a streaming channel between two communicating processes.
Examples may be: a tcp socket, <stdin+stdout>, or some shared memory. */
@@ -95,4 +99,8 @@ struct grpc_endpoint {
const grpc_endpoint_vtable *vtable;
};
-#endif /* GRPC_CORE_LIB_IOMGR_ENDPOINT_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_ENDPOINT_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/endpoint_pair.h b/src/core/lib/iomgr/endpoint_pair.h
index b60e62fc3e..f8830022f4 100644
--- a/src/core/lib/iomgr/endpoint_pair.h
+++ b/src/core/lib/iomgr/endpoint_pair.h
@@ -21,6 +21,10 @@
#include "src/core/lib/iomgr/endpoint.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct {
grpc_endpoint *client;
grpc_endpoint *server;
@@ -29,4 +33,8 @@ typedef struct {
grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name,
grpc_channel_args *args);
-#endif /* GRPC_CORE_LIB_IOMGR_ENDPOINT_PAIR_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_ENDPOINT_PAIR_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/endpoint_pair_posix.c b/src/core/lib/iomgr/endpoint_pair_posix.cc
index 3ade2148ba..3ade2148ba 100644
--- a/src/core/lib/iomgr/endpoint_pair_posix.c
+++ b/src/core/lib/iomgr/endpoint_pair_posix.cc
diff --git a/src/core/lib/iomgr/endpoint_pair_uv.c b/src/core/lib/iomgr/endpoint_pair_uv.cc
index ff72fe0492..ff72fe0492 100644
--- a/src/core/lib/iomgr/endpoint_pair_uv.c
+++ b/src/core/lib/iomgr/endpoint_pair_uv.cc
diff --git a/src/core/lib/iomgr/endpoint_pair_windows.c b/src/core/lib/iomgr/endpoint_pair_windows.cc
index 782fa2fd69..782fa2fd69 100644
--- a/src/core/lib/iomgr/endpoint_pair_windows.c
+++ b/src/core/lib/iomgr/endpoint_pair_windows.cc
diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.cc
index aa05501537..2ea6cf1301 100644
--- a/src/core/lib/iomgr/error.c
+++ b/src/core/lib/iomgr/error.cc
@@ -15,9 +15,11 @@
* limitations under the License.
*
*/
+#include <grpc/support/port_platform.h>
#include "src/core/lib/iomgr/error.h"
+#include <inttypes.h>
#include <string.h>
#include <grpc/status.h>
diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h
index b362948691..b36330a7ab 100644
--- a/src/core/lib/iomgr/error.h
+++ b/src/core/lib/iomgr/error.h
@@ -19,8 +19,8 @@
#ifndef GRPC_CORE_LIB_IOMGR_ERROR_H
#define GRPC_CORE_LIB_IOMGR_ERROR_H
+#include <inttypes.h>
#include <stdbool.h>
-#include <stdint.h>
#include <grpc/slice.h>
#include <grpc/status.h>
diff --git a/src/core/lib/iomgr/error_internal.h b/src/core/lib/iomgr/error_internal.h
index 7507484557..f718e06d4e 100644
--- a/src/core/lib/iomgr/error_internal.h
+++ b/src/core/lib/iomgr/error_internal.h
@@ -24,6 +24,10 @@
#include <grpc/support/sync.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_linked_error grpc_linked_error;
struct grpc_linked_error {
@@ -57,4 +61,8 @@ struct grpc_error {
bool grpc_error_is_special(grpc_error *err);
-#endif /* GRPC_CORE_LIB_IOMGR_ERROR_INTERNAL_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_ERROR_INTERNAL_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/ev_epoll1_linux.c b/src/core/lib/iomgr/ev_epoll1_linux.cc
index 3ac12ab56f..6126e2771c 100644
--- a/src/core/lib/iomgr/ev_epoll1_linux.c
+++ b/src/core/lib/iomgr/ev_epoll1_linux.cc
@@ -20,11 +20,11 @@
/* This polling engine is only relevant on linux kernels supporting epoll() */
#ifdef GRPC_LINUX_EPOLL
-
#include "src/core/lib/iomgr/ev_epoll1_linux.h"
#include <assert.h>
#include <errno.h>
+#include <limits.h>
#include <poll.h>
#include <pthread.h>
#include <string.h>
@@ -40,12 +40,12 @@
#include <grpc/support/useful.h>
#include "src/core/lib/debug/stats.h"
+#include "src/core/lib/iomgr/block_annotate.h"
#include "src/core/lib/iomgr/ev_posix.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
#include "src/core/lib/iomgr/lockfree_event.h"
#include "src/core/lib/iomgr/wakeup_fd_posix.h"
#include "src/core/lib/profiling/timers.h"
-#include "src/core/lib/support/block_annotate.h"
#include "src/core/lib/support/string.h"
static grpc_wakeup_fd global_wakeup_fd;
@@ -562,25 +562,17 @@ static void pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
GPR_TIMER_END("pollset_shutdown", 0);
}
-static int poll_deadline_to_millis_timeout(gpr_timespec deadline,
- gpr_timespec now) {
- gpr_timespec timeout;
- if (gpr_time_cmp(deadline, gpr_inf_future(deadline.clock_type)) == 0) {
- return -1;
- }
-
- if (gpr_time_cmp(deadline, now) <= 0) {
+static int poll_deadline_to_millis_timeout(grpc_exec_ctx *exec_ctx,
+ grpc_millis millis) {
+ if (millis == GRPC_MILLIS_INF_FUTURE) return -1;
+ grpc_millis delta = millis - grpc_exec_ctx_now(exec_ctx);
+ if (delta > INT_MAX) {
+ return INT_MAX;
+ } else if (delta < 0) {
return 0;
+ } else {
+ return (int)delta;
}
-
- static const gpr_timespec round_up = {
- 0, /* tv_sec */
- GPR_NS_PER_MS - 1, /* tv_nsec */
- GPR_TIMESPAN /* clock_type */
- };
- timeout = gpr_time_sub(deadline, now);
- int millis = gpr_time_to_millis(gpr_time_add(timeout, round_up));
- return millis >= 1 ? millis : 1;
}
/* Process the epoll events found by do_epoll_wait() function.
@@ -637,11 +629,11 @@ static grpc_error *process_epoll_events(grpc_exec_ctx *exec_ctx,
(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_exec_ctx *exec_ctx, grpc_pollset *ps,
- gpr_timespec now, gpr_timespec deadline) {
+ grpc_millis deadline) {
GPR_TIMER_BEGIN("do_epoll_wait", 0);
int r;
- int timeout = poll_deadline_to_millis_timeout(deadline, now);
+ int timeout = poll_deadline_to_millis_timeout(exec_ctx, deadline);
if (timeout != 0) {
GRPC_SCHEDULING_START_BLOCKING_REGION;
}
@@ -651,7 +643,7 @@ static grpc_error *do_epoll_wait(grpc_exec_ctx *exec_ctx, grpc_pollset *ps,
timeout);
} while (r < 0 && errno == EINTR);
if (timeout != 0) {
- GRPC_SCHEDULING_END_BLOCKING_REGION;
+ GRPC_SCHEDULING_END_BLOCKING_REGION_WITH_EXEC_CTX(exec_ctx);
}
if (r < 0) return GRPC_OS_ERROR(errno, "epoll_wait");
@@ -669,9 +661,10 @@ static grpc_error *do_epoll_wait(grpc_exec_ctx *exec_ctx, grpc_pollset *ps,
return GRPC_ERROR_NONE;
}
-static bool begin_worker(grpc_pollset *pollset, grpc_pollset_worker *worker,
- grpc_pollset_worker **worker_hdl, gpr_timespec *now,
- gpr_timespec deadline) {
+static bool begin_worker(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
+ grpc_pollset_worker *worker,
+ grpc_pollset_worker **worker_hdl,
+ grpc_millis deadline) {
GPR_TIMER_BEGIN("begin_worker", 0);
if (worker_hdl != NULL) *worker_hdl = worker;
worker->initialized_cv = false;
@@ -756,14 +749,15 @@ static bool begin_worker(grpc_pollset *pollset, grpc_pollset_worker *worker,
pollset->shutting_down);
}
- if (gpr_cv_wait(&worker->cv, &pollset->mu, deadline) &&
+ if (gpr_cv_wait(&worker->cv, &pollset->mu,
+ grpc_millis_to_timespec(deadline, GPR_CLOCK_REALTIME)) &&
worker->state == UNKICKED) {
/* If gpr_cv_wait returns true (i.e a timeout), pretend that the worker
received a kick */
SET_KICK_STATE(worker, KICKED);
}
}
- *now = gpr_now(now->clock_type);
+ grpc_exec_ctx_invalidate_now(exec_ctx);
}
if (GRPC_TRACER_ON(grpc_polling_trace)) {
@@ -942,7 +936,7 @@ static void end_worker(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
ensure that it is held by the time the function returns */
static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *ps,
grpc_pollset_worker **worker_hdl,
- gpr_timespec now, gpr_timespec deadline) {
+ grpc_millis deadline) {
grpc_pollset_worker worker;
grpc_error *error = GRPC_ERROR_NONE;
static const char *err_desc = "pollset_work";
@@ -953,7 +947,7 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *ps,
return GRPC_ERROR_NONE;
}
- if (begin_worker(ps, &worker, worker_hdl, &now, deadline)) {
+ if (begin_worker(exec_ctx, ps, &worker, worker_hdl, deadline)) {
gpr_tls_set(&g_current_thread_pollset, (intptr_t)ps);
gpr_tls_set(&g_current_thread_worker, (intptr_t)&worker);
GPR_ASSERT(!ps->shutting_down);
@@ -976,8 +970,7 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *ps,
designated poller */
if (gpr_atm_acq_load(&g_epoll_set.cursor) ==
gpr_atm_acq_load(&g_epoll_set.num_events)) {
- append_error(&error, do_epoll_wait(exec_ctx, ps, now, deadline),
- err_desc);
+ append_error(&error, do_epoll_wait(exec_ctx, ps, deadline), err_desc);
}
append_error(&error, process_epoll_events(exec_ctx, ps), err_desc);
@@ -1257,7 +1250,7 @@ const grpc_event_engine_vtable *grpc_init_epoll1_linux(bool explicit_request) {
#else /* defined(GRPC_LINUX_EPOLL) */
#if defined(GRPC_POSIX_SOCKET)
-#include "src/core/lib/iomgr/ev_posix.h"
+#include "src/core/lib/iomgr/ev_epoll1_linux.h"
/* If GRPC_LINUX_EPOLL is not defined, it means epoll is not available. Return
* NULL */
const grpc_event_engine_vtable *grpc_init_epoll1_linux(bool explicit_request) {
diff --git a/src/core/lib/iomgr/ev_epoll1_linux.h b/src/core/lib/iomgr/ev_epoll1_linux.h
index 0696e0df40..66fd826b49 100644
--- a/src/core/lib/iomgr/ev_epoll1_linux.h
+++ b/src/core/lib/iomgr/ev_epoll1_linux.h
@@ -22,8 +22,16 @@
#include "src/core/lib/iomgr/ev_posix.h"
#include "src/core/lib/iomgr/port.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// a polling engine that utilizes a singleton epoll set and turnstile polling
const grpc_event_engine_vtable *grpc_init_epoll1_linux(bool explicit_request);
-#endif /* GRPC_CORE_LIB_IOMGR_EV_EPOLL1_LINUX_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_EV_EPOLL1_LINUX_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/ev_epollex_linux.c b/src/core/lib/iomgr/ev_epollex_linux.cc
index 8eb4de44d9..59dd8fd2fe 100644
--- a/src/core/lib/iomgr/ev_epollex_linux.c
+++ b/src/core/lib/iomgr/ev_epollex_linux.cc
@@ -25,6 +25,7 @@
#include <assert.h>
#include <errno.h>
+#include <limits.h>
#include <poll.h>
#include <pthread.h>
#include <string.h>
@@ -38,7 +39,7 @@
#include <grpc/support/useful.h>
#include "src/core/lib/debug/stats.h"
-#include "src/core/lib/iomgr/ev_posix.h"
+#include "src/core/lib/iomgr/block_annotate.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
#include "src/core/lib/iomgr/is_epollexclusive_available.h"
#include "src/core/lib/iomgr/lockfree_event.h"
@@ -46,19 +47,18 @@
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/iomgr/wakeup_fd_posix.h"
#include "src/core/lib/profiling/timers.h"
-#include "src/core/lib/support/block_annotate.h"
#include "src/core/lib/support/spinlock.h"
/*******************************************************************************
* Polling object
*/
-
typedef enum {
PO_POLLING_GROUP,
PO_POLLSET_SET,
PO_POLLSET,
- PO_FD, /* ordering is important: we always want to lock pollsets before fds:
- this guarantees that using an fd as a pollable is safe */
+ PO_FD,
+ /* ordering is important: we always want to lock pollsets before fds:
+ this guarantees that using an fd as a pollable is safe */
PO_EMPTY_POLLABLE,
PO_COUNT
} polling_obj_type;
@@ -690,32 +690,16 @@ static void pollset_init(grpc_pollset *pollset, gpr_mu **mu) {
*mu = &pollset->pollable_obj.po.mu;
}
-/* Convert a timespec to milliseconds:
- - Very small or negative poll times are clamped to zero to do a non-blocking
- poll (which becomes spin polling)
- - Other small values are rounded up to one millisecond
- - Longer than a millisecond polls are rounded up to the next nearest
- millisecond to avoid spinning
- - Infinite timeouts are converted to -1 */
-static int poll_deadline_to_millis_timeout(gpr_timespec deadline,
- gpr_timespec now) {
- gpr_timespec timeout;
- if (gpr_time_cmp(deadline, gpr_inf_future(deadline.clock_type)) == 0) {
- return -1;
- }
-
- if (gpr_time_cmp(deadline, now) <= 0) {
+static int poll_deadline_to_millis_timeout(grpc_exec_ctx *exec_ctx,
+ grpc_millis millis) {
+ if (millis == GRPC_MILLIS_INF_FUTURE) return -1;
+ grpc_millis delta = millis - grpc_exec_ctx_now(exec_ctx);
+ if (delta > INT_MAX)
+ return INT_MAX;
+ else if (delta < 0)
return 0;
- }
-
- static const gpr_timespec round_up = {
- 0, /* tv_sec */
- GPR_NS_PER_MS - 1, /* tv_nsec */
- GPR_TIMESPAN /* clock_type */
- };
- timeout = gpr_time_sub(deadline, now);
- int millis = gpr_time_to_millis(gpr_time_add(timeout, round_up));
- return millis >= 1 ? millis : 1;
+ else
+ return (int)delta;
}
static void fd_become_readable(grpc_exec_ctx *exec_ctx, grpc_fd *fd,
@@ -810,9 +794,8 @@ static void pollset_destroy(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) {
}
static grpc_error *pollset_epoll(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
- pollable *p, gpr_timespec now,
- gpr_timespec deadline) {
- int timeout = poll_deadline_to_millis_timeout(deadline, now);
+ pollable *p, grpc_millis deadline) {
+ int timeout = poll_deadline_to_millis_timeout(exec_ctx, deadline);
if (GRPC_TRACER_ON(grpc_polling_trace)) {
char *desc = pollable_desc(p);
@@ -829,7 +812,7 @@ static grpc_error *pollset_epoll(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
r = epoll_wait(p->epfd, pollset->events, MAX_EPOLL_EVENTS, timeout);
} while (r < 0 && errno == EINTR);
if (timeout != 0) {
- GRPC_SCHEDULING_END_BLOCKING_REGION;
+ GRPC_SCHEDULING_END_BLOCKING_REGION_WITH_EXEC_CTX(exec_ctx);
}
if (r < 0) return GRPC_OS_ERROR(errno, "epoll_wait");
@@ -884,9 +867,10 @@ static worker_remove_result worker_remove(grpc_pollset_worker **root,
}
/* Return true if this thread should poll */
-static bool begin_worker(grpc_pollset *pollset, grpc_pollset_worker *worker,
- grpc_pollset_worker **worker_hdl, gpr_timespec *now,
- gpr_timespec deadline) {
+static bool begin_worker(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
+ grpc_pollset_worker *worker,
+ grpc_pollset_worker **worker_hdl,
+ grpc_millis deadline) {
bool do_poll = true;
if (worker_hdl != NULL) *worker_hdl = worker;
worker->initialized_cv = false;
@@ -910,10 +894,11 @@ static bool begin_worker(grpc_pollset *pollset, grpc_pollset_worker *worker,
worker->pollable_obj->root_worker != worker) {
gpr_log(GPR_DEBUG, "PS:%p wait %p w=%p for %dms", pollset,
worker->pollable_obj, worker,
- poll_deadline_to_millis_timeout(deadline, *now));
+ poll_deadline_to_millis_timeout(exec_ctx, deadline));
}
while (do_poll && worker->pollable_obj->root_worker != worker) {
- if (gpr_cv_wait(&worker->cv, &worker->pollable_obj->po.mu, deadline)) {
+ if (gpr_cv_wait(&worker->cv, &worker->pollable_obj->po.mu,
+ grpc_millis_to_timespec(deadline, GPR_CLOCK_REALTIME))) {
if (GRPC_TRACER_ON(grpc_polling_trace)) {
gpr_log(GPR_DEBUG, "PS:%p timeout_wait %p w=%p", pollset,
worker->pollable_obj, worker);
@@ -936,7 +921,7 @@ static bool begin_worker(grpc_pollset *pollset, grpc_pollset_worker *worker,
gpr_mu_lock(&pollset->pollable_obj.po.mu);
gpr_mu_lock(&worker->pollable_obj->po.mu);
}
- *now = gpr_now(now->clock_type);
+ grpc_exec_ctx_invalidate_now(exec_ctx);
}
return do_poll && pollset->shutdown_closure == NULL &&
@@ -967,14 +952,13 @@ static void end_worker(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
ensure that it is held by the time the function returns */
static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
grpc_pollset_worker **worker_hdl,
- gpr_timespec now, gpr_timespec deadline) {
+ grpc_millis deadline) {
grpc_pollset_worker worker;
if (0 && GRPC_TRACER_ON(grpc_polling_trace)) {
- gpr_log(GPR_DEBUG, "PS:%p work hdl=%p worker=%p now=%" PRId64
- ".%09d deadline=%" PRId64 ".%09d kwp=%d root_worker=%p",
- pollset, worker_hdl, &worker, now.tv_sec, now.tv_nsec,
- deadline.tv_sec, deadline.tv_nsec, pollset->kicked_without_poller,
- pollset->root_worker);
+ gpr_log(GPR_DEBUG, "PS:%p work hdl=%p worker=%p now=%" PRIdPTR
+ " deadline=%" PRIdPTR " kwp=%d root_worker=%p",
+ pollset, worker_hdl, &worker, grpc_exec_ctx_now(exec_ctx), deadline,
+ pollset->kicked_without_poller, pollset->root_worker);
}
grpc_error *error = GRPC_ERROR_NONE;
static const char *err_desc = "pollset_work";
@@ -985,7 +969,7 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
if (pollset->current_pollable_obj != &pollset->pollable_obj) {
gpr_mu_lock(&pollset->current_pollable_obj->po.mu);
}
- if (begin_worker(pollset, &worker, worker_hdl, &now, deadline)) {
+ if (begin_worker(exec_ctx, pollset, &worker, worker_hdl, deadline)) {
gpr_tls_set(&g_current_thread_pollset, (intptr_t)pollset);
gpr_tls_set(&g_current_thread_worker, (intptr_t)&worker);
GPR_ASSERT(!pollset->shutdown_closure);
@@ -996,7 +980,7 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
gpr_mu_unlock(&pollset->pollable_obj.po.mu);
if (pollset->event_cursor == pollset->event_count) {
append_error(&error, pollset_epoll(exec_ctx, pollset, worker.pollable_obj,
- now, deadline),
+ deadline),
err_desc);
}
append_error(&error, pollset_process_events(exec_ctx, pollset, false),
@@ -1449,7 +1433,7 @@ const grpc_event_engine_vtable *grpc_init_epollex_linux(
#else /* defined(GRPC_LINUX_EPOLL) */
#if defined(GRPC_POSIX_SOCKET)
-#include "src/core/lib/iomgr/ev_posix.h"
+#include "src/core/lib/iomgr/ev_epollex_linux.h"
/* If GRPC_LINUX_EPOLL is not defined, it means epoll is not available. Return
* NULL */
const grpc_event_engine_vtable *grpc_init_epollex_linux(
diff --git a/src/core/lib/iomgr/ev_epollex_linux.h b/src/core/lib/iomgr/ev_epollex_linux.h
index cff9b43c02..58cc5a24f8 100644
--- a/src/core/lib/iomgr/ev_epollex_linux.h
+++ b/src/core/lib/iomgr/ev_epollex_linux.h
@@ -22,7 +22,15 @@
#include "src/core/lib/iomgr/ev_posix.h"
#include "src/core/lib/iomgr/port.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
const grpc_event_engine_vtable *grpc_init_epollex_linux(
bool explicitly_requested);
-#endif /* GRPC_CORE_LIB_IOMGR_EV_EPOLLEX_LINUX_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_EV_EPOLLEX_LINUX_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/ev_epollsig_linux.c b/src/core/lib/iomgr/ev_epollsig_linux.cc
index 4d8bdf1401..370ea1d50b 100644
--- a/src/core/lib/iomgr/ev_epollsig_linux.c
+++ b/src/core/lib/iomgr/ev_epollsig_linux.cc
@@ -25,6 +25,7 @@
#include <assert.h>
#include <errno.h>
+#include <limits.h>
#include <poll.h>
#include <pthread.h>
#include <signal.h>
@@ -40,13 +41,13 @@
#include <grpc/support/useful.h>
#include "src/core/lib/debug/stats.h"
+#include "src/core/lib/iomgr/block_annotate.h"
#include "src/core/lib/iomgr/ev_posix.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
#include "src/core/lib/iomgr/lockfree_event.h"
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/iomgr/wakeup_fd_posix.h"
#include "src/core/lib/profiling/timers.h"
-#include "src/core/lib/support/block_annotate.h"
#define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker *)1)
@@ -1089,30 +1090,16 @@ static void pollset_init(grpc_pollset *pollset, gpr_mu **mu) {
pollset->shutdown_done = NULL;
}
-/* Convert a timespec to milliseconds:
- - Very small or negative poll times are clamped to zero to do a non-blocking
- poll (which becomes spin polling)
- - Other small values are rounded up to one millisecond
- - Longer than a millisecond polls are rounded up to the next nearest
- millisecond to avoid spinning
- - Infinite timeouts are converted to -1 */
-static int poll_deadline_to_millis_timeout(gpr_timespec deadline,
- gpr_timespec now) {
- gpr_timespec timeout;
- static const int64_t max_spin_polling_us = 10;
- if (gpr_time_cmp(deadline, gpr_inf_future(deadline.clock_type)) == 0) {
- return -1;
- }
-
- if (gpr_time_cmp(deadline, gpr_time_add(now, gpr_time_from_micros(
- max_spin_polling_us,
- GPR_TIMESPAN))) <= 0) {
+static int poll_deadline_to_millis_timeout(grpc_exec_ctx *exec_ctx,
+ grpc_millis millis) {
+ if (millis == GRPC_MILLIS_INF_FUTURE) return -1;
+ grpc_millis delta = millis - grpc_exec_ctx_now(exec_ctx);
+ if (delta > INT_MAX)
+ return INT_MAX;
+ else if (delta < 0)
return 0;
- }
- timeout = gpr_time_sub(deadline, now);
- int millis = gpr_time_to_millis(gpr_time_add(
- timeout, gpr_time_from_nanos(GPR_NS_PER_MS - 1, GPR_TIMESPAN)));
- return millis >= 1 ? millis : 1;
+ else
+ return (int)delta;
}
static void fd_become_readable(grpc_exec_ctx *exec_ctx, grpc_fd *fd,
@@ -1243,7 +1230,7 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx,
GRPC_STATS_INC_SYSCALL_POLL(exec_ctx);
ep_rv =
epoll_pwait(epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, timeout_ms, sig_mask);
- GRPC_SCHEDULING_END_BLOCKING_REGION;
+ GRPC_SCHEDULING_END_BLOCKING_REGION_WITH_EXEC_CTX(exec_ctx);
if (ep_rv < 0) {
if (errno != EINTR) {
gpr_asprintf(&err_msg,
@@ -1310,10 +1297,10 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx,
ensure that it is held by the time the function returns */
static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
grpc_pollset_worker **worker_hdl,
- gpr_timespec now, gpr_timespec deadline) {
+ grpc_millis deadline) {
GPR_TIMER_BEGIN("pollset_work", 0);
grpc_error *error = GRPC_ERROR_NONE;
- int timeout_ms = poll_deadline_to_millis_timeout(deadline, now);
+ int timeout_ms = poll_deadline_to_millis_timeout(exec_ctx, deadline);
sigset_t new_mask;
@@ -1756,7 +1743,7 @@ const grpc_event_engine_vtable *grpc_init_epollsig_linux(
#else /* defined(GRPC_LINUX_EPOLL) */
#if defined(GRPC_POSIX_SOCKET)
-#include "src/core/lib/iomgr/ev_posix.h"
+#include "src/core/lib/iomgr/ev_epollsig_linux.h"
/* If GRPC_LINUX_EPOLL is not defined, it means epoll is not available. Return
* NULL */
const grpc_event_engine_vtable *grpc_init_epollsig_linux(
diff --git a/src/core/lib/iomgr/ev_epollsig_linux.h b/src/core/lib/iomgr/ev_epollsig_linux.h
index 88328682b3..c04ff27400 100644
--- a/src/core/lib/iomgr/ev_epollsig_linux.h
+++ b/src/core/lib/iomgr/ev_epollsig_linux.h
@@ -22,6 +22,10 @@
#include "src/core/lib/iomgr/ev_posix.h"
#include "src/core/lib/iomgr/port.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
const grpc_event_engine_vtable *grpc_init_epollsig_linux(bool explicit_request);
#ifdef GRPC_LINUX_EPOLL
@@ -30,4 +34,8 @@ void *grpc_pollset_get_polling_island(grpc_pollset *ps);
bool grpc_are_polling_islands_equal(void *p, void *q);
#endif /* defined(GRPC_LINUX_EPOLL) */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_IOMGR_EV_EPOLLSIG_LINUX_H */
diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.cc
index e170702dca..036a35690c 100644
--- a/src/core/lib/iomgr/ev_poll_posix.c
+++ b/src/core/lib/iomgr/ev_poll_posix.cc
@@ -24,6 +24,7 @@
#include <assert.h>
#include <errno.h>
+#include <limits.h>
#include <poll.h>
#include <string.h>
#include <sys/socket.h>
@@ -37,12 +38,11 @@
#include <grpc/support/useful.h>
#include "src/core/lib/debug/stats.h"
+#include "src/core/lib/iomgr/block_annotate.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
-#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/iomgr/wakeup_fd_cv.h"
#include "src/core/lib/iomgr/wakeup_fd_posix.h"
#include "src/core/lib/profiling/timers.h"
-#include "src/core/lib/support/block_annotate.h"
#include "src/core/lib/support/murmur_hash.h"
#define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker *)1)
@@ -50,7 +50,6 @@
/*******************************************************************************
* FD declarations
*/
-
typedef struct grpc_fd_watcher {
struct grpc_fd_watcher *next;
struct grpc_fd_watcher *prev;
@@ -200,8 +199,8 @@ static void pollset_set_add_fd(grpc_exec_ctx *exec_ctx,
- longer than a millisecond polls are rounded up to the next nearest
millisecond to avoid spinning
- infinite timeouts are converted to -1 */
-static int poll_deadline_to_millis_timeout(gpr_timespec deadline,
- gpr_timespec now);
+static int poll_deadline_to_millis_timeout(grpc_exec_ctx *exec_ctx,
+ grpc_millis deadline);
/* Allow kick to wakeup the currently polling worker */
#define GRPC_POLLSET_CAN_KICK_SELF 1
@@ -876,7 +875,7 @@ static void work_combine_error(grpc_error **composite, grpc_error *error) {
static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
grpc_pollset_worker **worker_hdl,
- gpr_timespec now, gpr_timespec deadline) {
+ grpc_millis deadline) {
grpc_pollset_worker worker;
if (worker_hdl) *worker_hdl = &worker;
grpc_error *error = GRPC_ERROR_NONE;
@@ -945,7 +944,7 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
grpc_fd_watcher *watchers;
struct pollfd *pfds;
- timeout = poll_deadline_to_millis_timeout(deadline, now);
+ timeout = poll_deadline_to_millis_timeout(exec_ctx, deadline);
if (pollset->fd_count + 2 <= inline_elements) {
pfds = pollfd_space;
@@ -991,7 +990,7 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
GRPC_SCHEDULING_START_BLOCKING_REGION;
GRPC_STATS_INC_SYSCALL_POLL(exec_ctx);
r = grpc_poll_function(pfds, pfd_count, timeout);
- GRPC_SCHEDULING_END_BLOCKING_REGION;
+ GRPC_SCHEDULING_END_BLOCKING_REGION_WITH_EXEC_CTX(exec_ctx);
if (GRPC_TRACER_ON(grpc_polling_trace)) {
gpr_log(GPR_DEBUG, "%p poll=%d", pollset, r);
@@ -1068,13 +1067,10 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
if (queued_work || worker.kicked_specifically) {
/* If there's queued work on the list, then set the deadline to be
immediate so we get back out of the polling loop quickly */
- deadline = gpr_inf_past(GPR_CLOCK_MONOTONIC);
+ deadline = 0;
}
keep_polling = 1;
}
- if (keep_polling) {
- now = gpr_now(now.clock_type);
- }
}
gpr_tls_set(&g_current_thread_poller, 0);
if (added_worker) {
@@ -1126,21 +1122,14 @@ static void pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
}
}
-static int poll_deadline_to_millis_timeout(gpr_timespec deadline,
- gpr_timespec now) {
- gpr_timespec timeout;
- static const int64_t max_spin_polling_us = 10;
- if (gpr_time_cmp(deadline, gpr_inf_future(deadline.clock_type)) == 0) {
- return -1;
- }
- if (gpr_time_cmp(deadline, gpr_time_add(now, gpr_time_from_micros(
- max_spin_polling_us,
- GPR_TIMESPAN))) <= 0) {
- return 0;
- }
- timeout = gpr_time_sub(deadline, now);
- return gpr_time_to_millis(gpr_time_add(
- timeout, gpr_time_from_nanos(GPR_NS_PER_MS - 1, GPR_TIMESPAN)));
+static int poll_deadline_to_millis_timeout(grpc_exec_ctx *exec_ctx,
+ grpc_millis deadline) {
+ if (deadline == GRPC_MILLIS_INF_FUTURE) return -1;
+ if (deadline == 0) return 0;
+ grpc_millis n = deadline - grpc_exec_ctx_now(exec_ctx);
+ if (n < 0) return 0;
+ if (n > INT_MAX) return -1;
+ return (int)n;
}
/*******************************************************************************
diff --git a/src/core/lib/iomgr/ev_poll_posix.h b/src/core/lib/iomgr/ev_poll_posix.h
index d444e60944..84b68155b5 100644
--- a/src/core/lib/iomgr/ev_poll_posix.h
+++ b/src/core/lib/iomgr/ev_poll_posix.h
@@ -21,7 +21,15 @@
#include "src/core/lib/iomgr/ev_posix.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
const grpc_event_engine_vtable *grpc_init_poll_posix(bool explicit_request);
const grpc_event_engine_vtable *grpc_init_poll_cv_posix(bool explicit_request);
-#endif /* GRPC_CORE_LIB_IOMGR_EV_POLL_POSIX_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_EV_POLL_POSIX_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.cc
index 4d3ae2228e..e4033fab1d 100644
--- a/src/core/lib/iomgr/ev_posix.c
+++ b/src/core/lib/iomgr/ev_posix.cc
@@ -205,9 +205,9 @@ void grpc_pollset_destroy(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) {
}
grpc_error *grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
- grpc_pollset_worker **worker, gpr_timespec now,
- gpr_timespec deadline) {
- return g_event_engine->pollset_work(exec_ctx, pollset, worker, now, deadline);
+ grpc_pollset_worker **worker,
+ grpc_millis deadline) {
+ return g_event_engine->pollset_work(exec_ctx, pollset, worker, deadline);
}
grpc_error *grpc_pollset_kick(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
diff --git a/src/core/lib/iomgr/ev_posix.h b/src/core/lib/iomgr/ev_posix.h
index 1ff2ff1413..955326c5f7 100644
--- a/src/core/lib/iomgr/ev_posix.h
+++ b/src/core/lib/iomgr/ev_posix.h
@@ -27,6 +27,10 @@
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/wakeup_fd_posix.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern grpc_tracer_flag grpc_polling_trace; /* Disabled by default */
typedef struct grpc_fd grpc_fd;
@@ -52,8 +56,8 @@ typedef struct grpc_event_engine_vtable {
grpc_closure *closure);
void (*pollset_destroy)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset);
grpc_error *(*pollset_work)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
- grpc_pollset_worker **worker, gpr_timespec now,
- gpr_timespec deadline);
+ grpc_pollset_worker **worker,
+ grpc_millis deadline);
grpc_error *(*pollset_kick)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
grpc_pollset_worker *specific_worker);
void (*pollset_add_fd)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
@@ -158,4 +162,8 @@ extern grpc_poll_function_type grpc_poll_function;
void grpc_set_event_engine_test_only(const grpc_event_engine_vtable *);
const grpc_event_engine_vtable *grpc_get_event_engine_test_only();
-#endif /* GRPC_CORE_LIB_IOMGR_EV_POSIX_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_EV_POSIX_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/ev_windows.c b/src/core/lib/iomgr/ev_windows.cc
index c24dfaeaf7..c24dfaeaf7 100644
--- a/src/core/lib/iomgr/ev_windows.c
+++ b/src/core/lib/iomgr/ev_windows.cc
diff --git a/src/core/lib/iomgr/exec_ctx.c b/src/core/lib/iomgr/exec_ctx.cc
index 41c69add17..3d17afcb8f 100644
--- a/src/core/lib/iomgr/exec_ctx.c
+++ b/src/core/lib/iomgr/exec_ctx.cc
@@ -104,9 +104,69 @@ static void exec_ctx_sched(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
grpc_closure_list_append(&exec_ctx->closure_list, closure, error);
}
-void grpc_exec_ctx_global_init(void) {}
+static gpr_timespec
+ g_start_time[GPR_TIMESPAN + 1]; // assumes GPR_TIMESPAN is the
+ // last enum value in
+ // gpr_clock_type
+
+void grpc_exec_ctx_global_init(void) {
+ for (int i = 0; i < GPR_TIMESPAN; i++) {
+ g_start_time[i] = gpr_now((gpr_clock_type)i);
+ }
+ // allows uniform treatment in conversion functions
+ g_start_time[GPR_TIMESPAN] = gpr_time_0(GPR_TIMESPAN);
+}
+
void grpc_exec_ctx_global_shutdown(void) {}
+static gpr_atm timespec_to_atm_round_down(gpr_timespec ts) {
+ ts = gpr_time_sub(ts, g_start_time[ts.clock_type]);
+ double x =
+ GPR_MS_PER_SEC * (double)ts.tv_sec + (double)ts.tv_nsec / GPR_NS_PER_MS;
+ if (x < 0) return 0;
+ if (x > GPR_ATM_MAX) return GPR_ATM_MAX;
+ return (gpr_atm)x;
+}
+
+static gpr_atm timespec_to_atm_round_up(gpr_timespec ts) {
+ ts = gpr_time_sub(ts, g_start_time[ts.clock_type]);
+ double x = GPR_MS_PER_SEC * (double)ts.tv_sec +
+ (double)ts.tv_nsec / GPR_NS_PER_MS +
+ (double)(GPR_NS_PER_SEC - 1) / (double)GPR_NS_PER_SEC;
+ if (x < 0) return 0;
+ if (x > GPR_ATM_MAX) return GPR_ATM_MAX;
+ return (gpr_atm)x;
+}
+
+grpc_millis grpc_exec_ctx_now(grpc_exec_ctx *exec_ctx) {
+ if (!exec_ctx->now_is_valid) {
+ exec_ctx->now = timespec_to_atm_round_down(gpr_now(GPR_CLOCK_MONOTONIC));
+ exec_ctx->now_is_valid = true;
+ }
+ return exec_ctx->now;
+}
+
+void grpc_exec_ctx_invalidate_now(grpc_exec_ctx *exec_ctx) {
+ exec_ctx->now_is_valid = false;
+}
+
+gpr_timespec grpc_millis_to_timespec(grpc_millis millis,
+ gpr_clock_type clock_type) {
+ if (clock_type == GPR_TIMESPAN) {
+ return gpr_time_from_millis(millis, GPR_TIMESPAN);
+ }
+ return gpr_time_add(g_start_time[clock_type],
+ gpr_time_from_millis(millis, GPR_TIMESPAN));
+}
+
+grpc_millis grpc_timespec_to_millis_round_down(gpr_timespec ts) {
+ return timespec_to_atm_round_down(ts);
+}
+
+grpc_millis grpc_timespec_to_millis_round_up(gpr_timespec ts) {
+ return timespec_to_atm_round_up(ts);
+}
+
static const grpc_closure_scheduler_vtable exec_ctx_scheduler_vtable = {
exec_ctx_run, exec_ctx_sched, "exec_ctx"};
static grpc_closure_scheduler exec_ctx_scheduler = {&exec_ctx_scheduler_vtable};
diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h
index c89792c8c4..44b9be7aa9 100644
--- a/src/core/lib/iomgr/exec_ctx.h
+++ b/src/core/lib/iomgr/exec_ctx.h
@@ -19,10 +19,19 @@
#ifndef GRPC_CORE_LIB_IOMGR_EXEC_CTX_H
#define GRPC_CORE_LIB_IOMGR_EXEC_CTX_H
+#include <grpc/support/atm.h>
#include <grpc/support/cpu.h>
+
#include "src/core/lib/iomgr/closure.h"
-/* #define GRPC_EXECUTION_CONTEXT_SANITIZER 1 */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef gpr_atm grpc_millis;
+
+#define GRPC_MILLIS_INF_FUTURE GPR_ATM_MAX
+#define GRPC_MILLIS_INF_PAST GPR_ATM_MIN
/** A workqueue represents a list of work to be executed asynchronously.
Forward declared here to avoid a circular dependency with workqueue.h. */
@@ -66,6 +75,9 @@ struct grpc_exec_ctx {
unsigned starting_cpu;
void *check_ready_to_finish_arg;
bool (*check_ready_to_finish)(grpc_exec_ctx *exec_ctx, void *arg);
+
+ bool now_is_valid;
+ grpc_millis now;
};
/* initializer for grpc_exec_ctx:
@@ -73,7 +85,7 @@ struct grpc_exec_ctx {
#define GRPC_EXEC_CTX_INITIALIZER(flags, finish_check, finish_check_arg) \
{ \
GRPC_CLOSURE_LIST_INIT, NULL, NULL, flags, gpr_cpu_current_cpu(), \
- finish_check_arg, finish_check \
+ finish_check_arg, finish_check, false, 0 \
}
/* initialize an execution context at the top level of an API call into grpc
@@ -106,4 +118,14 @@ void grpc_exec_ctx_global_init(void);
void grpc_exec_ctx_global_init(void);
void grpc_exec_ctx_global_shutdown(void);
+grpc_millis grpc_exec_ctx_now(grpc_exec_ctx *exec_ctx);
+void grpc_exec_ctx_invalidate_now(grpc_exec_ctx *exec_ctx);
+gpr_timespec grpc_millis_to_timespec(grpc_millis millis, gpr_clock_type clock);
+grpc_millis grpc_timespec_to_millis_round_down(gpr_timespec timespec);
+grpc_millis grpc_timespec_to_millis_round_up(gpr_timespec timespec);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_IOMGR_EXEC_CTX_H */
diff --git a/src/core/lib/iomgr/executor.c b/src/core/lib/iomgr/executor.cc
index 2439f15a8a..92c3e70301 100644
--- a/src/core/lib/iomgr/executor.c
+++ b/src/core/lib/iomgr/executor.cc
@@ -32,14 +32,16 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/support/spinlock.h"
+#define MAX_DEPTH 2
+
typedef struct {
gpr_mu mu;
gpr_cv cv;
grpc_closure_list elems;
+ size_t depth;
bool shutdown;
bool queued_long_job;
gpr_thd_id id;
- grpc_closure_list local_elems;
} thread_state;
static thread_state *g_thread_state;
@@ -54,35 +56,32 @@ static grpc_tracer_flag executor_trace =
static void executor_thread(void *arg);
-static void run_closures(grpc_exec_ctx *exec_ctx, grpc_closure_list *list) {
- int n = 0; // number of closures executed
+static size_t run_closures(grpc_exec_ctx *exec_ctx, grpc_closure_list list) {
+ size_t n = 0;
- while (!grpc_closure_list_empty(*list)) {
- grpc_closure *c = list->head;
- grpc_closure_list_init(list);
- while (c != NULL) {
- grpc_closure *next = c->next_data.next;
- grpc_error *error = c->error_data.error;
- if (GRPC_TRACER_ON(executor_trace)) {
+ grpc_closure *c = list.head;
+ while (c != NULL) {
+ grpc_closure *next = c->next_data.next;
+ grpc_error *error = c->error_data.error;
+ if (GRPC_TRACER_ON(executor_trace)) {
#ifndef NDEBUG
- gpr_log(GPR_DEBUG, "EXECUTOR: run %p [created by %s:%d]", c,
- c->file_created, c->line_created);
+ gpr_log(GPR_DEBUG, "EXECUTOR: run %p [created by %s:%d]", c,
+ c->file_created, c->line_created);
#else
- gpr_log(GPR_DEBUG, "EXECUTOR: run %p", c);
+ gpr_log(GPR_DEBUG, "EXECUTOR: run %p", c);
#endif
- }
+ }
#ifndef NDEBUG
- c->scheduled = false;
+ c->scheduled = false;
#endif
- n++;
- c->cb(exec_ctx, c->cb_arg, error);
- GRPC_ERROR_UNREF(error);
- c = next;
- grpc_exec_ctx_flush(exec_ctx);
- }
+ c->cb(exec_ctx, c->cb_arg, error);
+ GRPC_ERROR_UNREF(error);
+ c = next;
+ n++;
+ grpc_exec_ctx_flush(exec_ctx);
}
- GRPC_STATS_INC_EXECUTOR_CLOSURES_PER_WAKEUP(exec_ctx, n);
+ return n;
}
bool grpc_executor_is_threaded() {
@@ -101,7 +100,7 @@ void grpc_executor_set_threading(grpc_exec_ctx *exec_ctx, bool threading) {
for (size_t i = 0; i < g_max_threads; i++) {
gpr_mu_init(&g_thread_state[i].mu);
gpr_cv_init(&g_thread_state[i].cv);
- g_thread_state[i].elems = (grpc_closure_list)GRPC_CLOSURE_LIST_INIT;
+ g_thread_state[i].elems = GRPC_CLOSURE_LIST_INIT;
}
gpr_thd_options opt = gpr_thd_options_default();
@@ -127,7 +126,7 @@ void grpc_executor_set_threading(grpc_exec_ctx *exec_ctx, bool threading) {
for (size_t i = 0; i < g_max_threads; i++) {
gpr_mu_destroy(&g_thread_state[i].mu);
gpr_cv_destroy(&g_thread_state[i].cv);
- run_closures(exec_ctx, &g_thread_state[i].elems);
+ run_closures(exec_ctx, g_thread_state[i].elems);
}
gpr_free(g_thread_state);
gpr_tls_destroy(&g_this_thread_state);
@@ -151,14 +150,14 @@ static void executor_thread(void *arg) {
grpc_exec_ctx exec_ctx =
GRPC_EXEC_CTX_INITIALIZER(0, grpc_never_ready_to_finish, NULL);
- GRPC_STATS_INC_EXECUTOR_THREADS_CREATED(&exec_ctx);
-
- bool used = false;
+ size_t subtract_depth = 0;
for (;;) {
if (GRPC_TRACER_ON(executor_trace)) {
- gpr_log(GPR_DEBUG, "EXECUTOR[%d]: step", (int)(ts - g_thread_state));
+ gpr_log(GPR_DEBUG, "EXECUTOR[%d]: step (sub_depth=%" PRIdPTR ")",
+ (int)(ts - g_thread_state), subtract_depth);
}
gpr_mu_lock(&ts->mu);
+ ts->depth -= subtract_depth;
while (grpc_closure_list_empty(ts->elems) && !ts->shutdown) {
ts->queued_long_job = false;
gpr_cv_wait(&ts->cv, &ts->mu, gpr_inf_future(GPR_CLOCK_REALTIME));
@@ -171,20 +170,16 @@ static void executor_thread(void *arg) {
gpr_mu_unlock(&ts->mu);
break;
}
- if (!used) {
- GRPC_STATS_INC_EXECUTOR_THREADS_USED(&exec_ctx);
- used = true;
- }
GRPC_STATS_INC_EXECUTOR_QUEUE_DRAINED(&exec_ctx);
- GPR_ASSERT(grpc_closure_list_empty(ts->local_elems));
- ts->local_elems = ts->elems;
- ts->elems = (grpc_closure_list)GRPC_CLOSURE_LIST_INIT;
+ grpc_closure_list exec = ts->elems;
+ ts->elems = GRPC_CLOSURE_LIST_INIT;
gpr_mu_unlock(&ts->mu);
if (GRPC_TRACER_ON(executor_trace)) {
gpr_log(GPR_DEBUG, "EXECUTOR[%d]: execute", (int)(ts - g_thread_state));
}
- run_closures(&exec_ctx, &ts->local_elems);
+ grpc_exec_ctx_invalidate_now(&exec_ctx);
+ subtract_depth = run_closures(&exec_ctx, exec);
}
grpc_exec_ctx_finish(&exec_ctx);
}
@@ -217,10 +212,6 @@ static void executor_push(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
ts = &g_thread_state[GPR_HASH_POINTER(exec_ctx, cur_thread_count)];
} else {
GRPC_STATS_INC_EXECUTOR_SCHEDULED_TO_SELF(exec_ctx);
- if (is_short) {
- grpc_closure_list_append(&ts->local_elems, closure, error);
- return;
- }
}
thread_state *orig_ts = ts;
@@ -260,7 +251,8 @@ static void executor_push(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
gpr_cv_signal(&ts->cv);
}
grpc_closure_list_append(&ts->elems, closure, error);
- try_new_thread = ts->elems.head != closure &&
+ ts->depth++;
+ try_new_thread = ts->depth > MAX_DEPTH &&
cur_thread_count < g_max_threads && !ts->shutdown;
if (!is_short) ts->queued_long_job = true;
gpr_mu_unlock(&ts->mu);
diff --git a/src/core/lib/iomgr/executor.h b/src/core/lib/iomgr/executor.h
index 0412c02790..ab3fc901de 100644
--- a/src/core/lib/iomgr/executor.h
+++ b/src/core/lib/iomgr/executor.h
@@ -21,6 +21,10 @@
#include "src/core/lib/iomgr/closure.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum {
GRPC_EXECUTOR_SHORT,
GRPC_EXECUTOR_LONG
@@ -45,4 +49,8 @@ bool grpc_executor_is_threaded();
grpc_executor_shutdown */
void grpc_executor_set_threading(grpc_exec_ctx *exec_ctx, bool enable);
-#endif /* GRPC_CORE_LIB_IOMGR_EXECUTOR_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_EXECUTOR_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/gethostname.h b/src/core/lib/iomgr/gethostname.h
index 9c6b9d8d42..f335fea586 100644
--- a/src/core/lib/iomgr/gethostname.h
+++ b/src/core/lib/iomgr/gethostname.h
@@ -19,8 +19,16 @@
#ifndef GRPC_CORE_LIB_IOMGR_GETHOSTNAME_H
#define GRPC_CORE_LIB_IOMGR_GETHOSTNAME_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// Returns the hostname of the local machine.
// Caller takes ownership of result.
char *grpc_gethostname();
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_IOMGR_GETHOSTNAME_H */
diff --git a/src/core/lib/iomgr/gethostname_fallback.c b/src/core/lib/iomgr/gethostname_fallback.cc
index 6229461568..e6f4c2f760 100644
--- a/src/core/lib/iomgr/gethostname_fallback.c
+++ b/src/core/lib/iomgr/gethostname_fallback.cc
@@ -16,6 +16,7 @@
*
*/
+#include "src/core/lib/iomgr/gethostname.h"
#include "src/core/lib/iomgr/port.h"
#ifdef GRPC_GETHOSTNAME_FALLBACK
diff --git a/src/core/lib/iomgr/gethostname_host_name_max.c b/src/core/lib/iomgr/gethostname_host_name_max.cc
index 4d0511412e..cdaf097c3e 100644
--- a/src/core/lib/iomgr/gethostname_host_name_max.c
+++ b/src/core/lib/iomgr/gethostname_host_name_max.cc
@@ -16,6 +16,7 @@
*
*/
+#include "src/core/lib/iomgr/gethostname.h"
#include "src/core/lib/iomgr/port.h"
#ifdef GRPC_POSIX_HOST_NAME_MAX
diff --git a/src/core/lib/iomgr/gethostname_sysconf.c b/src/core/lib/iomgr/gethostname_sysconf.cc
index 51bac5d69d..8441e0615e 100644
--- a/src/core/lib/iomgr/gethostname_sysconf.c
+++ b/src/core/lib/iomgr/gethostname_sysconf.cc
@@ -16,6 +16,7 @@
*
*/
+#include "src/core/lib/iomgr/gethostname.h"
#include "src/core/lib/iomgr/port.h"
#ifdef GRPC_POSIX_SYSCONF
diff --git a/src/core/lib/iomgr/iocp_windows.c b/src/core/lib/iomgr/iocp_windows.cc
index c082179c0b..336cc86c75 100644
--- a/src/core/lib/iomgr/iocp_windows.c
+++ b/src/core/lib/iomgr/iocp_windows.cc
@@ -26,6 +26,7 @@
#include <grpc/support/log.h>
#include <grpc/support/log_windows.h>
#include <grpc/support/thd.h>
+#include <grpc/support/useful.h>
#include "src/core/lib/debug/stats.h"
#include "src/core/lib/iomgr/iocp_windows.h"
@@ -40,25 +41,17 @@ static gpr_atm g_custom_events = 0;
static HANDLE g_iocp;
-static DWORD deadline_to_millis_timeout(gpr_timespec deadline,
- gpr_timespec now) {
+static DWORD deadline_to_millis_timeout(grpc_exec_ctx *exec_ctx,
+ grpc_millis deadline) {
gpr_timespec timeout;
- static const int64_t max_spin_polling_us = 10;
- if (gpr_time_cmp(deadline, gpr_inf_future(deadline.clock_type)) == 0) {
+ if (deadline == GRPC_MILLIS_INF_FUTURE) {
return INFINITE;
}
- if (gpr_time_cmp(deadline, gpr_time_add(now, gpr_time_from_micros(
- max_spin_polling_us,
- GPR_TIMESPAN))) <= 0) {
- return 0;
- }
- timeout = gpr_time_sub(deadline, now);
- return (DWORD)gpr_time_to_millis(gpr_time_add(
- timeout, gpr_time_from_nanos(GPR_NS_PER_MS - 1, GPR_TIMESPAN)));
+ return (DWORD)GPR_MAX(0, deadline - grpc_exec_ctx_now(exec_ctx));
}
grpc_iocp_work_status grpc_iocp_work(grpc_exec_ctx *exec_ctx,
- gpr_timespec deadline) {
+ grpc_millis deadline) {
BOOL success;
DWORD bytes = 0;
DWORD flags = 0;
@@ -67,9 +60,9 @@ grpc_iocp_work_status grpc_iocp_work(grpc_exec_ctx *exec_ctx,
grpc_winsocket *socket;
grpc_winsocket_callback_info *info;
GRPC_STATS_INC_SYSCALL_POLL(exec_ctx);
- success = GetQueuedCompletionStatus(
- g_iocp, &bytes, &completion_key, &overlapped,
- deadline_to_millis_timeout(deadline, gpr_now(deadline.clock_type)));
+ success =
+ GetQueuedCompletionStatus(g_iocp, &bytes, &completion_key, &overlapped,
+ deadline_to_millis_timeout(exec_ctx, deadline));
if (success == 0 && overlapped == NULL) {
return GRPC_IOCP_WORK_TIMEOUT;
}
@@ -121,7 +114,7 @@ void grpc_iocp_flush(void) {
grpc_iocp_work_status work_status;
do {
- work_status = grpc_iocp_work(&exec_ctx, gpr_inf_past(GPR_CLOCK_MONOTONIC));
+ work_status = grpc_iocp_work(&exec_ctx, GRPC_MILLIS_INF_PAST);
} while (work_status == GRPC_IOCP_WORK_KICK ||
grpc_exec_ctx_flush(&exec_ctx));
}
@@ -129,7 +122,7 @@ void grpc_iocp_flush(void) {
void grpc_iocp_shutdown(void) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
while (gpr_atm_acq_load(&g_custom_events)) {
- grpc_iocp_work(&exec_ctx, gpr_inf_future(GPR_CLOCK_MONOTONIC));
+ grpc_iocp_work(&exec_ctx, GRPC_MILLIS_INF_FUTURE);
grpc_exec_ctx_flush(&exec_ctx);
}
grpc_exec_ctx_finish(&exec_ctx);
diff --git a/src/core/lib/iomgr/iocp_windows.h b/src/core/lib/iomgr/iocp_windows.h
index 9c89e868c5..aefe7a294a 100644
--- a/src/core/lib/iomgr/iocp_windows.h
+++ b/src/core/lib/iomgr/iocp_windows.h
@@ -23,6 +23,10 @@
#include "src/core/lib/iomgr/socket_windows.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum {
GRPC_IOCP_WORK_WORK,
GRPC_IOCP_WORK_TIMEOUT,
@@ -30,11 +34,15 @@ typedef enum {
} grpc_iocp_work_status;
grpc_iocp_work_status grpc_iocp_work(grpc_exec_ctx *exec_ctx,
- gpr_timespec deadline);
+ grpc_millis deadline);
void grpc_iocp_init(void);
void grpc_iocp_kick(void);
void grpc_iocp_flush(void);
void grpc_iocp_shutdown(void);
void grpc_iocp_add_socket(grpc_winsocket *);
-#endif /* GRPC_CORE_LIB_IOMGR_IOCP_WINDOWS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_IOCP_WINDOWS_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/iomgr.c b/src/core/lib/iomgr/iomgr.cc
index f63f190155..d6a5b4a76c 100644
--- a/src/core/lib/iomgr/iomgr.c
+++ b/src/core/lib/iomgr/iomgr.cc
@@ -16,8 +16,11 @@
*
*/
+#include <grpc/support/port_platform.h>
+
#include "src/core/lib/iomgr/iomgr.h"
+#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
@@ -48,7 +51,7 @@ void grpc_iomgr_init(grpc_exec_ctx *exec_ctx) {
gpr_cv_init(&g_rcv);
grpc_exec_ctx_global_init();
grpc_executor_init(exec_ctx);
- grpc_timer_list_init(gpr_now(GPR_CLOCK_MONOTONIC));
+ grpc_timer_list_init(exec_ctx);
g_root_object.next = g_root_object.prev = &g_root_object;
g_root_object.name = (char *)"root";
grpc_network_status_init();
@@ -95,8 +98,9 @@ void grpc_iomgr_shutdown(grpc_exec_ctx *exec_ctx) {
}
last_warning_time = gpr_now(GPR_CLOCK_REALTIME);
}
- if (grpc_timer_check(exec_ctx, gpr_inf_future(GPR_CLOCK_MONOTONIC), NULL) ==
- GRPC_TIMERS_FIRED) {
+ exec_ctx->now_is_valid = true;
+ exec_ctx->now = GRPC_MILLIS_INF_FUTURE;
+ if (grpc_timer_check(exec_ctx, NULL) == GRPC_TIMERS_FIRED) {
gpr_mu_unlock(&g_mu);
grpc_exec_ctx_flush(exec_ctx);
grpc_iomgr_platform_flush();
diff --git a/src/core/lib/iomgr/iomgr.h b/src/core/lib/iomgr/iomgr.h
index e3cd6ebe79..fea08496fe 100644
--- a/src/core/lib/iomgr/iomgr.h
+++ b/src/core/lib/iomgr/iomgr.h
@@ -22,6 +22,10 @@
#include <grpc/impl/codegen/exec_ctx_fwd.h>
#include "src/core/lib/iomgr/port.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** Initializes the iomgr. */
void grpc_iomgr_init(grpc_exec_ctx *exec_ctx);
@@ -32,4 +36,8 @@ void grpc_iomgr_start(grpc_exec_ctx *exec_ctx);
* exec_ctx. */
void grpc_iomgr_shutdown(grpc_exec_ctx *exec_ctx);
-#endif /* GRPC_CORE_LIB_IOMGR_IOMGR_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_IOMGR_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/iomgr_internal.h b/src/core/lib/iomgr/iomgr_internal.h
index 836d82515d..005abbed13 100644
--- a/src/core/lib/iomgr/iomgr_internal.h
+++ b/src/core/lib/iomgr/iomgr_internal.h
@@ -23,6 +23,10 @@
#include "src/core/lib/iomgr/iomgr.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_iomgr_object {
char *name;
struct grpc_iomgr_object *next;
@@ -40,4 +44,8 @@ void grpc_iomgr_platform_shutdown(void);
bool grpc_iomgr_abort_on_leaks(void);
-#endif /* GRPC_CORE_LIB_IOMGR_IOMGR_INTERNAL_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_IOMGR_INTERNAL_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/iomgr_posix.c b/src/core/lib/iomgr/iomgr_posix.cc
index f5875a247e..f5875a247e 100644
--- a/src/core/lib/iomgr/iomgr_posix.c
+++ b/src/core/lib/iomgr/iomgr_posix.cc
diff --git a/src/core/lib/iomgr/iomgr_uv.c b/src/core/lib/iomgr/iomgr_uv.cc
index df5d23af3b..df5d23af3b 100644
--- a/src/core/lib/iomgr/iomgr_uv.c
+++ b/src/core/lib/iomgr/iomgr_uv.cc
diff --git a/src/core/lib/iomgr/iomgr_uv.h b/src/core/lib/iomgr/iomgr_uv.h
index 3b4daaa73b..bc42ca8c1c 100644
--- a/src/core/lib/iomgr/iomgr_uv.h
+++ b/src/core/lib/iomgr/iomgr_uv.h
@@ -23,10 +23,18 @@
#include <grpc/support/thd.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* The thread ID of the thread on which grpc was initialized. Used to verify
* that all calls into libuv are made on that same thread */
extern gpr_thd_id g_init_thread;
+#ifdef __cplusplus
+}
+#endif
+
#ifdef GRPC_UV_THREAD_CHECK
#define GRPC_UV_ASSERT_SAME_THREAD() \
GPR_ASSERT(gpr_thd_currentid() == g_init_thread)
diff --git a/src/core/lib/iomgr/iomgr_windows.c b/src/core/lib/iomgr/iomgr_windows.cc
index 630370166d..630370166d 100644
--- a/src/core/lib/iomgr/iomgr_windows.c
+++ b/src/core/lib/iomgr/iomgr_windows.cc
diff --git a/src/core/lib/iomgr/is_epollexclusive_available.c b/src/core/lib/iomgr/is_epollexclusive_available.cc
index d08844c0df..d08844c0df 100644
--- a/src/core/lib/iomgr/is_epollexclusive_available.c
+++ b/src/core/lib/iomgr/is_epollexclusive_available.cc
diff --git a/src/core/lib/iomgr/is_epollexclusive_available.h b/src/core/lib/iomgr/is_epollexclusive_available.h
index 1d2e133a3b..5c3e483065 100644
--- a/src/core/lib/iomgr/is_epollexclusive_available.h
+++ b/src/core/lib/iomgr/is_epollexclusive_available.h
@@ -21,6 +21,14 @@
#include <stdbool.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
bool grpc_is_epollexclusive_available(void);
-#endif /* GRPC_CORE_LIB_IOMGR_IS_EPOLLEXCLUSIVE_AVAILABLE_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_IS_EPOLLEXCLUSIVE_AVAILABLE_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/load_file.c b/src/core/lib/iomgr/load_file.cc
index 0b4d41ea4b..5cb4099ea4 100644
--- a/src/core/lib/iomgr/load_file.c
+++ b/src/core/lib/iomgr/load_file.cc
@@ -25,7 +25,7 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
-#include "src/core/lib/support/block_annotate.h"
+#include "src/core/lib/iomgr/block_annotate.h"
#include "src/core/lib/support/string.h"
grpc_error *grpc_load_file(const char *filename, int add_null_terminator,
@@ -73,6 +73,6 @@ end:
GRPC_ERROR_UNREF(error);
error = error_out;
}
- GRPC_SCHEDULING_END_BLOCKING_REGION;
+ GRPC_SCHEDULING_END_BLOCKING_REGION_NO_EXEC_CTX;
return error;
}
diff --git a/src/core/lib/iomgr/lockfree_event.c b/src/core/lib/iomgr/lockfree_event.cc
index f967b22ba9..f967b22ba9 100644
--- a/src/core/lib/iomgr/lockfree_event.c
+++ b/src/core/lib/iomgr/lockfree_event.cc
diff --git a/src/core/lib/iomgr/lockfree_event.h b/src/core/lib/iomgr/lockfree_event.h
index 6a14a0f3b2..925f004945 100644
--- a/src/core/lib/iomgr/lockfree_event.h
+++ b/src/core/lib/iomgr/lockfree_event.h
@@ -25,6 +25,10 @@
#include "src/core/lib/iomgr/exec_ctx.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void grpc_lfev_init(gpr_atm *state);
void grpc_lfev_destroy(gpr_atm *state);
bool grpc_lfev_is_shutdown(gpr_atm *state);
@@ -37,4 +41,8 @@ bool grpc_lfev_set_shutdown(grpc_exec_ctx *exec_ctx, gpr_atm *state,
void grpc_lfev_set_ready(grpc_exec_ctx *exec_ctx, gpr_atm *state,
const char *variable);
-#endif /* GRPC_CORE_LIB_IOMGR_LOCKFREE_EVENT_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_LOCKFREE_EVENT_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/network_status_tracker.c b/src/core/lib/iomgr/network_status_tracker.cc
index 4e5c1d5408..57a7faa9f1 100644
--- a/src/core/lib/iomgr/network_status_tracker.c
+++ b/src/core/lib/iomgr/network_status_tracker.cc
@@ -16,6 +16,7 @@
*
*/
+#include "src/core/lib/iomgr/network_status_tracker.h"
#include "src/core/lib/iomgr/endpoint.h"
void grpc_network_status_shutdown(void) {}
diff --git a/src/core/lib/iomgr/network_status_tracker.h b/src/core/lib/iomgr/network_status_tracker.h
index c0295c1f74..af50d51257 100644
--- a/src/core/lib/iomgr/network_status_tracker.h
+++ b/src/core/lib/iomgr/network_status_tracker.h
@@ -20,6 +20,10 @@
#define GRPC_CORE_LIB_IOMGR_NETWORK_STATUS_TRACKER_H
#include "src/core/lib/iomgr/endpoint.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void grpc_network_status_init(void);
void grpc_network_status_shutdown(void);
@@ -27,4 +31,8 @@ void grpc_network_status_register_endpoint(grpc_endpoint *ep);
void grpc_network_status_unregister_endpoint(grpc_endpoint *ep);
void grpc_network_status_shutdown_all_endpoints();
-#endif /* GRPC_CORE_LIB_IOMGR_NETWORK_STATUS_TRACKER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_NETWORK_STATUS_TRACKER_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/polling_entity.c b/src/core/lib/iomgr/polling_entity.cc
index 8591a5518e..8591a5518e 100644
--- a/src/core/lib/iomgr/polling_entity.c
+++ b/src/core/lib/iomgr/polling_entity.cc
diff --git a/src/core/lib/iomgr/polling_entity.h b/src/core/lib/iomgr/polling_entity.h
index a161e1fea6..4a37acf212 100644
--- a/src/core/lib/iomgr/polling_entity.h
+++ b/src/core/lib/iomgr/polling_entity.h
@@ -22,6 +22,10 @@
#include "src/core/lib/iomgr/pollset.h"
#include "src/core/lib/iomgr/pollset_set.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum grpc_pollset_tag {
GRPC_POLLS_NONE,
GRPC_POLLS_POLLSET,
@@ -64,4 +68,8 @@ void grpc_polling_entity_add_to_pollset_set(grpc_exec_ctx *exec_ctx,
void grpc_polling_entity_del_from_pollset_set(grpc_exec_ctx *exec_ctx,
grpc_polling_entity *pollent,
grpc_pollset_set *pss_dst);
-#endif /* GRPC_CORE_LIB_IOMGR_POLLING_ENTITY_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_POLLING_ENTITY_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/pollset.h b/src/core/lib/iomgr/pollset.h
index a0f6b3a9d3..799fae154c 100644
--- a/src/core/lib/iomgr/pollset.h
+++ b/src/core/lib/iomgr/pollset.h
@@ -25,6 +25,10 @@
#include "src/core/lib/iomgr/exec_ctx.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef NDEBUG
extern grpc_tracer_flag grpc_trace_fd_refcount;
#endif
@@ -71,8 +75,8 @@ void grpc_pollset_destroy(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset);
pollset
lock */
grpc_error *grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
- grpc_pollset_worker **worker, gpr_timespec now,
- gpr_timespec deadline) GRPC_MUST_USE_RESULT;
+ grpc_pollset_worker **worker,
+ grpc_millis deadline) GRPC_MUST_USE_RESULT;
/* Break one polling thread out of polling work for this pollset.
If specific_worker is non-NULL, then kick that worker. */
@@ -80,4 +84,8 @@ grpc_error *grpc_pollset_kick(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
grpc_pollset_worker *specific_worker)
GRPC_MUST_USE_RESULT;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_H */
diff --git a/src/core/lib/iomgr/pollset_set.h b/src/core/lib/iomgr/pollset_set.h
index 29c0f03561..17df86542d 100644
--- a/src/core/lib/iomgr/pollset_set.h
+++ b/src/core/lib/iomgr/pollset_set.h
@@ -21,6 +21,10 @@
#include "src/core/lib/iomgr/pollset.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* A grpc_pollset_set is a set of pollsets that are interested in an
action. Adding a pollset to a pollset_set automatically adds any
fd's (etc) that have been registered with the set_set to that pollset.
@@ -44,4 +48,8 @@ void grpc_pollset_set_del_pollset_set(grpc_exec_ctx *exec_ctx,
grpc_pollset_set *bag,
grpc_pollset_set *item);
-#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_SET_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_SET_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/pollset_set_uv.c b/src/core/lib/iomgr/pollset_set_uv.cc
index 90186edbb7..90186edbb7 100644
--- a/src/core/lib/iomgr/pollset_set_uv.c
+++ b/src/core/lib/iomgr/pollset_set_uv.cc
diff --git a/src/core/lib/iomgr/pollset_set_windows.c b/src/core/lib/iomgr/pollset_set_windows.cc
index 2105a47ad4..2105a47ad4 100644
--- a/src/core/lib/iomgr/pollset_set_windows.c
+++ b/src/core/lib/iomgr/pollset_set_windows.cc
diff --git a/src/core/lib/iomgr/pollset_uv.c b/src/core/lib/iomgr/pollset_uv.cc
index 2651325e25..b9901bf8ef 100644
--- a/src/core/lib/iomgr/pollset_uv.c
+++ b/src/core/lib/iomgr/pollset_uv.cc
@@ -65,7 +65,7 @@ void dummy_handle_close_cb(uv_handle_t *handle) { gpr_free(handle); }
void grpc_pollset_global_init(void) {
gpr_mu_init(&grpc_polling_mu);
- dummy_uv_handle = gpr_malloc(sizeof(uv_timer_t));
+ dummy_uv_handle = (uv_timer_t *)gpr_malloc(sizeof(uv_timer_t));
uv_timer_init(uv_default_loop(), dummy_uv_handle);
grpc_pollset_work_run_loop = 1;
}
@@ -116,13 +116,14 @@ void grpc_pollset_destroy(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) {
grpc_error *grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
grpc_pollset_worker **worker_hdl,
- gpr_timespec now, gpr_timespec deadline) {
+ grpc_millis deadline) {
uint64_t timeout;
GRPC_UV_ASSERT_SAME_THREAD();
gpr_mu_unlock(&grpc_polling_mu);
if (grpc_pollset_work_run_loop) {
- if (gpr_time_cmp(deadline, now) >= 0) {
- timeout = (uint64_t)gpr_time_to_millis(gpr_time_sub(deadline, now));
+ grpc_millis now = grpc_exec_ctx_now(exec_ctx);
+ if (deadline >= now) {
+ timeout = deadline - now;
} else {
timeout = 0;
}
diff --git a/src/core/lib/iomgr/pollset_uv.h b/src/core/lib/iomgr/pollset_uv.h
index 566c110ca6..d8f72ff867 100644
--- a/src/core/lib/iomgr/pollset_uv.h
+++ b/src/core/lib/iomgr/pollset_uv.h
@@ -19,9 +19,17 @@
#ifndef GRPC_CORE_LIB_IOMGR_POLLSET_UV_H
#define GRPC_CORE_LIB_IOMGR_POLLSET_UV_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern int grpc_pollset_work_run_loop;
void grpc_pollset_global_init(void);
void grpc_pollset_global_shutdown(void);
-#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_UV_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_UV_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/pollset_windows.c b/src/core/lib/iomgr/pollset_windows.cc
index eb295d3eeb..bb4df83fc1 100644
--- a/src/core/lib/iomgr/pollset_windows.c
+++ b/src/core/lib/iomgr/pollset_windows.cc
@@ -110,7 +110,7 @@ void grpc_pollset_destroy(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) {}
grpc_error *grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
grpc_pollset_worker **worker_hdl,
- gpr_timespec now, gpr_timespec deadline) {
+ grpc_millis deadline) {
grpc_pollset_worker worker;
if (worker_hdl) *worker_hdl = &worker;
@@ -159,7 +159,8 @@ grpc_error *grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
&worker);
added_worker = 1;
while (!worker.kicked) {
- if (gpr_cv_wait(&worker.cv, &grpc_polling_mu, deadline)) {
+ if (gpr_cv_wait(&worker.cv, &grpc_polling_mu,
+ grpc_millis_to_timespec(deadline, GPR_CLOCK_REALTIME))) {
break;
}
}
diff --git a/src/core/lib/iomgr/pollset_windows.h b/src/core/lib/iomgr/pollset_windows.h
index 71878c3d30..7733d26471 100644
--- a/src/core/lib/iomgr/pollset_windows.h
+++ b/src/core/lib/iomgr/pollset_windows.h
@@ -23,6 +23,10 @@
#include "src/core/lib/iomgr/socket_windows.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* There isn't really any such thing as a pollset under Windows, due to the
nature of the IO completion ports. A Windows "pollset" is merely a mutex
used to synchronize with the IOCP, and workers are condition variables
@@ -60,4 +64,8 @@ struct grpc_pollset {
void grpc_pollset_global_init(void);
void grpc_pollset_global_shutdown(void);
-#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_WINDOWS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_WINDOWS_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/resolve_address.h b/src/core/lib/iomgr/resolve_address.h
index fe1dd78576..4a6df2cf26 100644
--- a/src/core/lib/iomgr/resolve_address.h
+++ b/src/core/lib/iomgr/resolve_address.h
@@ -25,6 +25,10 @@
#define GRPC_MAX_SOCKADDR_SIZE 128
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct {
char addr[GRPC_MAX_SOCKADDR_SIZE];
size_t len;
@@ -52,4 +56,8 @@ extern grpc_error *(*grpc_blocking_resolve_address)(
const char *name, const char *default_port,
grpc_resolved_addresses **addresses);
-#endif /* GRPC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/resolve_address_posix.c b/src/core/lib/iomgr/resolve_address_posix.cc
index 60cfeebd47..1b783495df 100644
--- a/src/core/lib/iomgr/resolve_address_posix.c
+++ b/src/core/lib/iomgr/resolve_address_posix.cc
@@ -33,10 +33,10 @@
#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include <grpc/support/useful.h>
+#include "src/core/lib/iomgr/block_annotate.h"
#include "src/core/lib/iomgr/executor.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
#include "src/core/lib/iomgr/unix_sockets_posix.h"
-#include "src/core/lib/support/block_annotate.h"
#include "src/core/lib/support/string.h"
static grpc_error *blocking_resolve_address_impl(
@@ -81,7 +81,7 @@ static grpc_error *blocking_resolve_address_impl(
GRPC_SCHEDULING_START_BLOCKING_REGION;
s = getaddrinfo(host, port, &hints, &result);
- GRPC_SCHEDULING_END_BLOCKING_REGION;
+ GRPC_SCHEDULING_END_BLOCKING_REGION_NO_EXEC_CTX;
if (s != 0) {
/* Retry if well-known service name is recognized */
@@ -90,7 +90,7 @@ static grpc_error *blocking_resolve_address_impl(
if (strcmp(port, svc[i][0]) == 0) {
GRPC_SCHEDULING_START_BLOCKING_REGION;
s = getaddrinfo(host, svc[i][1], &hints, &result);
- GRPC_SCHEDULING_END_BLOCKING_REGION;
+ GRPC_SCHEDULING_END_BLOCKING_REGION_NO_EXEC_CTX;
break;
}
}
diff --git a/src/core/lib/iomgr/resolve_address_uv.c b/src/core/lib/iomgr/resolve_address_uv.cc
index 2d438e8b48..4f7f234877 100644
--- a/src/core/lib/iomgr/resolve_address_uv.c
+++ b/src/core/lib/iomgr/resolve_address_uv.cc
@@ -49,11 +49,12 @@ static int retry_named_port_failure(int status, request *r,
uv_getaddrinfo_cb getaddrinfo_cb) {
if (status != 0) {
// This loop is copied from resolve_address_posix.c
- char *svc[][2] = {{"http", "80"}, {"https", "443"}};
+ const char *svc[][2] = {{"http", "80"}, {"https", "443"}};
for (size_t i = 0; i < GPR_ARRAY_SIZE(svc); i++) {
if (strcmp(r->port, svc[i][0]) == 0) {
int retry_status;
- uv_getaddrinfo_t *req = gpr_malloc(sizeof(uv_getaddrinfo_t));
+ uv_getaddrinfo_t *req =
+ (uv_getaddrinfo_t *)gpr_malloc(sizeof(uv_getaddrinfo_t));
req->data = r;
r->port = gpr_strdup(svc[i][1]);
retry_status = uv_getaddrinfo(uv_default_loop(), req, getaddrinfo_cb,
@@ -85,13 +86,14 @@ static grpc_error *handle_addrinfo_result(int status, struct addrinfo *result,
grpc_slice_from_static_string(uv_strerror(status)));
return error;
}
- (*addresses) = gpr_malloc(sizeof(grpc_resolved_addresses));
+ (*addresses) =
+ (grpc_resolved_addresses *)gpr_malloc(sizeof(grpc_resolved_addresses));
(*addresses)->naddrs = 0;
for (resp = result; resp != NULL; resp = resp->ai_next) {
(*addresses)->naddrs++;
}
- (*addresses)->addrs =
- gpr_malloc(sizeof(grpc_resolved_address) * (*addresses)->naddrs);
+ (*addresses)->addrs = (grpc_resolved_address *)gpr_malloc(
+ sizeof(grpc_resolved_address) * (*addresses)->naddrs);
i = 0;
for (resp = result; resp != NULL; resp = resp->ai_next) {
memcpy(&(*addresses)->addrs[i].addr, resp->ai_addr, resp->ai_addrlen);
@@ -174,6 +176,7 @@ static grpc_error *blocking_resolve_address_impl(
int s;
grpc_error *err;
int retry_status;
+ request r;
GRPC_UV_ASSERT_SAME_THREAD();
@@ -191,8 +194,10 @@ static grpc_error *blocking_resolve_address_impl(
hints.ai_flags = AI_PASSIVE; /* for wildcard IP address */
s = uv_getaddrinfo(uv_default_loop(), &req, NULL, host, port, &hints);
- request r = {
- .addresses = addresses, .hints = &hints, .host = host, .port = port};
+ r.addresses = addresses;
+ r.hints = &hints;
+ r.host = host;
+ r.port = port;
retry_status = retry_named_port_failure(s, &r, NULL);
if (retry_status <= 0) {
s = retry_status;
@@ -239,16 +244,16 @@ static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name,
gpr_free(port);
return;
}
- r = gpr_malloc(sizeof(request));
+ r = (request *)gpr_malloc(sizeof(request));
r->on_done = on_done;
r->addresses = addrs;
r->host = host;
r->port = port;
- req = gpr_malloc(sizeof(uv_getaddrinfo_t));
+ req = (uv_getaddrinfo_t *)gpr_malloc(sizeof(uv_getaddrinfo_t));
req->data = r;
/* Call getaddrinfo */
- hints = gpr_malloc(sizeof(struct addrinfo));
+ hints = (addrinfo *)gpr_malloc(sizeof(struct addrinfo));
memset(hints, 0, sizeof(struct addrinfo));
hints->ai_family = AF_UNSPEC; /* ipv4 or ipv6 */
hints->ai_socktype = SOCK_STREAM; /* stream socket */
diff --git a/src/core/lib/iomgr/resolve_address_windows.c b/src/core/lib/iomgr/resolve_address_windows.cc
index 0cb0029f4e..451f01a701 100644
--- a/src/core/lib/iomgr/resolve_address_windows.c
+++ b/src/core/lib/iomgr/resolve_address_windows.cc
@@ -23,6 +23,7 @@
#include "src/core/lib/iomgr/resolve_address.h"
+#include <inttypes.h>
#include <string.h>
#include <sys/types.h>
@@ -33,10 +34,10 @@
#include <grpc/support/string_util.h>
#include <grpc/support/thd.h>
#include <grpc/support/time.h>
+#include "src/core/lib/iomgr/block_annotate.h"
#include "src/core/lib/iomgr/executor.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
#include "src/core/lib/iomgr/sockaddr_utils.h"
-#include "src/core/lib/support/block_annotate.h"
#include "src/core/lib/support/string.h"
typedef struct {
@@ -86,20 +87,21 @@ static grpc_error *blocking_resolve_address_impl(
GRPC_SCHEDULING_START_BLOCKING_REGION;
s = getaddrinfo(host, port, &hints, &result);
- GRPC_SCHEDULING_END_BLOCKING_REGION;
+ GRPC_SCHEDULING_END_BLOCKING_REGION_NO_EXEC_CTX;
if (s != 0) {
error = GRPC_WSA_ERROR(WSAGetLastError(), "getaddrinfo");
goto done;
}
/* Success path: set addrs non-NULL, fill it in */
- (*addresses) = gpr_malloc(sizeof(grpc_resolved_addresses));
+ (*addresses) =
+ (grpc_resolved_addresses *)gpr_malloc(sizeof(grpc_resolved_addresses));
(*addresses)->naddrs = 0;
for (resp = result; resp != NULL; resp = resp->ai_next) {
(*addresses)->naddrs++;
}
- (*addresses)->addrs =
- gpr_malloc(sizeof(grpc_resolved_address) * (*addresses)->naddrs);
+ (*addresses)->addrs = (grpc_resolved_address *)gpr_malloc(
+ sizeof(grpc_resolved_address) * (*addresses)->naddrs);
i = 0;
for (resp = result; resp != NULL; resp = resp->ai_next) {
memcpy(&(*addresses)->addrs[i].addr, resp->ai_addr, resp->ai_addrlen);
@@ -132,7 +134,7 @@ grpc_error *(*grpc_blocking_resolve_address)(
* grpc_blocking_resolve_address */
static void do_request_thread(grpc_exec_ctx *exec_ctx, void *rp,
grpc_error *error) {
- request *r = rp;
+ request *r = (request *)rp;
if (error == GRPC_ERROR_NONE) {
error =
grpc_blocking_resolve_address(r->name, r->default_port, r->addresses);
@@ -157,7 +159,7 @@ static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name,
grpc_pollset_set *interested_parties,
grpc_closure *on_done,
grpc_resolved_addresses **addresses) {
- request *r = gpr_malloc(sizeof(request));
+ request *r = (request *)gpr_malloc(sizeof(request));
GRPC_CLOSURE_INIT(&r->request_closure, do_request_thread, r,
grpc_executor_scheduler(GRPC_EXECUTOR_SHORT));
r->name = gpr_strdup(name);
diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.cc
index 4d69986fbc..ecb5747da8 100644
--- a/src/core/lib/iomgr/resource_quota.c
+++ b/src/core/lib/iomgr/resource_quota.cc
@@ -18,6 +18,7 @@
#include "src/core/lib/iomgr/resource_quota.h"
+#include <inttypes.h>
#include <limits.h>
#include <stdint.h>
#include <string.h>
@@ -88,6 +89,8 @@ struct grpc_resource_user {
grpc_closure_list on_allocated;
/* True if we are currently trying to allocate from the quota, false if not */
bool allocating;
+ /* How many bytes of allocations are outstanding */
+ int64_t outstanding_allocations;
/* True if we are currently trying to add ourselves to the non-free quota
list, false otherwise */
bool added_to_free_pool;
@@ -152,6 +155,9 @@ struct grpc_resource_quota {
char *name;
};
+static void ru_unref_by(grpc_exec_ctx *exec_ctx,
+ grpc_resource_user *resource_user, gpr_atm amount);
+
/*******************************************************************************
* list management
*/
@@ -288,6 +294,25 @@ static bool rq_alloc(grpc_exec_ctx *exec_ctx,
while ((resource_user = rulist_pop_head(resource_quota,
GRPC_RULIST_AWAITING_ALLOCATION))) {
gpr_mu_lock(&resource_user->mu);
+ if (GRPC_TRACER_ON(grpc_resource_quota_trace)) {
+ gpr_log(GPR_DEBUG, "RQ: check allocation for user %p shutdown=%" PRIdPTR
+ " free_pool=%" PRId64,
+ resource_user, gpr_atm_no_barrier_load(&resource_user->shutdown),
+ resource_user->free_pool);
+ }
+ if (gpr_atm_no_barrier_load(&resource_user->shutdown)) {
+ resource_user->allocating = false;
+ grpc_closure_list_fail_all(
+ &resource_user->on_allocated,
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("Resource user shutdown"));
+ int64_t aborted_allocations = resource_user->outstanding_allocations;
+ resource_user->outstanding_allocations = 0;
+ resource_user->free_pool += aborted_allocations;
+ GRPC_CLOSURE_LIST_SCHED(exec_ctx, &resource_user->on_allocated);
+ gpr_mu_unlock(&resource_user->mu);
+ ru_unref_by(exec_ctx, resource_user, (gpr_atm)aborted_allocations);
+ continue;
+ }
if (resource_user->free_pool < 0 &&
-resource_user->free_pool <= resource_quota->free_pool) {
int64_t amt = -resource_user->free_pool;
@@ -307,6 +332,7 @@ static bool rq_alloc(grpc_exec_ctx *exec_ctx,
}
if (resource_user->free_pool >= 0) {
resource_user->allocating = false;
+ resource_user->outstanding_allocations = 0;
GRPC_CLOSURE_LIST_SCHED(exec_ctx, &resource_user->on_allocated);
gpr_mu_unlock(&resource_user->mu);
} else {
@@ -487,6 +513,9 @@ static void ru_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *ru,
}
static void ru_shutdown(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) {
+ if (GRPC_TRACER_ON(grpc_resource_quota_trace)) {
+ gpr_log(GPR_DEBUG, "RU shutdown %p", ru);
+ }
grpc_resource_user *resource_user = (grpc_resource_user *)ru;
GRPC_CLOSURE_SCHED(exec_ctx, resource_user->reclaimers[0],
GRPC_ERROR_CANCELLED);
@@ -496,6 +525,9 @@ static void ru_shutdown(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) {
resource_user->reclaimers[1] = NULL;
rulist_remove(resource_user, GRPC_RULIST_RECLAIMER_BENIGN);
rulist_remove(resource_user, GRPC_RULIST_RECLAIMER_DESTRUCTIVE);
+ if (resource_user->allocating) {
+ rq_step_sched(exec_ctx, resource_user->resource_quota);
+ }
}
static void ru_destroy(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) {
@@ -717,6 +749,7 @@ grpc_resource_user *grpc_resource_user_create(
resource_user->reclaimers[1] = NULL;
resource_user->new_reclaimers[0] = NULL;
resource_user->new_reclaimers[1] = NULL;
+ resource_user->outstanding_allocations = 0;
for (int i = 0; i < GRPC_RULIST_COUNT; i++) {
resource_user->links[i].next = resource_user->links[i].prev = NULL;
}
@@ -777,6 +810,7 @@ void grpc_resource_user_alloc(grpc_exec_ctx *exec_ctx,
gpr_mu_lock(&resource_user->mu);
ru_ref_by(resource_user, (gpr_atm)size);
resource_user->free_pool -= (int64_t)size;
+ resource_user->outstanding_allocations += (int64_t)size;
if (GRPC_TRACER_ON(grpc_resource_quota_trace)) {
gpr_log(GPR_DEBUG, "RQ %s %s: alloc %" PRIdPTR "; free_pool -> %" PRId64,
resource_user->resource_quota->name, resource_user->name, size,
@@ -791,6 +825,7 @@ void grpc_resource_user_alloc(grpc_exec_ctx *exec_ctx,
GRPC_ERROR_NONE);
}
} else {
+ resource_user->outstanding_allocations -= (int64_t)size;
GRPC_CLOSURE_SCHED(exec_ctx, optional_on_done, GRPC_ERROR_NONE);
}
gpr_mu_unlock(&resource_user->mu);
diff --git a/src/core/lib/iomgr/resource_quota.h b/src/core/lib/iomgr/resource_quota.h
index d66f9ae774..3afb525434 100644
--- a/src/core/lib/iomgr/resource_quota.h
+++ b/src/core/lib/iomgr/resource_quota.h
@@ -24,6 +24,10 @@
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/iomgr/exec_ctx.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** \file Tracks resource usage against a pool.
The current implementation tracks only memory usage, but in the future
@@ -150,4 +154,8 @@ grpc_slice grpc_resource_user_slice_malloc(grpc_exec_ctx *exec_ctx,
grpc_resource_user *resource_user,
size_t size);
-#endif /* GRPC_CORE_LIB_IOMGR_RESOURCE_QUOTA_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_RESOURCE_QUOTA_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/sockaddr_utils.c b/src/core/lib/iomgr/sockaddr_utils.cc
index 3f4145d104..8a2e6ed89b 100644
--- a/src/core/lib/iomgr/sockaddr_utils.c
+++ b/src/core/lib/iomgr/sockaddr_utils.cc
@@ -19,6 +19,7 @@
#include "src/core/lib/iomgr/sockaddr_utils.h"
#include <errno.h>
+#include <inttypes.h>
#include <string.h>
#include <grpc/support/alloc.h>
diff --git a/src/core/lib/iomgr/sockaddr_utils.h b/src/core/lib/iomgr/sockaddr_utils.h
index a589a19705..129bb54fc9 100644
--- a/src/core/lib/iomgr/sockaddr_utils.h
+++ b/src/core/lib/iomgr/sockaddr_utils.h
@@ -21,6 +21,10 @@
#include "src/core/lib/iomgr/resolve_address.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Returns true if addr is an IPv4-mapped IPv6 address within the
::ffff:0.0.0.0/96 range, or false otherwise.
@@ -77,4 +81,8 @@ const char *grpc_sockaddr_get_uri_scheme(const grpc_resolved_address *addr);
int grpc_sockaddr_get_family(const grpc_resolved_address *resolved_addr);
-#endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_UTILS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_UTILS_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/socket_factory_posix.c b/src/core/lib/iomgr/socket_factory_posix.cc
index 8e907703ae..8e907703ae 100644
--- a/src/core/lib/iomgr/socket_factory_posix.c
+++ b/src/core/lib/iomgr/socket_factory_posix.cc
diff --git a/src/core/lib/iomgr/socket_mutator.c b/src/core/lib/iomgr/socket_mutator.cc
index b0435d5a07..b0435d5a07 100644
--- a/src/core/lib/iomgr/socket_mutator.c
+++ b/src/core/lib/iomgr/socket_mutator.cc
diff --git a/src/core/lib/iomgr/socket_utils.h b/src/core/lib/iomgr/socket_utils.h
index 03fe46e5e9..f319e931b6 100644
--- a/src/core/lib/iomgr/socket_utils.h
+++ b/src/core/lib/iomgr/socket_utils.h
@@ -21,7 +21,15 @@
#include <stddef.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* A wrapper for inet_ntop on POSIX systems and InetNtop on Windows systems */
const char *grpc_inet_ntop(int af, const void *src, char *dst, size_t size);
-#endif /* GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.cc
index b8e2a0cdfd..b8e2a0cdfd 100644
--- a/src/core/lib/iomgr/socket_utils_common_posix.c
+++ b/src/core/lib/iomgr/socket_utils_common_posix.cc
diff --git a/src/core/lib/iomgr/socket_utils_linux.c b/src/core/lib/iomgr/socket_utils_linux.cc
index e7b094d216..e7b094d216 100644
--- a/src/core/lib/iomgr/socket_utils_linux.c
+++ b/src/core/lib/iomgr/socket_utils_linux.cc
diff --git a/src/core/lib/iomgr/socket_utils_posix.c b/src/core/lib/iomgr/socket_utils_posix.cc
index dfd1ffd1e3..dfd1ffd1e3 100644
--- a/src/core/lib/iomgr/socket_utils_posix.c
+++ b/src/core/lib/iomgr/socket_utils_posix.cc
diff --git a/src/core/lib/iomgr/socket_utils_posix.h b/src/core/lib/iomgr/socket_utils_posix.h
index eef80b439e..623b83f08b 100644
--- a/src/core/lib/iomgr/socket_utils_posix.h
+++ b/src/core/lib/iomgr/socket_utils_posix.h
@@ -29,6 +29,10 @@
#include "src/core/lib/iomgr/socket_factory_posix.h"
#include "src/core/lib/iomgr/socket_mutator.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* a wrapper for accept or accept4 */
int grpc_accept4(int sockfd, grpc_resolved_address *resolved_addr, int nonblock,
int cloexec);
@@ -129,4 +133,8 @@ grpc_error *grpc_create_dualstack_socket_using_factory(
grpc_socket_factory *factory, const grpc_resolved_address *addr, int type,
int protocol, grpc_dualstack_mode *dsmode, int *newfd);
-#endif /* GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_POSIX_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_POSIX_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/socket_utils_uv.c b/src/core/lib/iomgr/socket_utils_uv.cc
index 0f7de4dfad..0f7de4dfad 100644
--- a/src/core/lib/iomgr/socket_utils_uv.c
+++ b/src/core/lib/iomgr/socket_utils_uv.cc
diff --git a/src/core/lib/iomgr/socket_utils_windows.c b/src/core/lib/iomgr/socket_utils_windows.cc
index 2732c159aa..6e85e4b61f 100644
--- a/src/core/lib/iomgr/socket_utils_windows.c
+++ b/src/core/lib/iomgr/socket_utils_windows.cc
@@ -26,12 +26,8 @@
#include <grpc/support/log.h>
const char *grpc_inet_ntop(int af, const void *src, char *dst, size_t size) {
-#ifdef GPR_WIN_INET_NTOP
- return inet_ntop(af, src, dst, size);
-#else
/* Windows InetNtopA wants a mutable ip pointer */
return InetNtopA(af, (void *)src, dst, size);
-#endif /* GPR_WIN_INET_NTOP */
}
#endif /* GRPC_WINDOWS_SOCKETUTILS */
diff --git a/src/core/lib/iomgr/socket_windows.c b/src/core/lib/iomgr/socket_windows.cc
index a0d731b942..8c7f7cf683 100644
--- a/src/core/lib/iomgr/socket_windows.c
+++ b/src/core/lib/iomgr/socket_windows.cc
@@ -38,7 +38,7 @@
grpc_winsocket *grpc_winsocket_create(SOCKET socket, const char *name) {
char *final_name;
- grpc_winsocket *r = gpr_malloc(sizeof(grpc_winsocket));
+ grpc_winsocket *r = (grpc_winsocket *)gpr_malloc(sizeof(grpc_winsocket));
memset(r, 0, sizeof(grpc_winsocket));
r->socket = socket;
gpr_mu_init(&r->state_mu);
diff --git a/src/core/lib/iomgr/socket_windows.h b/src/core/lib/iomgr/socket_windows.h
index 67dc4ca53e..a00a7615a3 100644
--- a/src/core/lib/iomgr/socket_windows.h
+++ b/src/core/lib/iomgr/socket_windows.h
@@ -28,6 +28,10 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* This holds the data for an outstanding read or write on a socket.
The mutex to protect the concurrent access to that data is the one
inside the winsocket wrapper. */
@@ -107,4 +111,8 @@ void grpc_socket_become_ready(grpc_exec_ctx *exec_ctx,
grpc_winsocket *winsocket,
grpc_winsocket_callback_info *ci);
-#endif /* GRPC_CORE_LIB_IOMGR_SOCKET_WINDOWS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_SOCKET_WINDOWS_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/tcp_client.h b/src/core/lib/iomgr/tcp_client.h
index 6c9e51ae84..1b102b5784 100644
--- a/src/core/lib/iomgr/tcp_client.h
+++ b/src/core/lib/iomgr/tcp_client.h
@@ -25,6 +25,10 @@
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/resolve_address.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Asynchronously connect to an address (specified as (addr, len)), and call
cb with arg and the completed connection when done (or call cb with arg and
NULL on failure).
@@ -35,6 +39,10 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_connect,
grpc_pollset_set *interested_parties,
const grpc_channel_args *channel_args,
const grpc_resolved_address *addr,
- gpr_timespec deadline);
+ grpc_millis deadline);
+
+#ifdef __cplusplus
+}
+#endif
-#endif /* GRPC_CORE_LIB_IOMGR_TCP_CLIENT_H */
+#endif /* GRPC_CORE_LIB_IOMGR_TCP_CLIENT_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.cc
index 39dbb506e2..5611dd9062 100644
--- a/src/core/lib/iomgr/tcp_client_posix.c
+++ b/src/core/lib/iomgr/tcp_client_posix.cc
@@ -48,7 +48,6 @@ extern grpc_tracer_flag grpc_tcp_trace;
typedef struct {
gpr_mu mu;
grpc_fd *fd;
- gpr_timespec deadline;
grpc_timer alarm;
grpc_closure on_alarm;
int refs;
@@ -244,7 +243,7 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx,
grpc_pollset_set *interested_parties,
const grpc_channel_args *channel_args,
const grpc_resolved_address *addr,
- gpr_timespec deadline) {
+ grpc_millis deadline) {
int fd;
grpc_dualstack_mode dsmode;
int err;
@@ -325,9 +324,7 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx,
gpr_mu_lock(&ac->mu);
GRPC_CLOSURE_INIT(&ac->on_alarm, tc_on_alarm, ac, grpc_schedule_on_exec_ctx);
- grpc_timer_init(exec_ctx, &ac->alarm,
- gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC),
- &ac->on_alarm, gpr_now(GPR_CLOCK_MONOTONIC));
+ grpc_timer_init(exec_ctx, &ac->alarm, deadline, &ac->on_alarm);
grpc_fd_notify_on_write(exec_ctx, ac->fd, &ac->write_closure);
gpr_mu_unlock(&ac->mu);
@@ -337,18 +334,20 @@ done:
}
// overridden by api_fuzzer.c
+extern "C" {
void (*grpc_tcp_client_connect_impl)(
grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep,
grpc_pollset_set *interested_parties, const grpc_channel_args *channel_args,
const grpc_resolved_address *addr,
- gpr_timespec deadline) = tcp_client_connect_impl;
+ grpc_millis deadline) = tcp_client_connect_impl;
+}
void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
grpc_endpoint **ep,
grpc_pollset_set *interested_parties,
const grpc_channel_args *channel_args,
const grpc_resolved_address *addr,
- gpr_timespec deadline) {
+ grpc_millis deadline) {
grpc_tcp_client_connect_impl(exec_ctx, closure, ep, interested_parties,
channel_args, addr, deadline);
}
diff --git a/src/core/lib/iomgr/tcp_client_posix.h b/src/core/lib/iomgr/tcp_client_posix.h
index b5a3814799..0b9775504c 100644
--- a/src/core/lib/iomgr/tcp_client_posix.h
+++ b/src/core/lib/iomgr/tcp_client_posix.h
@@ -23,8 +23,16 @@
#include "src/core/lib/iomgr/ev_posix.h"
#include "src/core/lib/iomgr/tcp_client.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
grpc_endpoint *grpc_tcp_client_create_from_fd(
grpc_exec_ctx *exec_ctx, grpc_fd *fd, const grpc_channel_args *channel_args,
const char *addr_str);
-#endif /* GRPC_CORE_LIB_IOMGR_TCP_CLIENT_POSIX_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_TCP_CLIENT_POSIX_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/tcp_client_uv.c b/src/core/lib/iomgr/tcp_client_uv.cc
index 786c456b73..f3e9366299 100644
--- a/src/core/lib/iomgr/tcp_client_uv.c
+++ b/src/core/lib/iomgr/tcp_client_uv.cc
@@ -58,7 +58,7 @@ static void tcp_close_callback(uv_handle_t *handle) { gpr_free(handle); }
static void uv_tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp,
grpc_error *error) {
int done;
- grpc_uv_tcp_connect *connect = acp;
+ grpc_uv_tcp_connect *connect = (grpc_uv_tcp_connect *)acp;
if (GRPC_TRACER_ON(grpc_tcp_trace)) {
const char *str = grpc_error_string(error);
gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %s: on_alarm: error=%s",
@@ -77,7 +77,7 @@ static void uv_tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp,
}
static void uv_tc_on_connect(uv_connect_t *req, int status) {
- grpc_uv_tcp_connect *connect = req->data;
+ grpc_uv_tcp_connect *connect = (grpc_uv_tcp_connect *)req->data;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_error *error = GRPC_ERROR_NONE;
int done;
@@ -119,7 +119,7 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx,
grpc_pollset_set *interested_parties,
const grpc_channel_args *channel_args,
const grpc_resolved_address *resolved_addr,
- gpr_timespec deadline) {
+ grpc_millis deadline) {
grpc_uv_tcp_connect *connect;
grpc_resource_quota *resource_quota = grpc_resource_quota_create(NULL);
(void)channel_args;
@@ -132,20 +132,20 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx,
if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_RESOURCE_QUOTA)) {
grpc_resource_quota_unref_internal(exec_ctx, resource_quota);
resource_quota = grpc_resource_quota_ref_internal(
- channel_args->args[i].value.pointer.p);
+ (grpc_resource_quota *)channel_args->args[i].value.pointer.p);
}
}
}
- connect = gpr_zalloc(sizeof(grpc_uv_tcp_connect));
+ connect = (grpc_uv_tcp_connect *)gpr_zalloc(sizeof(grpc_uv_tcp_connect));
connect->closure = closure;
connect->endpoint = ep;
- connect->tcp_handle = gpr_malloc(sizeof(uv_tcp_t));
+ connect->tcp_handle = (uv_tcp_t *)gpr_malloc(sizeof(uv_tcp_t));
connect->addr_name = grpc_sockaddr_to_uri(resolved_addr);
connect->resource_quota = resource_quota;
uv_tcp_init(uv_default_loop(), connect->tcp_handle);
connect->connect_req.data = connect;
- connect->refs = 1;
+ connect->refs = 2; // One for the connect operation, one for the timer.
if (GRPC_TRACER_ON(grpc_tcp_trace)) {
gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %s: asynchronously connecting",
@@ -158,24 +158,24 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx,
uv_tc_on_connect);
GRPC_CLOSURE_INIT(&connect->on_alarm, uv_tc_on_alarm, connect,
grpc_schedule_on_exec_ctx);
- grpc_timer_init(exec_ctx, &connect->alarm,
- gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC),
- &connect->on_alarm, gpr_now(GPR_CLOCK_MONOTONIC));
+ grpc_timer_init(exec_ctx, &connect->alarm, deadline, &connect->on_alarm);
}
// overridden by api_fuzzer.c
+extern "C" {
void (*grpc_tcp_client_connect_impl)(
grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep,
grpc_pollset_set *interested_parties, const grpc_channel_args *channel_args,
const grpc_resolved_address *addr,
- gpr_timespec deadline) = tcp_client_connect_impl;
+ grpc_millis deadline) = tcp_client_connect_impl;
+}
void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
grpc_endpoint **ep,
grpc_pollset_set *interested_parties,
const grpc_channel_args *channel_args,
const grpc_resolved_address *addr,
- gpr_timespec deadline) {
+ grpc_millis deadline) {
grpc_tcp_client_connect_impl(exec_ctx, closure, ep, interested_parties,
channel_args, addr, deadline);
}
diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.cc
index fc62105cc9..9adf7ee4e9 100644
--- a/src/core/lib/iomgr/tcp_client_windows.c
+++ b/src/core/lib/iomgr/tcp_client_windows.cc
@@ -18,6 +18,8 @@
#include "src/core/lib/iomgr/port.h"
+#include <inttypes.h>
+
#ifdef GRPC_WINSOCK_SOCKET
#include "src/core/lib/iomgr/sockaddr_windows.h"
@@ -41,7 +43,6 @@ typedef struct {
grpc_closure *on_done;
gpr_mu mu;
grpc_winsocket *socket;
- gpr_timespec deadline;
grpc_timer alarm;
grpc_closure on_alarm;
char *addr_name;
@@ -66,7 +67,7 @@ static void async_connect_unlock_and_cleanup(grpc_exec_ctx *exec_ctx,
}
static void on_alarm(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) {
- async_connect *ac = acp;
+ async_connect *ac = (async_connect *)acp;
gpr_mu_lock(&ac->mu);
grpc_winsocket *socket = ac->socket;
ac->socket = NULL;
@@ -77,7 +78,7 @@ static void on_alarm(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) {
}
static void on_connect(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) {
- async_connect *ac = acp;
+ async_connect *ac = (async_connect *)acp;
grpc_endpoint **ep = ac->endpoint;
GPR_ASSERT(*ep == NULL);
grpc_closure *on_done = ac->on_done;
@@ -124,7 +125,7 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) {
static void tcp_client_connect_impl(
grpc_exec_ctx *exec_ctx, grpc_closure *on_done, grpc_endpoint **endpoint,
grpc_pollset_set *interested_parties, const grpc_channel_args *channel_args,
- const grpc_resolved_address *addr, gpr_timespec deadline) {
+ const grpc_resolved_address *addr, grpc_millis deadline) {
SOCKET sock = INVALID_SOCKET;
BOOL success;
int status;
@@ -193,7 +194,7 @@ static void tcp_client_connect_impl(
}
}
- ac = gpr_malloc(sizeof(async_connect));
+ ac = (async_connect *)gpr_malloc(sizeof(async_connect));
ac->on_done = on_done;
ac->socket = socket;
gpr_mu_init(&ac->mu);
@@ -204,8 +205,7 @@ static void tcp_client_connect_impl(
GRPC_CLOSURE_INIT(&ac->on_connect, on_connect, ac, grpc_schedule_on_exec_ctx);
GRPC_CLOSURE_INIT(&ac->on_alarm, on_alarm, ac, grpc_schedule_on_exec_ctx);
- grpc_timer_init(exec_ctx, &ac->alarm, deadline, &ac->on_alarm,
- gpr_now(GPR_CLOCK_MONOTONIC));
+ grpc_timer_init(exec_ctx, &ac->alarm, deadline, &ac->on_alarm);
grpc_socket_notify_on_write(exec_ctx, socket, &ac->on_connect);
return;
@@ -226,18 +226,20 @@ failure:
}
// overridden by api_fuzzer.c
+extern "C" {
void (*grpc_tcp_client_connect_impl)(
grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep,
grpc_pollset_set *interested_parties, const grpc_channel_args *channel_args,
const grpc_resolved_address *addr,
- gpr_timespec deadline) = tcp_client_connect_impl;
+ grpc_millis deadline) = tcp_client_connect_impl;
+}
void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
grpc_endpoint **ep,
grpc_pollset_set *interested_parties,
const grpc_channel_args *channel_args,
const grpc_resolved_address *addr,
- gpr_timespec deadline) {
+ grpc_millis deadline) {
grpc_tcp_client_connect_impl(exec_ctx, closure, ep, interested_parties,
channel_args, addr, deadline);
}
diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.cc
index 7e271294fd..7fcaef7679 100644
--- a/src/core/lib/iomgr/tcp_posix.c
+++ b/src/core/lib/iomgr/tcp_posix.cc
@@ -135,13 +135,11 @@ static void run_poller(grpc_exec_ctx *exec_ctx, void *bp,
gpr_log(GPR_DEBUG, "BACKUP_POLLER:%p run", p);
}
gpr_mu_lock(p->pollset_mu);
- gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
- gpr_timespec deadline =
- gpr_time_add(now, gpr_time_from_seconds(10, GPR_TIMESPAN));
+ grpc_millis deadline = grpc_exec_ctx_now(exec_ctx) + 13 * GPR_MS_PER_SEC;
GRPC_STATS_INC_TCP_BACKUP_POLLER_POLLS(exec_ctx);
- GRPC_LOG_IF_ERROR("backup_poller:pollset_work",
- grpc_pollset_work(exec_ctx, BACKUP_POLLER_POLLSET(p), NULL,
- now, deadline));
+ GRPC_LOG_IF_ERROR(
+ "backup_poller:pollset_work",
+ grpc_pollset_work(exec_ctx, BACKUP_POLLER_POLLSET(p), NULL, deadline));
gpr_mu_unlock(p->pollset_mu);
/* last "uncovered" notification is the ref that keeps us polling, if we get
* there try a cas to release it */
diff --git a/src/core/lib/iomgr/tcp_posix.h b/src/core/lib/iomgr/tcp_posix.h
index 6831a4a57f..dda78b2f8e 100644
--- a/src/core/lib/iomgr/tcp_posix.h
+++ b/src/core/lib/iomgr/tcp_posix.h
@@ -33,6 +33,10 @@
#include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/iomgr/ev_posix.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern grpc_tracer_flag grpc_tcp_trace;
/* Create a tcp endpoint given a file desciptor and a read slice size.
@@ -53,4 +57,8 @@ int grpc_tcp_fd(grpc_endpoint *ep);
void grpc_tcp_destroy_and_release_fd(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
int *fd, grpc_closure *done);
-#endif /* GRPC_CORE_LIB_IOMGR_TCP_POSIX_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_TCP_POSIX_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/tcp_server.h b/src/core/lib/iomgr/tcp_server.h
index 8a126b6dee..3f190ac285 100644
--- a/src/core/lib/iomgr/tcp_server.h
+++ b/src/core/lib/iomgr/tcp_server.h
@@ -25,6 +25,10 @@
#include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/iomgr/resolve_address.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Forward decl of grpc_tcp_server */
typedef struct grpc_tcp_server grpc_tcp_server;
@@ -98,4 +102,8 @@ void grpc_tcp_server_unref(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s);
void grpc_tcp_server_shutdown_listeners(grpc_exec_ctx *exec_ctx,
grpc_tcp_server *s);
-#endif /* GRPC_CORE_LIB_IOMGR_TCP_SERVER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_TCP_SERVER_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.cc
index 06612d639c..06612d639c 100644
--- a/src/core/lib/iomgr/tcp_server_posix.c
+++ b/src/core/lib/iomgr/tcp_server_posix.cc
diff --git a/src/core/lib/iomgr/tcp_server_utils_posix.h b/src/core/lib/iomgr/tcp_server_utils_posix.h
index 85dea515d9..4bb0660f09 100644
--- a/src/core/lib/iomgr/tcp_server_utils_posix.h
+++ b/src/core/lib/iomgr/tcp_server_utils_posix.h
@@ -24,6 +24,10 @@
#include "src/core/lib/iomgr/socket_utils_posix.h"
#include "src/core/lib/iomgr/tcp_server.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* one listening port */
typedef struct grpc_tcp_listener {
int fd;
@@ -117,4 +121,8 @@ grpc_error *grpc_tcp_server_prepare_socket(int fd,
/* Ruturn true if the platform supports ifaddrs */
bool grpc_tcp_server_have_ifaddrs(void);
-#endif /* GRPC_CORE_LIB_IOMGR_TCP_SERVER_UTILS_POSIX_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_TCP_SERVER_UTILS_POSIX_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/tcp_server_utils_posix_common.c b/src/core/lib/iomgr/tcp_server_utils_posix_common.cc
index a828bee074..a828bee074 100644
--- a/src/core/lib/iomgr/tcp_server_utils_posix_common.c
+++ b/src/core/lib/iomgr/tcp_server_utils_posix_common.cc
diff --git a/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c b/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
index a243b69f35..a243b69f35 100644
--- a/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c
+++ b/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc
diff --git a/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c b/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
index 34eab20d6a..34eab20d6a 100644
--- a/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c
+++ b/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc
diff --git a/src/core/lib/iomgr/tcp_server_uv.c b/src/core/lib/iomgr/tcp_server_uv.cc
index 3b9332321f..348838c495 100644
--- a/src/core/lib/iomgr/tcp_server_uv.c
+++ b/src/core/lib/iomgr/tcp_server_uv.cc
@@ -77,14 +77,14 @@ grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx,
grpc_closure *shutdown_complete,
const grpc_channel_args *args,
grpc_tcp_server **server) {
- grpc_tcp_server *s = gpr_malloc(sizeof(grpc_tcp_server));
+ grpc_tcp_server *s = (grpc_tcp_server *)gpr_malloc(sizeof(grpc_tcp_server));
s->resource_quota = grpc_resource_quota_create(NULL);
for (size_t i = 0; i < (args == NULL ? 0 : args->num_args); i++) {
if (0 == strcmp(GRPC_ARG_RESOURCE_QUOTA, args->args[i].key)) {
if (args->args[i].type == GRPC_ARG_POINTER) {
grpc_resource_quota_unref_internal(exec_ctx, s->resource_quota);
- s->resource_quota =
- grpc_resource_quota_ref_internal(args->args[i].value.pointer.p);
+ s->resource_quota = grpc_resource_quota_ref_internal(
+ (grpc_resource_quota *)args->args[i].value.pointer.p);
} else {
grpc_resource_quota_unref_internal(exec_ctx, s->resource_quota);
gpr_free(s);
@@ -190,15 +190,16 @@ void grpc_tcp_server_unref(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) {
}
static void finish_accept(grpc_exec_ctx *exec_ctx, grpc_tcp_listener *sp) {
- grpc_tcp_server_acceptor *acceptor = gpr_malloc(sizeof(*acceptor));
- uv_tcp_t *client;
+ grpc_tcp_server_acceptor *acceptor =
+ (grpc_tcp_server_acceptor *)gpr_malloc(sizeof(*acceptor));
+ uv_tcp_t *client = NULL;
grpc_endpoint *ep = NULL;
grpc_resolved_address peer_name;
char *peer_name_string;
int err;
uv_tcp_t *server = sp->handle;
- client = gpr_malloc(sizeof(uv_tcp_t));
+ client = (uv_tcp_t *)gpr_malloc(sizeof(uv_tcp_t));
uv_tcp_init(uv_default_loop(), client);
// UV documentation says this is guaranteed to succeed
uv_accept((uv_stream_t *)server, (uv_stream_t *)client);
@@ -303,7 +304,7 @@ static grpc_error *add_socket_to_server(grpc_tcp_server *s, uv_tcp_t *handle,
GPR_ASSERT(port >= 0);
GPR_ASSERT(!s->on_accept_cb && "must add ports before starting server");
- sp = gpr_zalloc(sizeof(grpc_tcp_listener));
+ sp = (grpc_tcp_listener *)gpr_zalloc(sizeof(grpc_tcp_listener));
sp->next = NULL;
if (s->head == NULL) {
s->head = sp;
@@ -355,7 +356,8 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s,
(int *)&sockname_temp.len)) {
*port = grpc_sockaddr_get_port(&sockname_temp);
if (*port > 0) {
- allocated_addr = gpr_malloc(sizeof(grpc_resolved_address));
+ allocated_addr = (grpc_resolved_address *)gpr_malloc(
+ sizeof(grpc_resolved_address));
memcpy(allocated_addr, addr, sizeof(grpc_resolved_address));
grpc_sockaddr_set_port(allocated_addr, *port);
addr = allocated_addr;
@@ -376,7 +378,7 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s,
addr = &wildcard;
}
- handle = gpr_malloc(sizeof(uv_tcp_t));
+ handle = (uv_tcp_t *)gpr_malloc(sizeof(uv_tcp_t));
family = grpc_sockaddr_get_family(addr);
status = uv_tcp_init_ex(uv_default_loop(), handle, (unsigned int)family);
diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.cc
index 0162afc1ad..f198aaaa5b 100644
--- a/src/core/lib/iomgr/tcp_server_windows.c
+++ b/src/core/lib/iomgr/tcp_server_windows.cc
@@ -22,6 +22,7 @@
#include "src/core/lib/iomgr/sockaddr.h"
+#include <inttypes.h>
#include <io.h>
#include <grpc/support/alloc.h>
@@ -97,7 +98,7 @@ grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx,
grpc_closure *shutdown_complete,
const grpc_channel_args *args,
grpc_tcp_server **server) {
- grpc_tcp_server *s = gpr_malloc(sizeof(grpc_tcp_server));
+ grpc_tcp_server *s = (grpc_tcp_server *)gpr_malloc(sizeof(grpc_tcp_server));
s->channel_args = grpc_channel_args_copy(args);
gpr_ref_init(&s->refs, 1);
gpr_mu_init(&s->mu);
@@ -115,7 +116,7 @@ grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx,
static void destroy_server(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error *error) {
- grpc_tcp_server *s = arg;
+ grpc_tcp_server *s = (grpc_tcp_server *)arg;
/* Now that the accepts have been aborted, we can destroy the sockets.
The IOCP won't get notified on these, so we can flag them as already
@@ -188,6 +189,7 @@ static grpc_error *prepare_socket(SOCKET sock,
int *port) {
grpc_resolved_address sockname_temp;
grpc_error *error = GRPC_ERROR_NONE;
+ int sockname_temp_len;
error = grpc_tcp_prepare_socket(sock);
if (error != GRPC_ERROR_NONE) {
@@ -205,7 +207,7 @@ static grpc_error *prepare_socket(SOCKET sock,
goto failure;
}
- int sockname_temp_len = sizeof(struct sockaddr_storage);
+ sockname_temp_len = sizeof(struct sockaddr_storage);
if (getsockname(sock, (struct sockaddr *)sockname_temp.addr,
&sockname_temp_len) == SOCKET_ERROR) {
error = GRPC_WSA_ERROR(WSAGetLastError(), "getsockname");
@@ -294,7 +296,7 @@ failure:
/* Event manager callback when reads are ready. */
static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
- grpc_tcp_listener *sp = arg;
+ grpc_tcp_listener *sp = (grpc_tcp_listener *)arg;
SOCKET sock = sp->new_socket;
grpc_winsocket_callback_info *info = &sp->socket->read_info;
grpc_endpoint *ep = NULL;
@@ -368,7 +370,8 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
managed to accept a connection, and created an endpoint. */
if (ep) {
// Create acceptor.
- grpc_tcp_server_acceptor *acceptor = gpr_malloc(sizeof(*acceptor));
+ grpc_tcp_server_acceptor *acceptor =
+ (grpc_tcp_server_acceptor *)gpr_malloc(sizeof(*acceptor));
acceptor->from_server = sp->server;
acceptor->port_index = sp->port_index;
acceptor->fd_index = 0;
@@ -421,7 +424,7 @@ static grpc_error *add_socket_to_server(grpc_tcp_server *s, SOCKET sock,
GPR_ASSERT(port >= 0);
gpr_mu_lock(&s->mu);
GPR_ASSERT(!s->on_accept_cb && "must add ports before starting server");
- sp = gpr_malloc(sizeof(grpc_tcp_listener));
+ sp = (grpc_tcp_listener *)gpr_malloc(sizeof(grpc_tcp_listener));
sp->next = NULL;
if (s->head == NULL) {
s->head = sp;
@@ -472,7 +475,8 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s,
sockname_temp.len = (size_t)sockname_temp_len;
*port = grpc_sockaddr_get_port(&sockname_temp);
if (*port > 0) {
- allocated_addr = gpr_malloc(sizeof(grpc_resolved_address));
+ allocated_addr = (grpc_resolved_address *)gpr_malloc(
+ sizeof(grpc_resolved_address));
memcpy(allocated_addr, addr, sizeof(grpc_resolved_address));
grpc_sockaddr_set_port(allocated_addr, *port);
addr = allocated_addr;
diff --git a/src/core/lib/iomgr/tcp_uv.c b/src/core/lib/iomgr/tcp_uv.cc
index a05c19b4ac..e311964dbc 100644
--- a/src/core/lib/iomgr/tcp_uv.c
+++ b/src/core/lib/iomgr/tcp_uv.cc
@@ -114,7 +114,7 @@ static void tcp_ref(grpc_tcp *tcp) { gpr_ref(&tcp->refcount); }
static void uv_close_callback(uv_handle_t *handle) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_tcp *tcp = handle->data;
+ grpc_tcp *tcp = (grpc_tcp *)handle->data;
TCP_UNREF(&exec_ctx, tcp, "destroy");
grpc_exec_ctx_finish(&exec_ctx);
}
@@ -128,7 +128,7 @@ static grpc_slice alloc_read_slice(grpc_exec_ctx *exec_ctx,
static void alloc_uv_buf(uv_handle_t *handle, size_t suggested_size,
uv_buf_t *buf) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_tcp *tcp = handle->data;
+ grpc_tcp *tcp = (grpc_tcp *)handle->data;
(void)suggested_size;
buf->base = (char *)GRPC_SLICE_START_PTR(tcp->read_slice);
buf->len = GRPC_SLICE_LENGTH(tcp->read_slice);
@@ -140,7 +140,7 @@ static void read_callback(uv_stream_t *stream, ssize_t nread,
grpc_slice sub;
grpc_error *error;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_tcp *tcp = stream->data;
+ grpc_tcp *tcp = (grpc_tcp *)stream->data;
grpc_closure *cb = tcp->read_cb;
if (nread == 0) {
// Nothing happened. Wait for the next callback
@@ -207,7 +207,7 @@ static void uv_endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
}
static void write_callback(uv_write_t *req, int status) {
- grpc_tcp *tcp = req->data;
+ grpc_tcp *tcp = (grpc_tcp *)req->data;
grpc_error *error;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_closure *cb = tcp->write_cb;
@@ -269,7 +269,7 @@ static void uv_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
tcp->write_cb = cb;
buffer_count = (unsigned int)tcp->write_slices->count;
- buffers = gpr_malloc(sizeof(uv_buf_t) * buffer_count);
+ buffers = (uv_buf_t *)gpr_malloc(sizeof(uv_buf_t) * buffer_count);
grpc_resource_user_alloc(exec_ctx, tcp->resource_user,
sizeof(uv_buf_t) * buffer_count, NULL);
for (i = 0; i < buffer_count; i++) {
diff --git a/src/core/lib/iomgr/tcp_uv.h b/src/core/lib/iomgr/tcp_uv.h
index 0e67481d35..ba7db8a0f7 100644
--- a/src/core/lib/iomgr/tcp_uv.h
+++ b/src/core/lib/iomgr/tcp_uv.h
@@ -38,8 +38,16 @@ extern grpc_tracer_flag grpc_tcp_trace;
#define GRPC_TCP_DEFAULT_READ_SLICE_SIZE 8192
+#ifdef __cplusplus
+extern "C" {
+#endif
+
grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle,
grpc_resource_quota *resource_quota,
char *peer_string);
-#endif /* GRPC_CORE_LIB_IOMGR_TCP_UV_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_TCP_UV_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.cc
index 2cbb97403b..dc84e564a9 100644
--- a/src/core/lib/iomgr/tcp_windows.c
+++ b/src/core/lib/iomgr/tcp_windows.cc
@@ -37,6 +37,7 @@
#include "src/core/lib/iomgr/sockaddr_utils.h"
#include "src/core/lib/iomgr/socket_windows.h"
#include "src/core/lib/iomgr/tcp_client.h"
+#include "src/core/lib/iomgr/tcp_windows.h"
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/slice/slice_internal.h"
@@ -158,7 +159,7 @@ static void tcp_ref(grpc_tcp *tcp) { gpr_ref(&tcp->refcount); }
/* Asynchronous callback from the IOCP, or the background thread. */
static void on_read(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) {
- grpc_tcp *tcp = tcpp;
+ grpc_tcp *tcp = (grpc_tcp *)tcpp;
grpc_closure *cb = tcp->read_cb;
grpc_winsocket *socket = tcp->socket;
grpc_slice sub;
@@ -418,14 +419,14 @@ static grpc_endpoint_vtable vtable = {
grpc_endpoint *grpc_tcp_create(grpc_exec_ctx *exec_ctx, grpc_winsocket *socket,
grpc_channel_args *channel_args,
- char *peer_string) {
+ const char *peer_string) {
grpc_resource_quota *resource_quota = grpc_resource_quota_create(NULL);
if (channel_args != NULL) {
for (size_t i = 0; i < channel_args->num_args; i++) {
if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_RESOURCE_QUOTA)) {
grpc_resource_quota_unref_internal(exec_ctx, resource_quota);
resource_quota = grpc_resource_quota_ref_internal(
- channel_args->args[i].value.pointer.p);
+ (grpc_resource_quota *)channel_args->args[i].value.pointer.p);
}
}
}
diff --git a/src/core/lib/iomgr/tcp_windows.h b/src/core/lib/iomgr/tcp_windows.h
index 864184ce84..f3697f707c 100644
--- a/src/core/lib/iomgr/tcp_windows.h
+++ b/src/core/lib/iomgr/tcp_windows.h
@@ -32,13 +32,21 @@
#include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/iomgr/socket_windows.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Create a tcp endpoint given a winsock handle.
* Takes ownership of the handle.
*/
grpc_endpoint *grpc_tcp_create(grpc_exec_ctx *exec_ctx, grpc_winsocket *socket,
grpc_channel_args *channel_args,
- char *peer_string);
+ const char *peer_string);
grpc_error *grpc_tcp_prepare_socket(SOCKET sock);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_IOMGR_TCP_WINDOWS_H */
diff --git a/src/core/lib/iomgr/time_averaged_stats.c b/src/core/lib/iomgr/time_averaged_stats.cc
index 3bddec04dd..3bddec04dd 100644
--- a/src/core/lib/iomgr/time_averaged_stats.c
+++ b/src/core/lib/iomgr/time_averaged_stats.cc
diff --git a/src/core/lib/iomgr/time_averaged_stats.h b/src/core/lib/iomgr/time_averaged_stats.h
index 8745f7fa13..e255b58fee 100644
--- a/src/core/lib/iomgr/time_averaged_stats.h
+++ b/src/core/lib/iomgr/time_averaged_stats.h
@@ -19,6 +19,10 @@
#ifndef GRPC_CORE_LIB_IOMGR_TIME_AVERAGED_STATS_H
#define GRPC_CORE_LIB_IOMGR_TIME_AVERAGED_STATS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* This tracks a time-decaying weighted average. It works by collecting
batches of samples and then mixing their average into a time-decaying
weighted mean. It is designed for batch operations where we do many adds
@@ -70,4 +74,8 @@ void grpc_time_averaged_stats_add_sample(grpc_time_averaged_stats* stats,
value. */
double grpc_time_averaged_stats_update_average(grpc_time_averaged_stats* stats);
-#endif /* GRPC_CORE_LIB_IOMGR_TIME_AVERAGED_STATS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_TIME_AVERAGED_STATS_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/timer.h b/src/core/lib/iomgr/timer.h
index ac392f87fe..419e834cf1 100644
--- a/src/core/lib/iomgr/timer.h
+++ b/src/core/lib/iomgr/timer.h
@@ -32,6 +32,10 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/iomgr.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_timer grpc_timer;
/* Initialize *timer. When expired or canceled, closure will be called with
@@ -41,8 +45,7 @@ typedef struct grpc_timer grpc_timer;
application callback is also responsible for maintaining information about
when to free up any user-level state. */
void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer,
- gpr_timespec deadline, grpc_closure *closure,
- gpr_timespec now);
+ grpc_millis deadline, grpc_closure *closure);
/* Initialize *timer without setting it. This can later be passed through
the regular init or cancel */
@@ -92,8 +95,8 @@ typedef enum {
with high probability at least one thread in the system will see an update
at any time slice. */
grpc_timer_check_result grpc_timer_check(grpc_exec_ctx *exec_ctx,
- gpr_timespec now, gpr_timespec *next);
-void grpc_timer_list_init(gpr_timespec now);
+ grpc_millis *next);
+void grpc_timer_list_init(grpc_exec_ctx *exec_ctx);
void grpc_timer_list_shutdown(grpc_exec_ctx *exec_ctx);
/* Consume a kick issued by grpc_kick_poller */
@@ -103,4 +106,8 @@ void grpc_timer_consume_kick(void);
void grpc_kick_poller(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_IOMGR_TIMER_H */
diff --git a/src/core/lib/iomgr/timer_generic.c b/src/core/lib/iomgr/timer_generic.cc
index e9a7236c8c..b8e895de6f 100644
--- a/src/core/lib/iomgr/timer_generic.c
+++ b/src/core/lib/iomgr/timer_generic.cc
@@ -18,6 +18,8 @@
#include "src/core/lib/iomgr/port.h"
+#include <inttypes.h>
+
#ifdef GRPC_TIMER_USE_GENERIC
#include "src/core/lib/iomgr/timer.h"
@@ -41,9 +43,11 @@
#define MIN_QUEUE_WINDOW_DURATION 0.01
#define MAX_QUEUE_WINDOW_DURATION 1
+extern "C" {
grpc_tracer_flag grpc_timer_trace = GRPC_TRACER_INITIALIZER(false, "timer");
grpc_tracer_flag grpc_timer_check_trace =
GRPC_TRACER_INITIALIZER(false, "timer_check");
+}
/* A "timer shard". Contains a 'heap' and a 'list' of timers. All timers with
* deadlines earlier than 'queue_deadline" cap are maintained in the heap and
@@ -79,6 +83,125 @@ static timer_shard g_shards[NUM_SHARDS];
* Access to this is protected by g_shared_mutables.mu */
static timer_shard *g_shard_queue[NUM_SHARDS];
+#ifndef NDEBUG
+
+/* == Hash table for duplicate timer detection == */
+
+#define NUM_HASH_BUCKETS 1009 /* Prime number close to 1000 */
+
+static gpr_mu g_hash_mu[NUM_HASH_BUCKETS]; /* One mutex per bucket */
+static grpc_timer *g_timer_ht[NUM_HASH_BUCKETS] = {NULL};
+
+static void init_timer_ht() {
+ for (int i = 0; i < NUM_HASH_BUCKETS; i++) {
+ gpr_mu_init(&g_hash_mu[i]);
+ }
+}
+
+static bool is_in_ht(grpc_timer *t) {
+ size_t i = GPR_HASH_POINTER(t, NUM_HASH_BUCKETS);
+
+ gpr_mu_lock(&g_hash_mu[i]);
+ grpc_timer *p = g_timer_ht[i];
+ while (p != NULL && p != t) {
+ p = p->hash_table_next;
+ }
+ gpr_mu_unlock(&g_hash_mu[i]);
+
+ return (p == t);
+}
+
+static void add_to_ht(grpc_timer *t) {
+ GPR_ASSERT(!t->hash_table_next);
+ size_t i = GPR_HASH_POINTER(t, NUM_HASH_BUCKETS);
+
+ gpr_mu_lock(&g_hash_mu[i]);
+ grpc_timer *p = g_timer_ht[i];
+ while (p != NULL && p != t) {
+ p = p->hash_table_next;
+ }
+
+ if (p == t) {
+ grpc_closure *c = t->closure;
+ gpr_log(GPR_ERROR,
+ "** Duplicate timer (%p) being added. Closure: (%p), created at: "
+ "(%s:%d), scheduled at: (%s:%d) **",
+ t, c, c->file_created, c->line_created, c->file_initiated,
+ c->line_initiated);
+ abort();
+ }
+
+ /* Timer not present in the bucket. Insert at head of the list */
+ t->hash_table_next = g_timer_ht[i];
+ g_timer_ht[i] = t;
+ gpr_mu_unlock(&g_hash_mu[i]);
+}
+
+static void remove_from_ht(grpc_timer *t) {
+ size_t i = GPR_HASH_POINTER(t, NUM_HASH_BUCKETS);
+ bool removed = false;
+
+ gpr_mu_lock(&g_hash_mu[i]);
+ if (g_timer_ht[i] == t) {
+ g_timer_ht[i] = g_timer_ht[i]->hash_table_next;
+ removed = true;
+ } else if (g_timer_ht[i] != NULL) {
+ grpc_timer *p = g_timer_ht[i];
+ while (p->hash_table_next != NULL && p->hash_table_next != t) {
+ p = p->hash_table_next;
+ }
+
+ if (p->hash_table_next == t) {
+ p->hash_table_next = t->hash_table_next;
+ removed = true;
+ }
+ }
+ gpr_mu_unlock(&g_hash_mu[i]);
+
+ if (!removed) {
+ grpc_closure *c = t->closure;
+ gpr_log(GPR_ERROR,
+ "** Removing timer (%p) that is not added to hash table. Closure "
+ "(%p), created at: (%s:%d), scheduled at: (%s:%d) **",
+ t, c, c->file_created, c->line_created, c->file_initiated,
+ c->line_initiated);
+ abort();
+ }
+
+ t->hash_table_next = NULL;
+}
+
+/* If a timer is added to a timer shard (either heap or a list), it cannot
+ * be pending. A timer is added to hash table only-if it is added to the
+ * timer shard.
+ * Therefore, if timer->pending is false, it cannot be in hash table */
+static void validate_non_pending_timer(grpc_timer *t) {
+ if (!t->pending && is_in_ht(t)) {
+ grpc_closure *c = t->closure;
+ gpr_log(GPR_ERROR,
+ "** gpr_timer_cancel() called on a non-pending timer (%p) which "
+ "is in the hash table. Closure: (%p), created at: (%s:%d), "
+ "scheduled at: (%s:%d) **",
+ t, c, c->file_created, c->line_created, c->file_initiated,
+ c->line_initiated);
+ abort();
+ }
+}
+
+#define INIT_TIMER_HASH_TABLE() init_timer_ht()
+#define ADD_TO_HASH_TABLE(t) add_to_ht((t))
+#define REMOVE_FROM_HASH_TABLE(t) remove_from_ht((t))
+#define VALIDATE_NON_PENDING_TIMER(t) validate_non_pending_timer((t))
+
+#else
+
+#define INIT_TIMER_HASH_TABLE()
+#define ADD_TO_HASH_TABLE(t)
+#define REMOVE_FROM_HASH_TABLE(t)
+#define VALIDATE_NON_PENDING_TIMER(t)
+
+#endif
+
/* Thread local variable that stores the deadline of the next timer the thread
* has last-seen. This is an optimization to prevent the thread from checking
* shared_mutables.min_timer (which requires acquiring shared_mutables.mu lock,
@@ -97,9 +220,6 @@ struct shared_mutables {
static struct shared_mutables g_shared_mutables;
-static gpr_clock_type g_clock_type;
-static gpr_timespec g_start_time;
-
static gpr_atm saturating_add(gpr_atm a, gpr_atm b) {
if (a > GPR_ATM_MAX - b) {
return GPR_ATM_MAX;
@@ -112,52 +232,19 @@ static grpc_timer_check_result run_some_expired_timers(grpc_exec_ctx *exec_ctx,
gpr_atm *next,
grpc_error *error);
-static gpr_timespec dbl_to_ts(double d) {
- gpr_timespec ts;
- ts.tv_sec = (int64_t)d;
- ts.tv_nsec = (int32_t)(1e9 * (d - (double)ts.tv_sec));
- ts.clock_type = GPR_TIMESPAN;
- return ts;
-}
-
-static gpr_atm timespec_to_atm_round_up(gpr_timespec ts) {
- ts = gpr_time_sub(ts, g_start_time);
- double x = GPR_MS_PER_SEC * (double)ts.tv_sec +
- (double)ts.tv_nsec / GPR_NS_PER_MS +
- (double)(GPR_NS_PER_SEC - 1) / (double)GPR_NS_PER_SEC;
- if (x < 0) return 0;
- if (x > GPR_ATM_MAX) return GPR_ATM_MAX;
- return (gpr_atm)x;
-}
-
-static gpr_atm timespec_to_atm_round_down(gpr_timespec ts) {
- ts = gpr_time_sub(ts, g_start_time);
- double x =
- GPR_MS_PER_SEC * (double)ts.tv_sec + (double)ts.tv_nsec / GPR_NS_PER_MS;
- if (x < 0) return 0;
- if (x > GPR_ATM_MAX) return GPR_ATM_MAX;
- return (gpr_atm)x;
-}
-
-static gpr_timespec atm_to_timespec(gpr_atm x) {
- return gpr_time_add(g_start_time, dbl_to_ts((double)x / 1000.0));
-}
-
static gpr_atm compute_min_deadline(timer_shard *shard) {
return grpc_timer_heap_is_empty(&shard->heap)
? saturating_add(shard->queue_deadline_cap, 1)
: grpc_timer_heap_top(&shard->heap)->deadline;
}
-void grpc_timer_list_init(gpr_timespec now) {
+void grpc_timer_list_init(grpc_exec_ctx *exec_ctx) {
uint32_t i;
g_shared_mutables.initialized = true;
g_shared_mutables.checker_mu = GPR_SPINLOCK_INITIALIZER;
gpr_mu_init(&g_shared_mutables.mu);
- g_clock_type = now.clock_type;
- g_start_time = now;
- g_shared_mutables.min_timer = timespec_to_atm_round_down(now);
+ g_shared_mutables.min_timer = grpc_exec_ctx_now(exec_ctx);
gpr_tls_init(&g_last_seen_min_timer);
gpr_tls_set(&g_last_seen_min_timer, 0);
grpc_register_tracer(&grpc_timer_trace);
@@ -175,6 +262,8 @@ void grpc_timer_list_init(gpr_timespec now) {
shard->min_deadline = compute_min_deadline(shard);
g_shard_queue[i] = shard;
}
+
+ INIT_TIMER_HASH_TABLE();
}
void grpc_timer_list_shutdown(grpc_exec_ctx *exec_ctx) {
@@ -192,10 +281,6 @@ void grpc_timer_list_shutdown(grpc_exec_ctx *exec_ctx) {
g_shared_mutables.initialized = false;
}
-static double ts_to_dbl(gpr_timespec ts) {
- return (double)ts.tv_sec + 1e-9 * ts.tv_nsec;
-}
-
/* returns true if the first element in the list */
static void list_join(grpc_timer *head, grpc_timer *timer) {
timer->next = head;
@@ -236,20 +321,20 @@ static void note_deadline_change(timer_shard *shard) {
void grpc_timer_init_unset(grpc_timer *timer) { timer->pending = false; }
void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer,
- gpr_timespec deadline, grpc_closure *closure,
- gpr_timespec now) {
+ grpc_millis deadline, grpc_closure *closure) {
int is_first_timer = 0;
timer_shard *shard = &g_shards[GPR_HASH_POINTER(timer, NUM_SHARDS)];
- GPR_ASSERT(deadline.clock_type == g_clock_type);
- GPR_ASSERT(now.clock_type == g_clock_type);
timer->closure = closure;
- gpr_atm deadline_atm = timer->deadline = timespec_to_atm_round_up(deadline);
+ timer->deadline = deadline;
+
+#ifndef NDEBUG
+ timer->hash_table_next = NULL;
+#endif
if (GRPC_TRACER_ON(grpc_timer_trace)) {
- gpr_log(GPR_DEBUG, "TIMER %p: SET %" PRId64 ".%09d [%" PRIdPTR
- "] now %" PRId64 ".%09d [%" PRIdPTR "] call %p[%p]",
- timer, deadline.tv_sec, deadline.tv_nsec, deadline_atm, now.tv_sec,
- now.tv_nsec, timespec_to_atm_round_down(now), closure, closure->cb);
+ gpr_log(GPR_DEBUG,
+ "TIMER %p: SET %" PRIdPTR " now %" PRIdPTR " call %p[%p]", timer,
+ deadline, grpc_exec_ctx_now(exec_ctx), closure, closure->cb);
}
if (!g_shared_mutables.initialized) {
@@ -262,7 +347,8 @@ void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer,
gpr_mu_lock(&shard->mu);
timer->pending = true;
- if (gpr_time_cmp(deadline, now) <= 0) {
+ grpc_millis now = grpc_exec_ctx_now(exec_ctx);
+ if (deadline <= now) {
timer->pending = false;
GRPC_CLOSURE_SCHED(exec_ctx, timer->closure, GRPC_ERROR_NONE);
gpr_mu_unlock(&shard->mu);
@@ -271,8 +357,11 @@ void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer,
}
grpc_time_averaged_stats_add_sample(&shard->stats,
- ts_to_dbl(gpr_time_sub(deadline, now)));
- if (deadline_atm < shard->queue_deadline_cap) {
+ (double)(deadline - now) / 1000.0);
+
+ ADD_TO_HASH_TABLE(timer);
+
+ if (deadline < shard->queue_deadline_cap) {
is_first_timer = grpc_timer_heap_add(&shard->heap, timer);
} else {
timer->heap_index = INVALID_HEAP_INDEX;
@@ -303,12 +392,12 @@ void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer,
gpr_log(GPR_DEBUG, " .. old shard min_deadline=%" PRIdPTR,
shard->min_deadline);
}
- if (deadline_atm < shard->min_deadline) {
+ if (deadline < shard->min_deadline) {
gpr_atm old_min_deadline = g_shard_queue[0]->min_deadline;
- shard->min_deadline = deadline_atm;
+ shard->min_deadline = deadline;
note_deadline_change(shard);
- if (shard->shard_queue_index == 0 && deadline_atm < old_min_deadline) {
- gpr_atm_no_barrier_store(&g_shared_mutables.min_timer, deadline_atm);
+ if (shard->shard_queue_index == 0 && deadline < old_min_deadline) {
+ gpr_atm_no_barrier_store(&g_shared_mutables.min_timer, deadline);
grpc_kick_poller();
}
}
@@ -333,7 +422,10 @@ void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer) {
gpr_log(GPR_DEBUG, "TIMER %p: CANCEL pending=%s", timer,
timer->pending ? "true" : "false");
}
+
if (timer->pending) {
+ REMOVE_FROM_HASH_TABLE(timer);
+
GRPC_CLOSURE_SCHED(exec_ctx, timer->closure, GRPC_ERROR_CANCELLED);
timer->pending = false;
if (timer->heap_index == INVALID_HEAP_INDEX) {
@@ -341,6 +433,8 @@ void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer) {
} else {
grpc_timer_heap_remove(&shard->heap, timer);
}
+ } else {
+ VALIDATE_NON_PENDING_TIMER(timer);
}
gpr_mu_unlock(&shard->mu);
}
@@ -407,8 +501,9 @@ static grpc_timer *pop_one(timer_shard *shard, gpr_atm now) {
}
if (timer->deadline > now) return NULL;
if (GRPC_TRACER_ON(grpc_timer_trace)) {
- gpr_log(GPR_DEBUG, "TIMER %p: FIRE %" PRIdPTR "ms late", timer,
- now - timer->deadline);
+ gpr_log(GPR_DEBUG, "TIMER %p: FIRE %" PRIdPTR "ms late via %s scheduler",
+ timer, now - timer->deadline,
+ timer->closure->scheduler->vtable->name);
}
timer->pending = false;
grpc_timer_heap_pop(&shard->heap);
@@ -424,11 +519,16 @@ static size_t pop_timers(grpc_exec_ctx *exec_ctx, timer_shard *shard,
grpc_timer *timer;
gpr_mu_lock(&shard->mu);
while ((timer = pop_one(shard, now))) {
+ REMOVE_FROM_HASH_TABLE(timer);
GRPC_CLOSURE_SCHED(exec_ctx, timer->closure, GRPC_ERROR_REF(error));
n++;
}
*new_min_deadline = compute_min_deadline(shard);
gpr_mu_unlock(&shard->mu);
+ if (GRPC_TRACER_ON(grpc_timer_check_trace)) {
+ gpr_log(GPR_DEBUG, " .. shard[%d] popped %" PRIdPTR,
+ (int)(shard - g_shards), n);
+ }
return n;
}
@@ -501,29 +601,27 @@ static grpc_timer_check_result run_some_expired_timers(grpc_exec_ctx *exec_ctx,
}
grpc_timer_check_result grpc_timer_check(grpc_exec_ctx *exec_ctx,
- gpr_timespec now, gpr_timespec *next) {
+ grpc_millis *next) {
// prelude
- GPR_ASSERT(now.clock_type == g_clock_type);
- gpr_atm now_atm = timespec_to_atm_round_down(now);
+ grpc_millis now = grpc_exec_ctx_now(exec_ctx);
/* fetch from a thread-local first: this avoids contention on a globally
mutable cacheline in the common case */
- gpr_atm min_timer = gpr_tls_get(&g_last_seen_min_timer);
- if (now_atm < min_timer) {
+ grpc_millis min_timer = gpr_tls_get(&g_last_seen_min_timer);
+ if (now < min_timer) {
if (next != NULL) {
- *next =
- atm_to_timespec(GPR_MIN(timespec_to_atm_round_up(*next), min_timer));
+ *next = GPR_MIN(*next, min_timer);
}
if (GRPC_TRACER_ON(grpc_timer_check_trace)) {
gpr_log(GPR_DEBUG,
- "TIMER CHECK SKIP: now_atm=%" PRIdPTR " min_timer=%" PRIdPTR,
- now_atm, min_timer);
+ "TIMER CHECK SKIP: now=%" PRIdPTR " min_timer=%" PRIdPTR, now,
+ min_timer);
}
return GRPC_TIMERS_CHECKED_AND_EMPTY;
}
grpc_error *shutdown_error =
- gpr_time_cmp(now, gpr_inf_future(now.clock_type)) != 0
+ now != GRPC_MILLIS_INF_FUTURE
? GRPC_ERROR_NONE
: GRPC_ERROR_CREATE_FROM_STATIC_STRING("Shutting down timer system");
@@ -533,34 +631,24 @@ grpc_timer_check_result grpc_timer_check(grpc_exec_ctx *exec_ctx,
if (next == NULL) {
next_str = gpr_strdup("NULL");
} else {
- gpr_asprintf(&next_str, "%" PRId64 ".%09d [%" PRIdPTR "]", next->tv_sec,
- next->tv_nsec, timespec_to_atm_round_down(*next));
+ gpr_asprintf(&next_str, "%" PRIdPTR, *next);
}
- gpr_log(GPR_DEBUG, "TIMER CHECK BEGIN: now=%" PRId64 ".%09d [%" PRIdPTR
- "] next=%s tls_min=%" PRIdPTR " glob_min=%" PRIdPTR,
- now.tv_sec, now.tv_nsec, now_atm, next_str,
- gpr_tls_get(&g_last_seen_min_timer),
+ gpr_log(GPR_DEBUG, "TIMER CHECK BEGIN: now=%" PRIdPTR
+ " next=%s tls_min=%" PRIdPTR " glob_min=%" PRIdPTR,
+ now, next_str, gpr_tls_get(&g_last_seen_min_timer),
gpr_atm_no_barrier_load(&g_shared_mutables.min_timer));
gpr_free(next_str);
}
// actual code
- grpc_timer_check_result r;
- gpr_atm next_atm;
- if (next == NULL) {
- r = run_some_expired_timers(exec_ctx, now_atm, NULL, shutdown_error);
- } else {
- next_atm = timespec_to_atm_round_down(*next);
- r = run_some_expired_timers(exec_ctx, now_atm, &next_atm, shutdown_error);
- *next = atm_to_timespec(next_atm);
- }
+ grpc_timer_check_result r =
+ run_some_expired_timers(exec_ctx, now, next, shutdown_error);
// tracing
if (GRPC_TRACER_ON(grpc_timer_check_trace)) {
char *next_str;
if (next == NULL) {
next_str = gpr_strdup("NULL");
} else {
- gpr_asprintf(&next_str, "%" PRId64 ".%09d [%" PRIdPTR "]", next->tv_sec,
- next->tv_nsec, next_atm);
+ gpr_asprintf(&next_str, "%" PRIdPTR, *next);
}
gpr_log(GPR_DEBUG, "TIMER CHECK END: r=%d; next=%s", r, next_str);
gpr_free(next_str);
diff --git a/src/core/lib/iomgr/timer_generic.h b/src/core/lib/iomgr/timer_generic.h
index 72a4ac1f10..f0597f6ea0 100644
--- a/src/core/lib/iomgr/timer_generic.h
+++ b/src/core/lib/iomgr/timer_generic.h
@@ -29,6 +29,9 @@ struct grpc_timer {
struct grpc_timer *next;
struct grpc_timer *prev;
grpc_closure *closure;
+#ifndef NDEBUG
+ struct grpc_timer *hash_table_next;
+#endif
};
#endif /* GRPC_CORE_LIB_IOMGR_TIMER_GENERIC_H */
diff --git a/src/core/lib/iomgr/timer_heap.c b/src/core/lib/iomgr/timer_heap.cc
index 2648d5da5d..2648d5da5d 100644
--- a/src/core/lib/iomgr/timer_heap.c
+++ b/src/core/lib/iomgr/timer_heap.cc
diff --git a/src/core/lib/iomgr/timer_heap.h b/src/core/lib/iomgr/timer_heap.h
index 0d64199ab9..f15e8a3abb 100644
--- a/src/core/lib/iomgr/timer_heap.h
+++ b/src/core/lib/iomgr/timer_heap.h
@@ -21,6 +21,10 @@
#include "src/core/lib/iomgr/timer.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct {
grpc_timer **timers;
uint32_t timer_count;
@@ -39,4 +43,8 @@ void grpc_timer_heap_pop(grpc_timer_heap *heap);
int grpc_timer_heap_is_empty(grpc_timer_heap *heap);
-#endif /* GRPC_CORE_LIB_IOMGR_TIMER_HEAP_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_TIMER_HEAP_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/timer_manager.c b/src/core/lib/iomgr/timer_manager.cc
index 04ca44563d..1248f82189 100644
--- a/src/core/lib/iomgr/timer_manager.c
+++ b/src/core/lib/iomgr/timer_manager.cc
@@ -20,8 +20,11 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include <grpc/support/port_platform.h>
#include <grpc/support/thd.h>
+#include <inttypes.h>
+
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/iomgr/timer.h"
@@ -30,7 +33,7 @@ typedef struct completed_thread {
struct completed_thread *next;
} completed_thread;
-extern grpc_tracer_flag grpc_timer_check_trace;
+extern "C" grpc_tracer_flag grpc_timer_check_trace;
// global mutex
static gpr_mu g_mu;
@@ -52,7 +55,7 @@ static bool g_kicked;
static bool g_has_timed_waiter;
// the deadline of the current timed waiter thread (only relevant if
// g_has_timed_waiter is true)
-static gpr_timespec g_timed_waiter_deadline;
+static grpc_millis g_timed_waiter_deadline;
// generation counter to track which thread is waiting for the next timer
static uint64_t g_timed_waiter_generation;
@@ -96,9 +99,8 @@ static void start_timer_thread_and_unlock(void) {
void grpc_timer_manager_tick() {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- gpr_timespec next = gpr_inf_future(GPR_CLOCK_MONOTONIC);
- gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
- grpc_timer_check(&exec_ctx, now, &next);
+ grpc_millis next = GRPC_MILLIS_INF_FUTURE;
+ grpc_timer_check(&exec_ctx, &next);
grpc_exec_ctx_finish(&exec_ctx);
}
@@ -121,6 +123,9 @@ static void run_some_timers(grpc_exec_ctx *exec_ctx) {
gpr_mu_unlock(&g_mu);
}
// without our lock, flush the exec_ctx
+ if (GRPC_TRACER_ON(grpc_timer_check_trace)) {
+ gpr_log(GPR_DEBUG, "flush exec_ctx");
+ }
grpc_exec_ctx_flush(exec_ctx);
gpr_mu_lock(&g_mu);
// garbage collect any threads hanging out that are dead
@@ -133,8 +138,7 @@ static void run_some_timers(grpc_exec_ctx *exec_ctx) {
// wait until 'next' (or forever if there is already a timed waiter in the pool)
// returns true if the thread should continue executing (false if it should
// shutdown)
-static bool wait_until(gpr_timespec next) {
- const gpr_timespec inf_future = gpr_inf_future(GPR_CLOCK_MONOTONIC);
+static bool wait_until(grpc_exec_ctx *exec_ctx, grpc_millis next) {
gpr_mu_lock(&g_mu);
// if we're not threaded anymore, leave
if (!g_threaded) {
@@ -168,30 +172,29 @@ static bool wait_until(gpr_timespec next) {
unless their 'next' is earlier than the current timed-waiter's deadline
(in which case the thread with earlier 'next' takes over as the new timed
waiter) */
- if (gpr_time_cmp(next, inf_future) != 0) {
- if (!g_has_timed_waiter ||
- (gpr_time_cmp(next, g_timed_waiter_deadline) < 0)) {
+ if (next != GRPC_MILLIS_INF_FUTURE) {
+ if (!g_has_timed_waiter || (next < g_timed_waiter_deadline)) {
my_timed_waiter_generation = ++g_timed_waiter_generation;
g_has_timed_waiter = true;
g_timed_waiter_deadline = next;
if (GRPC_TRACER_ON(grpc_timer_check_trace)) {
- gpr_timespec wait_time =
- gpr_time_sub(next, gpr_now(GPR_CLOCK_MONOTONIC));
- gpr_log(GPR_DEBUG, "sleep for a %" PRId64 ".%09d seconds",
- wait_time.tv_sec, wait_time.tv_nsec);
+ grpc_millis wait_time = next - grpc_exec_ctx_now(exec_ctx);
+ gpr_log(GPR_DEBUG, "sleep for a %" PRIdPTR " milliseconds",
+ wait_time);
}
} else { // g_timed_waiter == true && next >= g_timed_waiter_deadline
- next = inf_future;
+ next = GRPC_MILLIS_INF_FUTURE;
}
}
if (GRPC_TRACER_ON(grpc_timer_check_trace) &&
- gpr_time_cmp(next, inf_future) == 0) {
+ next == GRPC_MILLIS_INF_FUTURE) {
gpr_log(GPR_DEBUG, "sleep until kicked");
}
- gpr_cv_wait(&g_cv_wait, &g_mu, next);
+ gpr_cv_wait(&g_cv_wait, &g_mu,
+ grpc_millis_to_timespec(next, GPR_CLOCK_REALTIME));
if (GRPC_TRACER_ON(grpc_timer_check_trace)) {
gpr_log(GPR_DEBUG, "wait ended: was_timed:%d kicked:%d",
@@ -203,7 +206,7 @@ static bool wait_until(gpr_timespec next) {
// there's work to do after checking timers (code above)
if (my_timed_waiter_generation == g_timed_waiter_generation) {
g_has_timed_waiter = false;
- g_timed_waiter_deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
+ g_timed_waiter_deadline = GRPC_MILLIS_INF_FUTURE;
}
}
@@ -219,12 +222,11 @@ static bool wait_until(gpr_timespec next) {
}
static void timer_main_loop(grpc_exec_ctx *exec_ctx) {
- const gpr_timespec inf_future = gpr_inf_future(GPR_CLOCK_MONOTONIC);
for (;;) {
- gpr_timespec next = inf_future;
- gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
+ grpc_millis next = GRPC_MILLIS_INF_FUTURE;
+ grpc_exec_ctx_invalidate_now(exec_ctx);
// check timer state, updates next to the next time to run a check
- switch (grpc_timer_check(exec_ctx, now, &next)) {
+ switch (grpc_timer_check(exec_ctx, &next)) {
case GRPC_TIMERS_FIRED:
run_some_timers(exec_ctx);
break;
@@ -241,10 +243,10 @@ static void timer_main_loop(grpc_exec_ctx *exec_ctx) {
if (GRPC_TRACER_ON(grpc_timer_check_trace)) {
gpr_log(GPR_DEBUG, "timers not checked: expect another thread to");
}
- next = inf_future;
+ next = GRPC_MILLIS_INF_FUTURE;
/* fall through */
case GRPC_TIMERS_CHECKED_AND_EMPTY:
- if (!wait_until(next)) {
+ if (!wait_until(exec_ctx, next)) {
return;
}
break;
@@ -300,7 +302,7 @@ void grpc_timer_manager_init(void) {
g_completed_threads = NULL;
g_has_timed_waiter = false;
- g_timed_waiter_deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
+ g_timed_waiter_deadline = GRPC_MILLIS_INF_FUTURE;
start_threads();
}
@@ -347,7 +349,7 @@ void grpc_kick_poller(void) {
gpr_mu_lock(&g_mu);
g_kicked = true;
g_has_timed_waiter = false;
- g_timed_waiter_deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
+ g_timed_waiter_deadline = GRPC_MILLIS_INF_FUTURE;
++g_timed_waiter_generation;
gpr_cv_signal(&g_cv_wait);
gpr_mu_unlock(&g_mu);
diff --git a/src/core/lib/iomgr/timer_manager.h b/src/core/lib/iomgr/timer_manager.h
index 0ba502928a..d8a59a9477 100644
--- a/src/core/lib/iomgr/timer_manager.h
+++ b/src/core/lib/iomgr/timer_manager.h
@@ -21,6 +21,10 @@
#include <stdbool.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Timer Manager tries to keep one thread waiting for the next timeout at all
times */
@@ -34,4 +38,8 @@ void grpc_timer_manager_set_threading(bool enabled);
* disabled */
void grpc_timer_manager_tick(void);
-#endif /* GRPC_CORE_LIB_IOMGR_TIMER_MANAGER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_TIMER_MANAGER_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/timer_uv.c b/src/core/lib/iomgr/timer_uv.cc
index adced41f53..bd1e922c7f 100644
--- a/src/core/lib/iomgr/timer_uv.c
+++ b/src/core/lib/iomgr/timer_uv.cc
@@ -29,9 +29,11 @@
#include <uv.h>
+extern "C" {
grpc_tracer_flag grpc_timer_trace = GRPC_TRACER_INITIALIZER(false, "timer");
grpc_tracer_flag grpc_timer_check_trace =
GRPC_TRACER_INITIALIZER(false, "timer_check");
+}
static void timer_close_callback(uv_handle_t *handle) { gpr_free(handle); }
@@ -53,20 +55,19 @@ void run_expired_timer(uv_timer_t *handle) {
}
void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer,
- gpr_timespec deadline, grpc_closure *closure,
- gpr_timespec now) {
+ grpc_millis deadline, grpc_closure *closure) {
uint64_t timeout;
uv_timer_t *uv_timer;
GRPC_UV_ASSERT_SAME_THREAD();
timer->closure = closure;
- if (gpr_time_cmp(deadline, now) <= 0) {
+ if (deadline <= grpc_exec_ctx_now(exec_ctx)) {
timer->pending = 0;
GRPC_CLOSURE_SCHED(exec_ctx, timer->closure, GRPC_ERROR_NONE);
return;
}
timer->pending = 1;
- timeout = (uint64_t)gpr_time_to_millis(gpr_time_sub(deadline, now));
- uv_timer = gpr_malloc(sizeof(uv_timer_t));
+ timeout = (uint64_t)(deadline - grpc_exec_ctx_now(exec_ctx));
+ uv_timer = (uv_timer_t *)gpr_malloc(sizeof(uv_timer_t));
uv_timer_init(uv_default_loop(), uv_timer);
uv_timer->data = timer;
timer->uv_timer = uv_timer;
@@ -89,7 +90,7 @@ void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer) {
}
grpc_timer_check_result grpc_timer_check(grpc_exec_ctx *exec_ctx,
- gpr_timespec now, gpr_timespec *next) {
+ grpc_millis *next) {
return GRPC_TIMERS_NOT_CHECKED;
}
diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.cc
index 00b2e68bb5..00b2e68bb5 100644
--- a/src/core/lib/iomgr/udp_server.c
+++ b/src/core/lib/iomgr/udp_server.cc
diff --git a/src/core/lib/iomgr/udp_server.h b/src/core/lib/iomgr/udp_server.h
index 881468ea2c..bcd8572260 100644
--- a/src/core/lib/iomgr/udp_server.h
+++ b/src/core/lib/iomgr/udp_server.h
@@ -23,6 +23,10 @@
#include "src/core/lib/iomgr/ev_posix.h"
#include "src/core/lib/iomgr/resolve_address.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Forward decl of struct grpc_server */
/* This is not typedef'ed to avoid a typedef-redefinition error */
struct grpc_server;
@@ -73,4 +77,8 @@ int grpc_udp_server_add_port(grpc_udp_server *s,
void grpc_udp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_udp_server *server,
grpc_closure *on_done);
-#endif /* GRPC_CORE_LIB_IOMGR_UDP_SERVER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_UDP_SERVER_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/unix_sockets_posix.c b/src/core/lib/iomgr/unix_sockets_posix.cc
index 35f898f13a..35f898f13a 100644
--- a/src/core/lib/iomgr/unix_sockets_posix.c
+++ b/src/core/lib/iomgr/unix_sockets_posix.cc
diff --git a/src/core/lib/iomgr/unix_sockets_posix.h b/src/core/lib/iomgr/unix_sockets_posix.h
index 25b64b3eec..b96131ae1c 100644
--- a/src/core/lib/iomgr/unix_sockets_posix.h
+++ b/src/core/lib/iomgr/unix_sockets_posix.h
@@ -25,6 +25,10 @@
#include "src/core/lib/iomgr/resolve_address.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void grpc_create_socketpair_if_unix(int sv[2]);
grpc_error *grpc_resolve_unix_domain_address(
@@ -38,4 +42,8 @@ void grpc_unlink_if_unix_domain_socket(
char *grpc_sockaddr_to_uri_unix_if_possible(
const grpc_resolved_address *resolved_addr);
-#endif /* GRPC_CORE_LIB_IOMGR_UNIX_SOCKETS_POSIX_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_IOMGR_UNIX_SOCKETS_POSIX_H */ \ No newline at end of file
diff --git a/src/core/lib/iomgr/unix_sockets_posix_noop.c b/src/core/lib/iomgr/unix_sockets_posix_noop.cc
index e46b1c003d..e46b1c003d 100644
--- a/src/core/lib/iomgr/unix_sockets_posix_noop.c
+++ b/src/core/lib/iomgr/unix_sockets_posix_noop.cc
diff --git a/src/core/lib/iomgr/wakeup_fd_cv.c b/src/core/lib/iomgr/wakeup_fd_cv.cc
index 268e0175dd..268e0175dd 100644
--- a/src/core/lib/iomgr/wakeup_fd_cv.c
+++ b/src/core/lib/iomgr/wakeup_fd_cv.cc
diff --git a/src/core/lib/iomgr/wakeup_fd_cv.h b/src/core/lib/iomgr/wakeup_fd_cv.h
index dc170ad5b4..dcd7bdb560 100644
--- a/src/core/lib/iomgr/wakeup_fd_cv.h
+++ b/src/core/lib/iomgr/wakeup_fd_cv.h
@@ -40,6 +40,10 @@
#define GRPC_FD_TO_IDX(fd) (-(fd)-1)
#define GRPC_IDX_TO_FD(idx) (-(idx)-1)
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct cv_node {
gpr_cv* cv;
struct cv_node* next;
@@ -62,4 +66,10 @@ typedef struct cv_fd_table {
grpc_poll_function_type poll;
} cv_fd_table;
+extern const grpc_wakeup_fd_vtable grpc_cv_wakeup_fd_vtable;
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_IOMGR_WAKEUP_FD_CV_H */
diff --git a/src/core/lib/iomgr/wakeup_fd_eventfd.c b/src/core/lib/iomgr/wakeup_fd_eventfd.cc
index 81cb7ee280..81cb7ee280 100644
--- a/src/core/lib/iomgr/wakeup_fd_eventfd.c
+++ b/src/core/lib/iomgr/wakeup_fd_eventfd.cc
diff --git a/src/core/lib/iomgr/wakeup_fd_nospecial.c b/src/core/lib/iomgr/wakeup_fd_nospecial.cc
index 4c20b8c1b7..4c20b8c1b7 100644
--- a/src/core/lib/iomgr/wakeup_fd_nospecial.c
+++ b/src/core/lib/iomgr/wakeup_fd_nospecial.cc
diff --git a/src/core/lib/iomgr/wakeup_fd_pipe.c b/src/core/lib/iomgr/wakeup_fd_pipe.cc
index 4189488f8a..05d69dc9cc 100644
--- a/src/core/lib/iomgr/wakeup_fd_pipe.c
+++ b/src/core/lib/iomgr/wakeup_fd_pipe.cc
@@ -20,6 +20,7 @@
#ifdef GRPC_POSIX_WAKEUP_FD
+#include "src/core/lib/iomgr/wakeup_fd_pipe.h"
#include "src/core/lib/iomgr/wakeup_fd_posix.h"
#include <errno.h>
diff --git a/src/core/lib/iomgr/wakeup_fd_pipe.h b/src/core/lib/iomgr/wakeup_fd_pipe.h
index f860406bda..9bbb5e2ff7 100644
--- a/src/core/lib/iomgr/wakeup_fd_pipe.h
+++ b/src/core/lib/iomgr/wakeup_fd_pipe.h
@@ -21,6 +21,14 @@
#include "src/core/lib/iomgr/wakeup_fd_posix.h"
-extern grpc_wakeup_fd_vtable grpc_pipe_wakeup_fd_vtable;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern const grpc_wakeup_fd_vtable grpc_pipe_wakeup_fd_vtable;
+
+#ifdef __cplusplus
+}
+#endif
#endif /* GRPC_CORE_LIB_IOMGR_WAKEUP_FD_PIPE_H */
diff --git a/src/core/lib/iomgr/wakeup_fd_posix.c b/src/core/lib/iomgr/wakeup_fd_posix.cc
index 25daa7d3fb..9af96d314b 100644
--- a/src/core/lib/iomgr/wakeup_fd_posix.c
+++ b/src/core/lib/iomgr/wakeup_fd_posix.cc
@@ -25,7 +25,6 @@
#include "src/core/lib/iomgr/wakeup_fd_pipe.h"
#include "src/core/lib/iomgr/wakeup_fd_posix.h"
-extern grpc_wakeup_fd_vtable grpc_cv_wakeup_fd_vtable;
static const grpc_wakeup_fd_vtable *wakeup_fd_vtable = NULL;
int grpc_allow_specialized_wakeup_fd = 1;
diff --git a/src/core/lib/iomgr/wakeup_fd_posix.h b/src/core/lib/iomgr/wakeup_fd_posix.h
index a9584d0d48..ae7849f98c 100644
--- a/src/core/lib/iomgr/wakeup_fd_posix.h
+++ b/src/core/lib/iomgr/wakeup_fd_posix.h
@@ -49,6 +49,10 @@
#include "src/core/lib/iomgr/error.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void grpc_wakeup_fd_global_init(void);
void grpc_wakeup_fd_global_destroy(void);
@@ -91,4 +95,8 @@ void grpc_wakeup_fd_destroy(grpc_wakeup_fd* fd_info);
* wakeup_fd_nospecial.c if no such implementation exists. */
extern const grpc_wakeup_fd_vtable grpc_specialized_wakeup_fd_vtable;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_IOMGR_WAKEUP_FD_POSIX_H */
diff --git a/src/core/lib/json/json.c b/src/core/lib/json/json.cc
index 4ad51f662a..4ad51f662a 100644
--- a/src/core/lib/json/json.c
+++ b/src/core/lib/json/json.cc
diff --git a/src/core/lib/json/json.h b/src/core/lib/json/json.h
index bbd43025eb..81b7e0c9da 100644
--- a/src/core/lib/json/json.h
+++ b/src/core/lib/json/json.h
@@ -23,6 +23,10 @@
#include "src/core/lib/json/json_common.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* A tree-like structure to hold json values. The key and value pointers
* are not owned by it.
*/
@@ -70,4 +74,8 @@ char* grpc_json_dump_to_string(grpc_json* json, int indent);
grpc_json* grpc_json_create(grpc_json_type type);
void grpc_json_destroy(grpc_json* json);
-#endif /* GRPC_CORE_LIB_JSON_JSON_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_JSON_JSON_H */ \ No newline at end of file
diff --git a/src/core/lib/json/json_reader.c b/src/core/lib/json/json_reader.cc
index 094a35176c..094a35176c 100644
--- a/src/core/lib/json/json_reader.c
+++ b/src/core/lib/json/json_reader.cc
diff --git a/src/core/lib/json/json_reader.h b/src/core/lib/json/json_reader.h
index 577fbbbaf6..ab2384f7a7 100644
--- a/src/core/lib/json/json_reader.h
+++ b/src/core/lib/json/json_reader.h
@@ -22,6 +22,10 @@
#include <grpc/support/port_platform.h>
#include "src/core/lib/json/json_common.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum {
GRPC_JSON_STATE_OBJECT_KEY_BEGIN,
GRPC_JSON_STATE_OBJECT_KEY_STRING,
@@ -142,4 +146,8 @@ void grpc_json_reader_init(grpc_json_reader *reader,
*/
int grpc_json_reader_is_complete(grpc_json_reader *reader);
-#endif /* GRPC_CORE_LIB_JSON_JSON_READER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_JSON_JSON_READER_H */ \ No newline at end of file
diff --git a/src/core/lib/json/json_string.c b/src/core/lib/json/json_string.cc
index 3178d2d2b4..3178d2d2b4 100644
--- a/src/core/lib/json/json_string.c
+++ b/src/core/lib/json/json_string.cc
diff --git a/src/core/lib/json/json_writer.c b/src/core/lib/json/json_writer.cc
index eab1bff7a6..eab1bff7a6 100644
--- a/src/core/lib/json/json_writer.c
+++ b/src/core/lib/json/json_writer.cc
diff --git a/src/core/lib/json/json_writer.h b/src/core/lib/json/json_writer.h
index 8779039d42..18bd2a80fe 100644
--- a/src/core/lib/json/json_writer.h
+++ b/src/core/lib/json/json_writer.h
@@ -35,6 +35,10 @@
#include "src/core/lib/json/json_common.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_json_writer_vtable {
/* Adds a character to the output stream. */
void (*output_char)(void *userdata, char);
@@ -79,4 +83,8 @@ void grpc_json_writer_value_raw_with_len(grpc_json_writer *writer,
void grpc_json_writer_value_string(grpc_json_writer *writer,
const char *string);
-#endif /* GRPC_CORE_LIB_JSON_JSON_WRITER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_JSON_JSON_WRITER_H */ \ No newline at end of file
diff --git a/src/core/lib/profiling/basic_timers.c b/src/core/lib/profiling/basic_timers.cc
index c7645b74f2..ab9d60481c 100644
--- a/src/core/lib/profiling/basic_timers.c
+++ b/src/core/lib/profiling/basic_timers.cc
@@ -18,10 +18,10 @@
#include <grpc/support/port_platform.h>
-#ifdef GRPC_BASIC_PROFILER
-
#include "src/core/lib/profiling/timers.h"
+#ifdef GRPC_BASIC_PROFILER
+
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
diff --git a/src/core/lib/profiling/stap_timers.c b/src/core/lib/profiling/stap_timers.cc
index c86d74f058..c86d74f058 100644
--- a/src/core/lib/profiling/stap_timers.c
+++ b/src/core/lib/profiling/stap_timers.cc
diff --git a/src/core/lib/security/context/security_context.c b/src/core/lib/security/context/security_context.cc
index 8fff2c92c5..31d800b9b4 100644
--- a/src/core/lib/security/context/security_context.c
+++ b/src/core/lib/security/context/security_context.cc
@@ -82,7 +82,8 @@ void grpc_auth_context_release(grpc_auth_context *context) {
/* --- grpc_client_security_context --- */
grpc_client_security_context *grpc_client_security_context_create(void) {
- return gpr_zalloc(sizeof(grpc_client_security_context));
+ return (grpc_client_security_context *)gpr_zalloc(
+ sizeof(grpc_client_security_context));
}
void grpc_client_security_context_destroy(void *ctx) {
@@ -100,7 +101,8 @@ void grpc_client_security_context_destroy(void *ctx) {
/* --- grpc_server_security_context --- */
grpc_server_security_context *grpc_server_security_context_create(void) {
- return gpr_zalloc(sizeof(grpc_server_security_context));
+ return (grpc_server_security_context *)gpr_zalloc(
+ sizeof(grpc_server_security_context));
}
void grpc_server_security_context_destroy(void *ctx) {
@@ -117,7 +119,8 @@ void grpc_server_security_context_destroy(void *ctx) {
static grpc_auth_property_iterator empty_iterator = {NULL, 0, NULL};
grpc_auth_context *grpc_auth_context_create(grpc_auth_context *chained) {
- grpc_auth_context *ctx = gpr_zalloc(sizeof(grpc_auth_context));
+ grpc_auth_context *ctx =
+ (grpc_auth_context *)gpr_zalloc(sizeof(grpc_auth_context));
gpr_ref_init(&ctx->refcount, 1);
if (chained != NULL) {
ctx->chained = GRPC_AUTH_CONTEXT_REF(chained, "chained");
@@ -258,9 +261,9 @@ static void ensure_auth_context_capacity(grpc_auth_context *ctx) {
if (ctx->properties.count == ctx->properties.capacity) {
ctx->properties.capacity =
GPR_MAX(ctx->properties.capacity + 8, ctx->properties.capacity * 2);
- ctx->properties.array =
- gpr_realloc(ctx->properties.array,
- ctx->properties.capacity * sizeof(grpc_auth_property));
+ ctx->properties.array = (grpc_auth_property *)gpr_realloc(
+ ctx->properties.array,
+ ctx->properties.capacity * sizeof(grpc_auth_property));
}
}
@@ -275,7 +278,7 @@ void grpc_auth_context_add_property(grpc_auth_context *ctx, const char *name,
ensure_auth_context_capacity(ctx);
prop = &ctx->properties.array[ctx->properties.count++];
prop->name = gpr_strdup(name);
- prop->value = gpr_malloc(value_length + 1);
+ prop->value = (char *)gpr_malloc(value_length + 1);
memcpy(prop->value, value, value_length);
prop->value[value_length] = '\0';
prop->value_length = value_length;
@@ -302,11 +305,12 @@ void grpc_auth_property_reset(grpc_auth_property *property) {
}
static void auth_context_pointer_arg_destroy(grpc_exec_ctx *exec_ctx, void *p) {
- GRPC_AUTH_CONTEXT_UNREF(p, "auth_context_pointer_arg");
+ GRPC_AUTH_CONTEXT_UNREF((grpc_auth_context *)p, "auth_context_pointer_arg");
}
static void *auth_context_pointer_arg_copy(void *p) {
- return GRPC_AUTH_CONTEXT_REF(p, "auth_context_pointer_arg");
+ return GRPC_AUTH_CONTEXT_REF((grpc_auth_context *)p,
+ "auth_context_pointer_arg");
}
static int auth_context_pointer_cmp(void *a, void *b) { return GPR_ICMP(a, b); }
@@ -316,7 +320,7 @@ static const grpc_arg_pointer_vtable auth_context_pointer_vtable = {
auth_context_pointer_cmp};
grpc_arg grpc_auth_context_to_arg(grpc_auth_context *p) {
- return grpc_channel_arg_pointer_create(GRPC_AUTH_CONTEXT_ARG, p,
+ return grpc_channel_arg_pointer_create((char *)GRPC_AUTH_CONTEXT_ARG, p,
&auth_context_pointer_vtable);
}
@@ -327,7 +331,7 @@ grpc_auth_context *grpc_auth_context_from_arg(const grpc_arg *arg) {
GRPC_AUTH_CONTEXT_ARG);
return NULL;
}
- return arg->value.pointer.p;
+ return (grpc_auth_context *)arg->value.pointer.p;
}
grpc_auth_context *grpc_find_auth_context_in_args(
diff --git a/src/core/lib/security/credentials/composite/composite_credentials.c b/src/core/lib/security/credentials/composite/composite_credentials.cc
index 09fd60a12c..779300ac07 100644
--- a/src/core/lib/security/credentials/composite/composite_credentials.c
+++ b/src/core/lib/security/credentials/composite/composite_credentials.cc
@@ -79,7 +79,8 @@ static bool composite_call_get_request_metadata(
grpc_error **error) {
grpc_composite_call_credentials *c = (grpc_composite_call_credentials *)creds;
grpc_composite_call_credentials_metadata_context *ctx;
- ctx = gpr_zalloc(sizeof(grpc_composite_call_credentials_metadata_context));
+ ctx = (grpc_composite_call_credentials_metadata_context *)gpr_zalloc(
+ sizeof(grpc_composite_call_credentials_metadata_context));
ctx->composite_creds = c;
ctx->pollent = pollent;
ctx->auth_md_context = auth_md_context;
@@ -87,6 +88,7 @@ static bool composite_call_get_request_metadata(
ctx->on_request_metadata = on_request_metadata;
GRPC_CLOSURE_INIT(&ctx->internal_on_request_metadata,
composite_call_metadata_cb, ctx, grpc_schedule_on_exec_ctx);
+ bool synchronous = true;
while (ctx->creds_index < ctx->composite_creds->inner.num_creds) {
grpc_call_credentials *inner_creds =
ctx->composite_creds->inner.creds_array[ctx->creds_index++];
@@ -95,19 +97,12 @@ static bool composite_call_get_request_metadata(
ctx->md_array, &ctx->internal_on_request_metadata, error)) {
if (*error != GRPC_ERROR_NONE) break;
} else {
+ synchronous = false; // Async return.
break;
}
}
- // If we got through all creds synchronously or we got a synchronous
- // error on one of them, return synchronously.
- if (ctx->creds_index == ctx->composite_creds->inner.num_creds ||
- *error != GRPC_ERROR_NONE) {
- gpr_free(ctx);
- return true;
- }
- // At least one inner cred is returning asynchronously, so we'll
- // return asynchronously as well.
- return false;
+ if (synchronous) gpr_free(ctx);
+ return synchronous;
}
static void composite_call_cancel_get_request_metadata(
@@ -152,7 +147,8 @@ grpc_call_credentials *grpc_composite_call_credentials_create(
GPR_ASSERT(reserved == NULL);
GPR_ASSERT(creds1 != NULL);
GPR_ASSERT(creds2 != NULL);
- c = gpr_zalloc(sizeof(grpc_composite_call_credentials));
+ c = (grpc_composite_call_credentials *)gpr_zalloc(
+ sizeof(grpc_composite_call_credentials));
c->base.type = GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE;
c->base.vtable = &composite_call_credentials_vtable;
gpr_ref_init(&c->base.refcount, 1);
@@ -160,7 +156,8 @@ grpc_call_credentials *grpc_composite_call_credentials_create(
creds2_array = get_creds_array(&creds2);
c->inner.num_creds = creds1_array.num_creds + creds2_array.num_creds;
creds_array_byte_size = c->inner.num_creds * sizeof(grpc_call_credentials *);
- c->inner.creds_array = gpr_zalloc(creds_array_byte_size);
+ c->inner.creds_array =
+ (grpc_call_credentials **)gpr_zalloc(creds_array_byte_size);
for (i = 0; i < creds1_array.num_creds; i++) {
grpc_call_credentials *cur_creds = creds1_array.creds_array[i];
c->inner.creds_array[i] = grpc_call_credentials_ref(cur_creds);
@@ -254,7 +251,8 @@ static grpc_channel_credentials_vtable composite_channel_credentials_vtable = {
grpc_channel_credentials *grpc_composite_channel_credentials_create(
grpc_channel_credentials *channel_creds, grpc_call_credentials *call_creds,
void *reserved) {
- grpc_composite_channel_credentials *c = gpr_zalloc(sizeof(*c));
+ grpc_composite_channel_credentials *c =
+ (grpc_composite_channel_credentials *)gpr_zalloc(sizeof(*c));
GPR_ASSERT(channel_creds != NULL && call_creds != NULL && reserved == NULL);
GRPC_API_TRACE(
"grpc_composite_channel_credentials_create(channel_creds=%p, "
diff --git a/src/core/lib/security/credentials/composite/composite_credentials.h b/src/core/lib/security/credentials/composite/composite_credentials.h
index 3076afcb7e..6e9f9a8f6f 100644
--- a/src/core/lib/security/credentials/composite/composite_credentials.h
+++ b/src/core/lib/security/credentials/composite/composite_credentials.h
@@ -21,6 +21,10 @@
#include "src/core/lib/security/credentials/credentials.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct {
grpc_call_credentials **creds_array;
size_t num_creds;
@@ -53,5 +57,9 @@ typedef struct {
grpc_call_credentials_array inner;
} grpc_composite_call_credentials;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_COMPOSITE_CREDENTIALS_H \
*/
diff --git a/src/core/lib/security/credentials/credentials.c b/src/core/lib/security/credentials/credentials.cc
index 8a67c9865b..ebbf350865 100644
--- a/src/core/lib/security/credentials/credentials.c
+++ b/src/core/lib/security/credentials/credentials.cc
@@ -40,7 +40,8 @@
grpc_credentials_metadata_request *grpc_credentials_metadata_request_create(
grpc_call_credentials *creds) {
grpc_credentials_metadata_request *r =
- gpr_zalloc(sizeof(grpc_credentials_metadata_request));
+ (grpc_credentials_metadata_request *)gpr_zalloc(
+ sizeof(grpc_credentials_metadata_request));
r->creds = grpc_call_credentials_ref(creds);
return r;
}
@@ -148,11 +149,11 @@ grpc_channel_credentials_duplicate_without_call_credentials(
}
static void credentials_pointer_arg_destroy(grpc_exec_ctx *exec_ctx, void *p) {
- grpc_channel_credentials_unref(exec_ctx, p);
+ grpc_channel_credentials_unref(exec_ctx, (grpc_channel_credentials *)p);
}
static void *credentials_pointer_arg_copy(void *p) {
- return grpc_channel_credentials_ref(p);
+ return grpc_channel_credentials_ref((grpc_channel_credentials *)p);
}
static int credentials_pointer_cmp(void *a, void *b) { return GPR_ICMP(a, b); }
@@ -163,8 +164,9 @@ static const grpc_arg_pointer_vtable credentials_pointer_vtable = {
grpc_arg grpc_channel_credentials_to_arg(
grpc_channel_credentials *credentials) {
- return grpc_channel_arg_pointer_create(
- GRPC_ARG_CHANNEL_CREDENTIALS, credentials, &credentials_pointer_vtable);
+ return grpc_channel_arg_pointer_create((char *)GRPC_ARG_CHANNEL_CREDENTIALS,
+ credentials,
+ &credentials_pointer_vtable);
}
grpc_channel_credentials *grpc_channel_credentials_from_arg(
@@ -175,7 +177,7 @@ grpc_channel_credentials *grpc_channel_credentials_from_arg(
GRPC_ARG_CHANNEL_CREDENTIALS);
return NULL;
}
- return arg->value.pointer.p;
+ return (grpc_channel_credentials *)arg->value.pointer.p;
}
grpc_channel_credentials *grpc_channel_credentials_find_in_args(
@@ -244,11 +246,11 @@ void grpc_server_credentials_set_auth_metadata_processor(
static void server_credentials_pointer_arg_destroy(grpc_exec_ctx *exec_ctx,
void *p) {
- grpc_server_credentials_unref(exec_ctx, p);
+ grpc_server_credentials_unref(exec_ctx, (grpc_server_credentials *)p);
}
static void *server_credentials_pointer_arg_copy(void *p) {
- return grpc_server_credentials_ref(p);
+ return grpc_server_credentials_ref((grpc_server_credentials *)p);
}
static int server_credentials_pointer_cmp(void *a, void *b) {
@@ -260,7 +262,7 @@ static const grpc_arg_pointer_vtable cred_ptr_vtable = {
server_credentials_pointer_cmp};
grpc_arg grpc_server_credentials_to_arg(grpc_server_credentials *p) {
- return grpc_channel_arg_pointer_create(GRPC_SERVER_CREDENTIALS_ARG, p,
+ return grpc_channel_arg_pointer_create((char *)GRPC_SERVER_CREDENTIALS_ARG, p,
&cred_ptr_vtable);
}
@@ -271,7 +273,7 @@ grpc_server_credentials *grpc_server_credentials_from_arg(const grpc_arg *arg) {
GRPC_SERVER_CREDENTIALS_ARG);
return NULL;
}
- return arg->value.pointer.p;
+ return (grpc_server_credentials *)arg->value.pointer.p;
}
grpc_server_credentials *grpc_find_server_credentials_in_args(
diff --git a/src/core/lib/security/credentials/credentials.h b/src/core/lib/security/credentials/credentials.h
index 04a54b0ca8..73e39ae039 100644
--- a/src/core/lib/security/credentials/credentials.h
+++ b/src/core/lib/security/credentials/credentials.h
@@ -29,6 +29,10 @@
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/security/transport/security_connector.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct grpc_http_response;
/* --- Constants. --- */
@@ -252,4 +256,8 @@ grpc_credentials_metadata_request *grpc_credentials_metadata_request_create(
void grpc_credentials_metadata_request_destroy(
grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *r);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_CREDENTIALS_H */
diff --git a/src/core/lib/security/credentials/credentials_metadata.c b/src/core/lib/security/credentials/credentials_metadata.cc
index ccd39e610f..5ba98bda4e 100644
--- a/src/core/lib/security/credentials/credentials_metadata.c
+++ b/src/core/lib/security/credentials/credentials_metadata.cc
@@ -33,7 +33,8 @@ static void mdelem_list_ensure_capacity(grpc_credentials_mdelem_array *list,
while (new_size < target_size) {
new_size *= 2;
}
- list->md = gpr_realloc(list->md, sizeof(grpc_mdelem) * new_size);
+ list->md =
+ (grpc_mdelem *)gpr_realloc(list->md, sizeof(grpc_mdelem) * new_size);
}
void grpc_credentials_mdelem_array_add(grpc_credentials_mdelem_array *list,
diff --git a/src/core/lib/security/credentials/fake/fake_credentials.c b/src/core/lib/security/credentials/fake/fake_credentials.cc
index ac9017850f..795ca0660a 100644
--- a/src/core/lib/security/credentials/fake/fake_credentials.c
+++ b/src/core/lib/security/credentials/fake/fake_credentials.cc
@@ -60,7 +60,8 @@ static grpc_server_credentials_vtable
grpc_channel_credentials *grpc_fake_transport_security_credentials_create(
void) {
- grpc_channel_credentials *c = gpr_zalloc(sizeof(grpc_channel_credentials));
+ grpc_channel_credentials *c =
+ (grpc_channel_credentials *)gpr_zalloc(sizeof(grpc_channel_credentials));
c->type = GRPC_CHANNEL_CREDENTIALS_TYPE_FAKE_TRANSPORT_SECURITY;
c->vtable = &fake_transport_security_credentials_vtable;
gpr_ref_init(&c->refcount, 1);
@@ -69,7 +70,8 @@ grpc_channel_credentials *grpc_fake_transport_security_credentials_create(
grpc_server_credentials *grpc_fake_transport_security_server_credentials_create(
void) {
- grpc_server_credentials *c = gpr_malloc(sizeof(grpc_server_credentials));
+ grpc_server_credentials *c =
+ (grpc_server_credentials *)gpr_malloc(sizeof(grpc_server_credentials));
memset(c, 0, sizeof(grpc_server_credentials));
c->type = GRPC_CHANNEL_CREDENTIALS_TYPE_FAKE_TRANSPORT_SECURITY;
gpr_ref_init(&c->refcount, 1);
@@ -78,8 +80,8 @@ grpc_server_credentials *grpc_fake_transport_security_server_credentials_create(
}
grpc_arg grpc_fake_transport_expected_targets_arg(char *expected_targets) {
- return grpc_channel_arg_string_create(GRPC_ARG_FAKE_SECURITY_EXPECTED_TARGETS,
- expected_targets);
+ return grpc_channel_arg_string_create(
+ (char *)GRPC_ARG_FAKE_SECURITY_EXPECTED_TARGETS, expected_targets);
}
const char *grpc_fake_transport_get_expected_targets(
@@ -129,7 +131,8 @@ grpc_call_credentials *grpc_md_only_test_credentials_create(
grpc_exec_ctx *exec_ctx, const char *md_key, const char *md_value,
bool is_async) {
grpc_md_only_test_credentials *c =
- gpr_zalloc(sizeof(grpc_md_only_test_credentials));
+ (grpc_md_only_test_credentials *)gpr_zalloc(
+ sizeof(grpc_md_only_test_credentials));
c->base.type = GRPC_CALL_CREDENTIALS_TYPE_OAUTH2;
c->base.vtable = &md_only_test_vtable;
gpr_ref_init(&c->base.refcount, 1);
diff --git a/src/core/lib/security/credentials/fake/fake_credentials.h b/src/core/lib/security/credentials/fake/fake_credentials.h
index aa0f3b6e20..64f6f439f0 100644
--- a/src/core/lib/security/credentials/fake/fake_credentials.h
+++ b/src/core/lib/security/credentials/fake/fake_credentials.h
@@ -21,6 +21,10 @@
#include "src/core/lib/security/credentials/credentials.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* -- Fake transport security credentials. -- */
/* Creates a fake transport security credentials object for testing. */
@@ -56,4 +60,8 @@ typedef struct {
bool is_async;
} grpc_md_only_test_credentials;
-#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_FAKE_CREDENTIALS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_FAKE_CREDENTIALS_H */ \ No newline at end of file
diff --git a/src/core/lib/security/credentials/google_default/credentials_generic.c b/src/core/lib/security/credentials/google_default/credentials_generic.cc
index 4f79718f3d..4f79718f3d 100644
--- a/src/core/lib/security/credentials/google_default/credentials_generic.c
+++ b/src/core/lib/security/credentials/google_default/credentials_generic.cc
diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.c b/src/core/lib/security/credentials/google_default/google_default_credentials.cc
index 691d66df69..5b2ddceb4a 100644
--- a/src/core/lib/security/credentials/google_default/google_default_credentials.c
+++ b/src/core/lib/security/credentials/google_default/google_default_credentials.cc
@@ -28,6 +28,7 @@
#include "src/core/lib/http/parser.h"
#include "src/core/lib/iomgr/load_file.h"
#include "src/core/lib/iomgr/polling_entity.h"
+#include "src/core/lib/security/credentials/google_default/google_default_credentials.h"
#include "src/core/lib/security/credentials/jwt/jwt_credentials.h"
#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h"
#include "src/core/lib/slice/slice_internal.h"
@@ -85,7 +86,7 @@ static void on_compute_engine_detection_http_response(grpc_exec_ctx *exec_ctx,
}
static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, grpc_error *e) {
- grpc_pollset_destroy(exec_ctx, p);
+ grpc_pollset_destroy(exec_ctx, (grpc_pollset *)p);
}
static int is_stack_running_on_compute_engine(grpc_exec_ctx *exec_ctx) {
@@ -96,9 +97,9 @@ static int is_stack_running_on_compute_engine(grpc_exec_ctx *exec_ctx) {
/* The http call is local. If it takes more than one sec, it is for sure not
on compute engine. */
- gpr_timespec max_detection_delay = gpr_time_from_seconds(1, GPR_TIMESPAN);
+ grpc_millis max_detection_delay = GPR_MS_PER_SEC;
- grpc_pollset *pollset = gpr_zalloc(grpc_pollset_size());
+ grpc_pollset *pollset = (grpc_pollset *)gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(pollset, &g_polling_mu);
detector.pollent = grpc_polling_entity_create_from_pollset(pollset);
detector.is_done = 0;
@@ -106,8 +107,8 @@ static int is_stack_running_on_compute_engine(grpc_exec_ctx *exec_ctx) {
memset(&detector.response, 0, sizeof(detector.response));
memset(&request, 0, sizeof(grpc_httpcli_request));
- request.host = GRPC_COMPUTE_ENGINE_DETECTION_HOST;
- request.http.path = "/";
+ request.host = (char *)GRPC_COMPUTE_ENGINE_DETECTION_HOST;
+ request.http.path = (char *)"/";
grpc_httpcli_context_init(&context);
@@ -115,7 +116,7 @@ static int is_stack_running_on_compute_engine(grpc_exec_ctx *exec_ctx) {
grpc_resource_quota_create("google_default_credentials");
grpc_httpcli_get(
exec_ctx, &context, &detector.pollent, resource_quota, &request,
- gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), max_detection_delay),
+ grpc_exec_ctx_now(exec_ctx) + max_detection_delay,
GRPC_CLOSURE_CREATE(on_compute_engine_detection_http_response, &detector,
grpc_schedule_on_exec_ctx),
&detector.response);
@@ -132,8 +133,7 @@ static int is_stack_running_on_compute_engine(grpc_exec_ctx *exec_ctx) {
"pollset_work",
grpc_pollset_work(exec_ctx,
grpc_polling_entity_pollset(&detector.pollent),
- &worker, gpr_now(GPR_CLOCK_MONOTONIC),
- gpr_inf_future(GPR_CLOCK_MONOTONIC)))) {
+ &worker, GRPC_MILLIS_INF_FUTURE))) {
detector.is_done = 1;
detector.success = 0;
}
diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.h b/src/core/lib/security/credentials/google_default/google_default_credentials.h
index c3755e01a6..66677873ca 100644
--- a/src/core/lib/security/credentials/google_default/google_default_credentials.h
+++ b/src/core/lib/security/credentials/google_default/google_default_credentials.h
@@ -23,6 +23,10 @@
#include "src/core/lib/security/credentials/credentials.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY "gcloud"
#define GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE \
"application_default_credentials.json"
@@ -41,5 +45,9 @@
void grpc_flush_cached_google_default_credentials(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_GOOGLE_DEFAULT_CREDENTIALS_H \
*/
diff --git a/src/core/lib/security/credentials/iam/iam_credentials.c b/src/core/lib/security/credentials/iam/iam_credentials.cc
index 3de8319d98..e9cf208c16 100644
--- a/src/core/lib/security/credentials/iam/iam_credentials.c
+++ b/src/core/lib/security/credentials/iam/iam_credentials.cc
@@ -64,7 +64,8 @@ grpc_call_credentials *grpc_google_iam_credentials_create(
GPR_ASSERT(reserved == NULL);
GPR_ASSERT(token != NULL);
GPR_ASSERT(authority_selector != NULL);
- grpc_google_iam_credentials *c = gpr_zalloc(sizeof(*c));
+ grpc_google_iam_credentials *c =
+ (grpc_google_iam_credentials *)gpr_zalloc(sizeof(*c));
c->base.type = GRPC_CALL_CREDENTIALS_TYPE_IAM;
c->base.vtable = &iam_vtable;
gpr_ref_init(&c->base.refcount, 1);
diff --git a/src/core/lib/security/credentials/jwt/json_token.c b/src/core/lib/security/credentials/jwt/json_token.cc
index fff71255a5..8c30353470 100644
--- a/src/core/lib/security/credentials/jwt/json_token.c
+++ b/src/core/lib/security/credentials/jwt/json_token.cc
@@ -20,6 +20,7 @@
#include <string.h>
+#include <grpc/grpc_security.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
@@ -29,9 +30,11 @@
#include "src/core/lib/slice/b64.h"
#include "src/core/lib/support/string.h"
+extern "C" {
#include <openssl/bio.h>
#include <openssl/evp.h>
#include <openssl/pem.h>
+}
/* --- Constants. --- */
@@ -96,7 +99,7 @@ grpc_auth_json_key grpc_auth_json_key_create_from_json(const grpc_json *json) {
gpr_log(GPR_ERROR, "Could not write into openssl BIO.");
goto end;
}
- result.private_key = PEM_read_bio_RSAPrivateKey(bio, NULL, NULL, "");
+ result.private_key = PEM_read_bio_RSAPrivateKey(bio, NULL, NULL, (void *)"");
if (result.private_key == NULL) {
gpr_log(GPR_ERROR, "Could not deserialize private key.");
goto end;
@@ -214,7 +217,7 @@ static char *dot_concat_and_free_strings(char *str1, char *str2) {
size_t str1_len = strlen(str1);
size_t str2_len = strlen(str2);
size_t result_len = str1_len + 1 /* dot */ + str2_len;
- char *result = gpr_malloc(result_len + 1 /* NULL terminated */);
+ char *result = (char *)gpr_malloc(result_len + 1 /* NULL terminated */);
char *current = result;
memcpy(current, str1, str1_len);
current += str1_len;
@@ -266,7 +269,7 @@ char *compute_and_encode_signature(const grpc_auth_json_key *json_key,
gpr_log(GPR_ERROR, "DigestFinal (get signature length) failed.");
goto end;
}
- sig = gpr_malloc(sig_len);
+ sig = (unsigned char *)gpr_malloc(sig_len);
if (EVP_DigestSignFinal(md_ctx, sig, &sig_len) != 1) {
gpr_log(GPR_ERROR, "DigestFinal (signature compute) failed.");
goto end;
diff --git a/src/core/lib/security/credentials/jwt/json_token.h b/src/core/lib/security/credentials/jwt/json_token.h
index e50790ef2e..b923b02df6 100644
--- a/src/core/lib/security/credentials/jwt/json_token.h
+++ b/src/core/lib/security/credentials/jwt/json_token.h
@@ -19,6 +19,10 @@
#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H
#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <grpc/slice.h>
#include <openssl/rsa.h>
@@ -70,4 +74,8 @@ typedef char *(*grpc_jwt_encode_and_sign_override)(
void grpc_jwt_encode_and_sign_set_override(
grpc_jwt_encode_and_sign_override func);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H */
diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.c b/src/core/lib/security/credentials/jwt/jwt_credentials.cc
index 02c82e99ba..835dd677ed 100644
--- a/src/core/lib/security/credentials/jwt/jwt_credentials.c
+++ b/src/core/lib/security/credentials/jwt/jwt_credentials.cc
@@ -16,8 +16,11 @@
*
*/
+#include <grpc/support/port_platform.h>
+
#include "src/core/lib/security/credentials/jwt/jwt_credentials.h"
+#include <inttypes.h>
#include <string.h>
#include "src/core/lib/surface/api_trace.h"
@@ -125,7 +128,8 @@ grpc_service_account_jwt_access_credentials_create_from_auth_json_key(
gpr_log(GPR_ERROR, "Invalid input for jwt credentials creation");
return NULL;
}
- c = gpr_zalloc(sizeof(grpc_service_account_jwt_access_credentials));
+ c = (grpc_service_account_jwt_access_credentials *)gpr_zalloc(
+ sizeof(grpc_service_account_jwt_access_credentials));
c->base.type = GRPC_CALL_CREDENTIALS_TYPE_JWT;
gpr_ref_init(&c->base.refcount, 1);
c->base.vtable = &jwt_vtable;
diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.h b/src/core/lib/security/credentials/jwt/jwt_credentials.h
index 07f4022669..c09485fd55 100644
--- a/src/core/lib/security/credentials/jwt/jwt_credentials.h
+++ b/src/core/lib/security/credentials/jwt/jwt_credentials.h
@@ -22,6 +22,10 @@
#include "src/core/lib/security/credentials/credentials.h"
#include "src/core/lib/security/credentials/jwt/json_token.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct {
grpc_call_credentials base;
@@ -45,4 +49,8 @@ grpc_service_account_jwt_access_credentials_create_from_auth_json_key(
grpc_exec_ctx *exec_ctx, grpc_auth_json_key key,
gpr_timespec token_lifetime);
-#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_CREDENTIALS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_CREDENTIALS_H */ \ No newline at end of file
diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.c b/src/core/lib/security/credentials/jwt/jwt_verifier.cc
index a27284bc50..39e72c195b 100644
--- a/src/core/lib/security/credentials/jwt/jwt_verifier.c
+++ b/src/core/lib/security/credentials/jwt/jwt_verifier.cc
@@ -26,7 +26,10 @@
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
#include <grpc/support/useful.h>
+
+extern "C" {
#include <openssl/pem.h>
+}
#include "src/core/lib/http/httpcli.h"
#include "src/core/lib/iomgr/polling_entity.h"
@@ -129,7 +132,7 @@ static void jose_header_destroy(grpc_exec_ctx *exec_ctx, jose_header *h) {
static jose_header *jose_header_from_json(grpc_exec_ctx *exec_ctx,
grpc_json *json, grpc_slice buffer) {
grpc_json *cur;
- jose_header *h = gpr_zalloc(sizeof(jose_header));
+ jose_header *h = (jose_header *)gpr_zalloc(sizeof(jose_header));
h->buffer = buffer;
for (cur = json->child; cur != NULL; cur = cur->next) {
if (strcmp(cur->key, "alg") == 0) {
@@ -231,7 +234,8 @@ gpr_timespec grpc_jwt_claims_not_before(const grpc_jwt_claims *claims) {
grpc_jwt_claims *grpc_jwt_claims_from_json(grpc_exec_ctx *exec_ctx,
grpc_json *json, grpc_slice buffer) {
grpc_json *cur;
- grpc_jwt_claims *claims = gpr_malloc(sizeof(grpc_jwt_claims));
+ grpc_jwt_claims *claims =
+ (grpc_jwt_claims *)gpr_malloc(sizeof(grpc_jwt_claims));
memset(claims, 0, sizeof(grpc_jwt_claims));
claims->json = json;
claims->buffer = buffer;
@@ -347,7 +351,7 @@ static verifier_cb_ctx *verifier_cb_ctx_create(
const char *signed_jwt, size_t signed_jwt_len, void *user_data,
grpc_jwt_verification_done_cb cb) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- verifier_cb_ctx *ctx = gpr_zalloc(sizeof(verifier_cb_ctx));
+ verifier_cb_ctx *ctx = (verifier_cb_ctx *)gpr_zalloc(sizeof(verifier_cb_ctx));
ctx->verifier = verifier;
ctx->pollent = grpc_polling_entity_create_from_pollset(pollset);
ctx->header = header;
@@ -380,7 +384,7 @@ void verifier_cb_ctx_destroy(grpc_exec_ctx *exec_ctx, verifier_cb_ctx *ctx) {
gpr_timespec grpc_jwt_verifier_clock_skew = {60, 0, GPR_TIMESPAN};
/* Max delay defaults to one minute. */
-gpr_timespec grpc_jwt_verifier_max_delay = {60, 0, GPR_TIMESPAN};
+grpc_millis grpc_jwt_verifier_max_delay = 60 * GPR_MS_PER_SEC;
typedef struct {
char *email_domain;
@@ -676,6 +680,7 @@ static void on_openid_config_retrieved(grpc_exec_ctx *exec_ctx, void *user_data,
grpc_json *json = json_from_http(response);
grpc_httpcli_request req;
const char *jwks_uri;
+ grpc_resource_quota *resource_quota = NULL;
/* TODO(jboeuf): Cache the jwks_uri in order to avoid this hop next time. */
if (json == NULL) goto error;
@@ -693,9 +698,9 @@ static void on_openid_config_retrieved(grpc_exec_ctx *exec_ctx, void *user_data,
jwks_uri += 8;
req.handshaker = &grpc_httpcli_ssl;
req.host = gpr_strdup(jwks_uri);
- req.http.path = strchr(jwks_uri, '/');
+ req.http.path = (char *)strchr(jwks_uri, '/');
if (req.http.path == NULL) {
- req.http.path = "";
+ req.http.path = (char *)"";
} else {
*(req.host + (req.http.path - jwks_uri)) = '\0';
}
@@ -703,11 +708,10 @@ static void on_openid_config_retrieved(grpc_exec_ctx *exec_ctx, void *user_data,
/* TODO(ctiller): Carry the resource_quota in ctx and share it with the host
channel. This would allow us to cancel an authentication query when under
extreme memory pressure. */
- grpc_resource_quota *resource_quota =
- grpc_resource_quota_create("jwt_verifier");
+ resource_quota = grpc_resource_quota_create("jwt_verifier");
grpc_httpcli_get(
exec_ctx, &ctx->verifier->http_ctx, &ctx->pollent, resource_quota, &req,
- gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay),
+ grpc_exec_ctx_now(exec_ctx) + grpc_jwt_verifier_max_delay,
GRPC_CLOSURE_CREATE(on_keys_retrieved, ctx, grpc_schedule_on_exec_ctx),
&ctx->responses[HTTP_RESPONSE_KEYS]);
grpc_resource_quota_unref_internal(exec_ctx, resource_quota);
@@ -760,7 +764,8 @@ const char *grpc_jwt_issuer_email_domain(const char *issuer) {
if (dot == NULL || dot == email_domain) return email_domain;
GPR_ASSERT(dot > email_domain);
/* There may be a subdomain, we just want the domain. */
- dot = gpr_memrchr(email_domain, '.', (size_t)(dot - email_domain));
+ dot = (const char *)gpr_memrchr((void *)email_domain, '.',
+ (size_t)(dot - email_domain));
if (dot == NULL) return email_domain;
return dot + 1;
}
@@ -773,6 +778,7 @@ static void retrieve_key_and_verify(grpc_exec_ctx *exec_ctx,
char *path_prefix = NULL;
const char *iss;
grpc_httpcli_request req;
+ grpc_resource_quota *resource_quota = NULL;
memset(&req, 0, sizeof(grpc_httpcli_request));
req.handshaker = &grpc_httpcli_ssl;
http_response_index rsp_idx;
@@ -831,12 +837,11 @@ static void retrieve_key_and_verify(grpc_exec_ctx *exec_ctx,
/* TODO(ctiller): Carry the resource_quota in ctx and share it with the host
channel. This would allow us to cancel an authentication query when under
extreme memory pressure. */
- grpc_resource_quota *resource_quota =
- grpc_resource_quota_create("jwt_verifier");
- grpc_httpcli_get(
- exec_ctx, &ctx->verifier->http_ctx, &ctx->pollent, resource_quota, &req,
- gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay),
- http_cb, &ctx->responses[rsp_idx]);
+ resource_quota = grpc_resource_quota_create("jwt_verifier");
+ grpc_httpcli_get(exec_ctx, &ctx->verifier->http_ctx, &ctx->pollent,
+ resource_quota, &req,
+ grpc_exec_ctx_now(exec_ctx) + grpc_jwt_verifier_max_delay,
+ http_cb, &ctx->responses[rsp_idx]);
grpc_resource_quota_unref_internal(exec_ctx, resource_quota);
gpr_free(req.host);
gpr_free(req.http.path);
@@ -901,12 +906,14 @@ error:
grpc_jwt_verifier *grpc_jwt_verifier_create(
const grpc_jwt_verifier_email_domain_key_url_mapping *mappings,
size_t num_mappings) {
- grpc_jwt_verifier *v = gpr_zalloc(sizeof(grpc_jwt_verifier));
+ grpc_jwt_verifier *v =
+ (grpc_jwt_verifier *)gpr_zalloc(sizeof(grpc_jwt_verifier));
grpc_httpcli_context_init(&v->http_ctx);
/* We know at least of one mapping. */
v->allocated_mappings = 1 + num_mappings;
- v->mappings = gpr_malloc(v->allocated_mappings * sizeof(email_key_mapping));
+ v->mappings = (email_key_mapping *)gpr_malloc(v->allocated_mappings *
+ sizeof(email_key_mapping));
verifier_put_mapping(v, GRPC_GOOGLE_SERVICE_ACCOUNTS_EMAIL_DOMAIN,
GRPC_GOOGLE_SERVICE_ACCOUNTS_KEY_URL_PREFIX);
/* User-Provided mappings. */
diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.h b/src/core/lib/security/credentials/jwt/jwt_verifier.h
index 8fac452d4e..998365e75c 100644
--- a/src/core/lib/security/credentials/jwt/jwt_verifier.h
+++ b/src/core/lib/security/credentials/jwt/jwt_verifier.h
@@ -32,6 +32,10 @@
#define GRPC_GOOGLE_SERVICE_ACCOUNTS_KEY_URL_PREFIX \
"www.googleapis.com/robot/v1/metadata/x509"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* --- grpc_jwt_verifier_status. --- */
typedef enum {
@@ -81,7 +85,7 @@ typedef struct {
/* Globals to control the verifier. Not thread-safe. */
extern gpr_timespec grpc_jwt_verifier_clock_skew;
-extern gpr_timespec grpc_jwt_verifier_max_delay;
+extern grpc_millis grpc_jwt_verifier_max_delay;
/* The verifier can be created with some custom mappings to help with key
discovery in the case where the issuer is an email address.
@@ -122,4 +126,8 @@ grpc_jwt_verifier_status grpc_jwt_claims_check(const grpc_jwt_claims *claims,
const char *audience);
const char *grpc_jwt_issuer_email_domain(const char *issuer);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_VERIFIER_H */
diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
index 10b270c49c..f52a424e36 100644
--- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c
+++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
@@ -117,7 +117,7 @@ static void oauth2_token_fetcher_destruct(grpc_exec_ctx *exec_ctx,
grpc_credentials_status
grpc_oauth2_token_fetcher_credentials_parse_server_response(
grpc_exec_ctx *exec_ctx, const grpc_http_response *response,
- grpc_mdelem *token_md, gpr_timespec *token_lifetime) {
+ grpc_mdelem *token_md, grpc_millis *token_lifetime) {
char *null_terminated_body = NULL;
char *new_access_token = NULL;
grpc_credentials_status status = GRPC_CREDENTIALS_OK;
@@ -130,7 +130,7 @@ grpc_oauth2_token_fetcher_credentials_parse_server_response(
}
if (response->body_length > 0) {
- null_terminated_body = gpr_malloc(response->body_length + 1);
+ null_terminated_body = (char *)gpr_malloc(response->body_length + 1);
null_terminated_body[response->body_length] = '\0';
memcpy(null_terminated_body, response->body, response->body_length);
}
@@ -183,9 +183,7 @@ grpc_oauth2_token_fetcher_credentials_parse_server_response(
}
gpr_asprintf(&new_access_token, "%s %s", token_type->value,
access_token->value);
- token_lifetime->tv_sec = strtol(expires_in->value, NULL, 10);
- token_lifetime->tv_nsec = 0;
- token_lifetime->clock_type = GPR_TIMESPAN;
+ *token_lifetime = strtol(expires_in->value, NULL, 10) * GPR_MS_PER_SEC;
if (!GRPC_MDISNULL(*token_md)) GRPC_MDELEM_UNREF(exec_ctx, *token_md);
*token_md = grpc_mdelem_from_slices(
exec_ctx,
@@ -214,7 +212,7 @@ static void on_oauth2_token_fetcher_http_response(grpc_exec_ctx *exec_ctx,
grpc_oauth2_token_fetcher_credentials *c =
(grpc_oauth2_token_fetcher_credentials *)r->creds;
grpc_mdelem access_token_md = GRPC_MDNULL;
- gpr_timespec token_lifetime;
+ grpc_millis token_lifetime;
grpc_credentials_status status =
grpc_oauth2_token_fetcher_credentials_parse_server_response(
exec_ctx, &r->response, &access_token_md, &token_lifetime);
@@ -222,10 +220,9 @@ static void on_oauth2_token_fetcher_http_response(grpc_exec_ctx *exec_ctx,
gpr_mu_lock(&c->mu);
c->token_fetch_pending = false;
c->access_token_md = GRPC_MDELEM_REF(access_token_md);
- c->token_expiration =
- status == GRPC_CREDENTIALS_OK
- ? gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), token_lifetime)
- : gpr_inf_past(GPR_CLOCK_REALTIME);
+ c->token_expiration = status == GRPC_CREDENTIALS_OK
+ ? grpc_exec_ctx_now(exec_ctx) + token_lifetime
+ : 0;
grpc_oauth2_pending_get_request_metadata *pending_request =
c->pending_requests;
c->pending_requests = NULL;
@@ -260,14 +257,12 @@ static bool oauth2_token_fetcher_get_request_metadata(
grpc_oauth2_token_fetcher_credentials *c =
(grpc_oauth2_token_fetcher_credentials *)creds;
// Check if we can use the cached token.
- gpr_timespec refresh_threshold = gpr_time_from_seconds(
- GRPC_SECURE_TOKEN_REFRESH_THRESHOLD_SECS, GPR_TIMESPAN);
+ grpc_millis refresh_threshold =
+ GRPC_SECURE_TOKEN_REFRESH_THRESHOLD_SECS * GPR_MS_PER_SEC;
grpc_mdelem cached_access_token_md = GRPC_MDNULL;
gpr_mu_lock(&c->mu);
if (!GRPC_MDISNULL(c->access_token_md) &&
- (gpr_time_cmp(
- gpr_time_sub(c->token_expiration, gpr_now(GPR_CLOCK_REALTIME)),
- refresh_threshold) > 0)) {
+ (c->token_expiration + grpc_exec_ctx_now(exec_ctx) > refresh_threshold)) {
cached_access_token_md = GRPC_MDELEM_REF(c->access_token_md);
}
if (!GRPC_MDISNULL(cached_access_token_md)) {
@@ -296,10 +291,10 @@ static bool oauth2_token_fetcher_get_request_metadata(
gpr_mu_unlock(&c->mu);
if (start_fetch) {
grpc_call_credentials_ref(creds);
- c->fetch_func(
- exec_ctx, grpc_credentials_metadata_request_create(creds),
- &c->httpcli_context, &c->pollent, on_oauth2_token_fetcher_http_response,
- gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), refresh_threshold));
+ c->fetch_func(exec_ctx, grpc_credentials_metadata_request_create(creds),
+ &c->httpcli_context, &c->pollent,
+ on_oauth2_token_fetcher_http_response,
+ grpc_exec_ctx_now(exec_ctx) + refresh_threshold);
}
return false;
}
@@ -340,7 +335,7 @@ static void init_oauth2_token_fetcher(grpc_oauth2_token_fetcher_credentials *c,
c->base.type = GRPC_CALL_CREDENTIALS_TYPE_OAUTH2;
gpr_ref_init(&c->base.refcount, 1);
gpr_mu_init(&c->mu);
- c->token_expiration = gpr_inf_past(GPR_CLOCK_REALTIME);
+ c->token_expiration = 0;
c->fetch_func = fetch_func;
c->pollent =
grpc_polling_entity_create_from_pollset_set(grpc_pollset_set_create());
@@ -358,12 +353,12 @@ static grpc_call_credentials_vtable compute_engine_vtable = {
static void compute_engine_fetch_oauth2(
grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *metadata_req,
grpc_httpcli_context *httpcli_context, grpc_polling_entity *pollent,
- grpc_iomgr_cb_func response_cb, gpr_timespec deadline) {
- grpc_http_header header = {"Metadata-Flavor", "Google"};
+ grpc_iomgr_cb_func response_cb, grpc_millis deadline) {
+ grpc_http_header header = {(char *)"Metadata-Flavor", (char *)"Google"};
grpc_httpcli_request request;
memset(&request, 0, sizeof(grpc_httpcli_request));
- request.host = GRPC_COMPUTE_ENGINE_METADATA_HOST;
- request.http.path = GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH;
+ request.host = (char *)GRPC_COMPUTE_ENGINE_METADATA_HOST;
+ request.http.path = (char *)GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH;
request.http.hdr_count = 1;
request.http.hdrs = &header;
/* TODO(ctiller): Carry the resource_quota in ctx and share it with the host
@@ -381,7 +376,8 @@ static void compute_engine_fetch_oauth2(
grpc_call_credentials *grpc_google_compute_engine_credentials_create(
void *reserved) {
grpc_oauth2_token_fetcher_credentials *c =
- gpr_malloc(sizeof(grpc_oauth2_token_fetcher_credentials));
+ (grpc_oauth2_token_fetcher_credentials *)gpr_malloc(
+ sizeof(grpc_oauth2_token_fetcher_credentials));
GRPC_API_TRACE("grpc_compute_engine_credentials_create(reserved=%p)", 1,
(reserved));
GPR_ASSERT(reserved == NULL);
@@ -409,19 +405,19 @@ static grpc_call_credentials_vtable refresh_token_vtable = {
static void refresh_token_fetch_oauth2(
grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *metadata_req,
grpc_httpcli_context *httpcli_context, grpc_polling_entity *pollent,
- grpc_iomgr_cb_func response_cb, gpr_timespec deadline) {
+ grpc_iomgr_cb_func response_cb, grpc_millis deadline) {
grpc_google_refresh_token_credentials *c =
(grpc_google_refresh_token_credentials *)metadata_req->creds;
- grpc_http_header header = {"Content-Type",
- "application/x-www-form-urlencoded"};
+ grpc_http_header header = {(char *)"Content-Type",
+ (char *)"application/x-www-form-urlencoded"};
grpc_httpcli_request request;
char *body = NULL;
gpr_asprintf(&body, GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING,
c->refresh_token.client_id, c->refresh_token.client_secret,
c->refresh_token.refresh_token);
memset(&request, 0, sizeof(grpc_httpcli_request));
- request.host = GRPC_GOOGLE_OAUTH2_SERVICE_HOST;
- request.http.path = GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH;
+ request.host = (char *)GRPC_GOOGLE_OAUTH2_SERVICE_HOST;
+ request.http.path = (char *)GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH;
request.http.hdr_count = 1;
request.http.hdrs = &header;
request.handshaker = &grpc_httpcli_ssl;
@@ -447,7 +443,8 @@ grpc_refresh_token_credentials_create_from_auth_refresh_token(
gpr_log(GPR_ERROR, "Invalid input for refresh token credentials creation");
return NULL;
}
- c = gpr_zalloc(sizeof(grpc_google_refresh_token_credentials));
+ c = (grpc_google_refresh_token_credentials *)gpr_zalloc(
+ sizeof(grpc_google_refresh_token_credentials));
init_oauth2_token_fetcher(&c->base, refresh_token_fetch_oauth2);
c->base.base.vtable = &refresh_token_vtable;
c->refresh_token = refresh_token;
@@ -515,7 +512,8 @@ static grpc_call_credentials_vtable access_token_vtable = {
grpc_call_credentials *grpc_access_token_credentials_create(
const char *access_token, void *reserved) {
grpc_access_token_credentials *c =
- gpr_zalloc(sizeof(grpc_access_token_credentials));
+ (grpc_access_token_credentials *)gpr_zalloc(
+ sizeof(grpc_access_token_credentials));
GRPC_API_TRACE(
"grpc_access_token_credentials_create(access_token=<redacted>, "
"reserved=%p)",
diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h
index d9ad6691b8..4beaec93e3 100644
--- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h
+++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h
@@ -22,6 +22,10 @@
#include "src/core/lib/json/json.h"
#include "src/core/lib/security/credentials/credentials.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// auth_refresh_token parsing.
typedef struct {
const char *type;
@@ -57,7 +61,7 @@ typedef void (*grpc_fetch_oauth2_func)(grpc_exec_ctx *exec_ctx,
grpc_httpcli_context *http_context,
grpc_polling_entity *pollent,
grpc_iomgr_cb_func cb,
- gpr_timespec deadline);
+ grpc_millis deadline);
typedef struct grpc_oauth2_pending_get_request_metadata {
grpc_credentials_mdelem_array *md_array;
@@ -70,7 +74,7 @@ typedef struct {
grpc_call_credentials base;
gpr_mu mu;
grpc_mdelem access_token_md;
- gpr_timespec token_expiration;
+ grpc_millis token_expiration;
bool token_fetch_pending;
grpc_oauth2_pending_get_request_metadata *pending_requests;
grpc_httpcli_context httpcli_context;
@@ -100,6 +104,10 @@ grpc_refresh_token_credentials_create_from_auth_refresh_token(
grpc_credentials_status
grpc_oauth2_token_fetcher_credentials_parse_server_response(
grpc_exec_ctx *exec_ctx, const struct grpc_http_response *response,
- grpc_mdelem *token_md, gpr_timespec *token_lifetime);
+ grpc_mdelem *token_md, grpc_millis *token_lifetime);
+
+#ifdef __cplusplus
+}
+#endif
-#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_OAUTH2_CREDENTIALS_H */
+#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_OAUTH2_CREDENTIALS_H */ \ No newline at end of file
diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.c b/src/core/lib/security/credentials/plugin/plugin_credentials.cc
index 73e0c23e0f..8106a730fe 100644
--- a/src/core/lib/security/credentials/plugin/plugin_credentials.c
+++ b/src/core/lib/security/credentials/plugin/plugin_credentials.cc
@@ -31,6 +31,9 @@
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/validate_metadata.h"
+grpc_tracer_flag grpc_plugin_credentials_trace =
+ GRPC_TRACER_INITIALIZER(false, "plugin_credentials");
+
static void plugin_destruct(grpc_exec_ctx *exec_ctx,
grpc_call_credentials *creds) {
grpc_plugin_credentials *c = (grpc_plugin_credentials *)creds;
@@ -53,6 +56,62 @@ static void pending_request_remove_locked(
}
}
+// Checks if the request has been cancelled.
+// If not, removes it from the pending list, so that it cannot be
+// cancelled out from under us.
+// When this returns, r->cancelled indicates whether the request was
+// cancelled before completion.
+static void pending_request_complete(
+ grpc_exec_ctx *exec_ctx, grpc_plugin_credentials_pending_request *r) {
+ gpr_mu_lock(&r->creds->mu);
+ if (!r->cancelled) pending_request_remove_locked(r->creds, r);
+ gpr_mu_unlock(&r->creds->mu);
+ // Ref to credentials not needed anymore.
+ grpc_call_credentials_unref(exec_ctx, &r->creds->base);
+}
+
+static grpc_error *process_plugin_result(
+ grpc_exec_ctx *exec_ctx, grpc_plugin_credentials_pending_request *r,
+ const grpc_metadata *md, size_t num_md, grpc_status_code status,
+ const char *error_details) {
+ grpc_error *error = GRPC_ERROR_NONE;
+ if (status != GRPC_STATUS_OK) {
+ char *msg;
+ gpr_asprintf(&msg, "Getting metadata from plugin failed with error: %s",
+ error_details);
+ error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg);
+ gpr_free(msg);
+ } else {
+ bool seen_illegal_header = false;
+ for (size_t i = 0; i < num_md; ++i) {
+ if (!GRPC_LOG_IF_ERROR("validate_metadata_from_plugin",
+ grpc_validate_header_key_is_legal(md[i].key))) {
+ seen_illegal_header = true;
+ break;
+ } else if (!grpc_is_binary_header(md[i].key) &&
+ !GRPC_LOG_IF_ERROR(
+ "validate_metadata_from_plugin",
+ grpc_validate_header_nonbin_value_is_legal(md[i].value))) {
+ gpr_log(GPR_ERROR, "Plugin added invalid metadata value.");
+ seen_illegal_header = true;
+ break;
+ }
+ }
+ if (seen_illegal_header) {
+ error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Illegal metadata");
+ } else {
+ for (size_t i = 0; i < num_md; ++i) {
+ grpc_mdelem mdelem = grpc_mdelem_from_slices(
+ exec_ctx, grpc_slice_ref_internal(md[i].key),
+ grpc_slice_ref_internal(md[i].value));
+ grpc_credentials_mdelem_array_add(r->md_array, mdelem);
+ GRPC_MDELEM_UNREF(exec_ctx, mdelem);
+ }
+ }
+ }
+ return error;
+}
+
static void plugin_md_request_metadata_ready(void *request,
const grpc_metadata *md,
size_t num_md,
@@ -64,54 +123,24 @@ static void plugin_md_request_metadata_ready(void *request,
NULL, NULL);
grpc_plugin_credentials_pending_request *r =
(grpc_plugin_credentials_pending_request *)request;
- // Check if the request has been cancelled.
- // If not, remove it from the pending list, so that it cannot be
- // cancelled out from under us.
- gpr_mu_lock(&r->creds->mu);
- if (!r->cancelled) pending_request_remove_locked(r->creds, r);
- gpr_mu_unlock(&r->creds->mu);
- grpc_call_credentials_unref(&exec_ctx, &r->creds->base);
+ if (GRPC_TRACER_ON(grpc_plugin_credentials_trace)) {
+ gpr_log(GPR_INFO,
+ "plugin_credentials[%p]: request %p: plugin returned "
+ "asynchronously",
+ r->creds, r);
+ }
+ // Remove request from pending list if not previously cancelled.
+ pending_request_complete(&exec_ctx, r);
// If it has not been cancelled, process it.
if (!r->cancelled) {
- if (status != GRPC_STATUS_OK) {
- char *msg;
- gpr_asprintf(&msg, "Getting metadata from plugin failed with error: %s",
- error_details);
- GRPC_CLOSURE_SCHED(&exec_ctx, r->on_request_metadata,
- GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg));
- gpr_free(msg);
- } else {
- bool seen_illegal_header = false;
- for (size_t i = 0; i < num_md; ++i) {
- if (!GRPC_LOG_IF_ERROR("validate_metadata_from_plugin",
- grpc_validate_header_key_is_legal(md[i].key))) {
- seen_illegal_header = true;
- break;
- } else if (!grpc_is_binary_header(md[i].key) &&
- !GRPC_LOG_IF_ERROR(
- "validate_metadata_from_plugin",
- grpc_validate_header_nonbin_value_is_legal(
- md[i].value))) {
- gpr_log(GPR_ERROR, "Plugin added invalid metadata value.");
- seen_illegal_header = true;
- break;
- }
- }
- if (seen_illegal_header) {
- GRPC_CLOSURE_SCHED(
- &exec_ctx, r->on_request_metadata,
- GRPC_ERROR_CREATE_FROM_STATIC_STRING("Illegal metadata"));
- } else {
- for (size_t i = 0; i < num_md; ++i) {
- grpc_mdelem mdelem = grpc_mdelem_from_slices(
- &exec_ctx, grpc_slice_ref_internal(md[i].key),
- grpc_slice_ref_internal(md[i].value));
- grpc_credentials_mdelem_array_add(r->md_array, mdelem);
- GRPC_MDELEM_UNREF(&exec_ctx, mdelem);
- }
- GRPC_CLOSURE_SCHED(&exec_ctx, r->on_request_metadata, GRPC_ERROR_NONE);
- }
- }
+ grpc_error *error =
+ process_plugin_result(&exec_ctx, r, md, num_md, status, error_details);
+ GRPC_CLOSURE_SCHED(&exec_ctx, r->on_request_metadata, error);
+ } else if (GRPC_TRACER_ON(grpc_plugin_credentials_trace)) {
+ gpr_log(GPR_INFO,
+ "plugin_credentials[%p]: request %p: plugin was previously "
+ "cancelled",
+ r->creds, r);
}
gpr_free(r);
grpc_exec_ctx_finish(&exec_ctx);
@@ -125,6 +154,7 @@ static bool plugin_get_request_metadata(grpc_exec_ctx *exec_ctx,
grpc_closure *on_request_metadata,
grpc_error **error) {
grpc_plugin_credentials *c = (grpc_plugin_credentials *)creds;
+ bool retval = true; // Synchronous return.
if (c->plugin.get_metadata != NULL) {
// Create pending_request object.
grpc_plugin_credentials_pending_request *pending_request =
@@ -142,12 +172,60 @@ static bool plugin_get_request_metadata(grpc_exec_ctx *exec_ctx,
c->pending_requests = pending_request;
gpr_mu_unlock(&c->mu);
// Invoke the plugin. The callback holds a ref to us.
+ if (GRPC_TRACER_ON(grpc_plugin_credentials_trace)) {
+ gpr_log(GPR_INFO, "plugin_credentials[%p]: request %p: invoking plugin",
+ c, pending_request);
+ }
grpc_call_credentials_ref(creds);
- c->plugin.get_metadata(c->plugin.state, context,
- plugin_md_request_metadata_ready, pending_request);
- return false;
+ grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX];
+ size_t num_creds_md = 0;
+ grpc_status_code status = GRPC_STATUS_OK;
+ const char *error_details = NULL;
+ if (!c->plugin.get_metadata(c->plugin.state, context,
+ plugin_md_request_metadata_ready,
+ pending_request, creds_md, &num_creds_md,
+ &status, &error_details)) {
+ if (GRPC_TRACER_ON(grpc_plugin_credentials_trace)) {
+ gpr_log(GPR_INFO,
+ "plugin_credentials[%p]: request %p: plugin will return "
+ "asynchronously",
+ c, pending_request);
+ }
+ return false; // Asynchronous return.
+ }
+ // Returned synchronously.
+ // Remove request from pending list if not previously cancelled.
+ pending_request_complete(exec_ctx, pending_request);
+ // If the request was cancelled, the error will have been returned
+ // asynchronously by plugin_cancel_get_request_metadata(), so return
+ // false. Otherwise, process the result.
+ if (pending_request->cancelled) {
+ if (GRPC_TRACER_ON(grpc_plugin_credentials_trace)) {
+ gpr_log(GPR_INFO,
+ "plugin_credentials[%p]: request %p was cancelled, error "
+ "will be returned asynchronously",
+ c, pending_request);
+ }
+ retval = false;
+ } else {
+ if (GRPC_TRACER_ON(grpc_plugin_credentials_trace)) {
+ gpr_log(GPR_INFO,
+ "plugin_credentials[%p]: request %p: plugin returned "
+ "synchronously",
+ c, pending_request);
+ }
+ *error = process_plugin_result(exec_ctx, pending_request, creds_md,
+ num_creds_md, status, error_details);
+ }
+ // Clean up.
+ for (size_t i = 0; i < num_creds_md; ++i) {
+ grpc_slice_unref_internal(exec_ctx, creds_md[i].key);
+ grpc_slice_unref_internal(exec_ctx, creds_md[i].value);
+ }
+ gpr_free((void *)error_details);
+ gpr_free(pending_request);
}
- return true;
+ return retval;
}
static void plugin_cancel_get_request_metadata(
@@ -159,6 +237,10 @@ static void plugin_cancel_get_request_metadata(
c->pending_requests;
pending_request != NULL; pending_request = pending_request->next) {
if (pending_request->md_array == md_array) {
+ if (GRPC_TRACER_ON(grpc_plugin_credentials_trace)) {
+ gpr_log(GPR_INFO, "plugin_credentials[%p]: cancelling request %p", c,
+ pending_request);
+ }
pending_request->cancelled = true;
GRPC_CLOSURE_SCHED(exec_ctx, pending_request->on_request_metadata,
GRPC_ERROR_REF(error));
@@ -176,7 +258,8 @@ static grpc_call_credentials_vtable plugin_vtable = {
grpc_call_credentials *grpc_metadata_credentials_create_from_plugin(
grpc_metadata_credentials_plugin plugin, void *reserved) {
- grpc_plugin_credentials *c = gpr_zalloc(sizeof(*c));
+ grpc_plugin_credentials *c =
+ (grpc_plugin_credentials *)gpr_zalloc(sizeof(*c));
GRPC_API_TRACE("grpc_metadata_credentials_create_from_plugin(reserved=%p)", 1,
(reserved));
GPR_ASSERT(reserved == NULL);
diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.h b/src/core/lib/security/credentials/plugin/plugin_credentials.h
index 57266d589a..f56df9eac5 100644
--- a/src/core/lib/security/credentials/plugin/plugin_credentials.h
+++ b/src/core/lib/security/credentials/plugin/plugin_credentials.h
@@ -21,6 +21,8 @@
#include "src/core/lib/security/credentials/credentials.h"
+extern grpc_tracer_flag grpc_plugin_credentials_trace;
+
struct grpc_plugin_credentials;
typedef struct grpc_plugin_credentials_pending_request {
diff --git a/src/core/lib/security/credentials/ssl/ssl_credentials.c b/src/core/lib/security/credentials/ssl/ssl_credentials.cc
index 006db1ec76..9df69a2a3d 100644
--- a/src/core/lib/security/credentials/ssl/ssl_credentials.c
+++ b/src/core/lib/security/credentials/ssl/ssl_credentials.cc
@@ -66,8 +66,8 @@ static grpc_security_status ssl_create_security_connector(
if (status != GRPC_SECURITY_OK) {
return status;
}
- grpc_arg new_arg =
- grpc_channel_arg_string_create(GRPC_ARG_HTTP2_SCHEME, "https");
+ grpc_arg new_arg = grpc_channel_arg_string_create(
+ (char *)GRPC_ARG_HTTP2_SCHEME, (char *)"https");
*new_args = grpc_channel_args_copy_and_add(args, &new_arg, 1);
return status;
}
@@ -94,7 +94,8 @@ static void ssl_build_config(const char *pem_root_certs,
grpc_channel_credentials *grpc_ssl_credentials_create(
const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pair,
void *reserved) {
- grpc_ssl_credentials *c = gpr_zalloc(sizeof(grpc_ssl_credentials));
+ grpc_ssl_credentials *c =
+ (grpc_ssl_credentials *)gpr_zalloc(sizeof(grpc_ssl_credentials));
GRPC_API_TRACE(
"grpc_ssl_credentials_create(pem_root_certs=%s, "
"pem_key_cert_pair=%p, "
@@ -145,8 +146,8 @@ static void ssl_build_server_config(
}
if (num_key_cert_pairs > 0) {
GPR_ASSERT(pem_key_cert_pairs != NULL);
- config->pem_key_cert_pairs =
- gpr_zalloc(num_key_cert_pairs * sizeof(tsi_ssl_pem_key_cert_pair));
+ config->pem_key_cert_pairs = (tsi_ssl_pem_key_cert_pair *)gpr_zalloc(
+ num_key_cert_pairs * sizeof(tsi_ssl_pem_key_cert_pair));
}
config->num_key_cert_pairs = num_key_cert_pairs;
for (i = 0; i < num_key_cert_pairs; i++) {
@@ -175,8 +176,8 @@ grpc_server_credentials *grpc_ssl_server_credentials_create_ex(
size_t num_key_cert_pairs,
grpc_ssl_client_certificate_request_type client_certificate_request,
void *reserved) {
- grpc_ssl_server_credentials *c =
- gpr_zalloc(sizeof(grpc_ssl_server_credentials));
+ grpc_ssl_server_credentials *c = (grpc_ssl_server_credentials *)gpr_zalloc(
+ sizeof(grpc_ssl_server_credentials));
GRPC_API_TRACE(
"grpc_ssl_server_credentials_create_ex("
"pem_root_certs=%s, pem_key_cert_pairs=%p, num_key_cert_pairs=%lu, "
diff --git a/src/core/lib/security/transport/auth_filters.h b/src/core/lib/security/transport/auth_filters.h
index bd5902a128..ba5df7fe70 100644
--- a/src/core/lib/security/transport/auth_filters.h
+++ b/src/core/lib/security/transport/auth_filters.h
@@ -21,7 +21,15 @@
#include "src/core/lib/channel/channel_stack.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern const grpc_channel_filter grpc_client_auth_filter;
extern const grpc_channel_filter grpc_server_auth_filter;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_AUTH_FILTERS_H */
diff --git a/src/core/lib/security/transport/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.cc
index dd7dd44e79..a8464dbf9e 100644
--- a/src/core/lib/security/transport/client_auth_filter.c
+++ b/src/core/lib/security/transport/client_auth_filter.cc
@@ -93,8 +93,9 @@ static void add_error(grpc_error **combined, grpc_error *error) {
static void on_credentials_metadata(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error *input_error) {
grpc_transport_stream_op_batch *batch = (grpc_transport_stream_op_batch *)arg;
- grpc_call_element *elem = batch->handler_private.extra_arg;
- call_data *calld = elem->call_data;
+ grpc_call_element *elem =
+ (grpc_call_element *)batch->handler_private.extra_arg;
+ call_data *calld = (call_data *)elem->call_data;
reset_auth_metadata_context(&calld->auth_md_context);
grpc_error *error = GRPC_ERROR_REF(input_error);
if (error == GRPC_ERROR_NONE) {
@@ -163,8 +164,8 @@ static void cancel_get_request_metadata(grpc_exec_ctx *exec_ctx, void *arg,
static void send_security_metadata(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_transport_stream_op_batch *batch) {
- call_data *calld = elem->call_data;
- channel_data *chand = elem->channel_data;
+ call_data *calld = (call_data *)elem->call_data;
+ channel_data *chand = (channel_data *)elem->channel_data;
grpc_client_security_context *ctx =
(grpc_client_security_context *)batch->payload
->context[GRPC_CONTEXT_SECURITY]
@@ -225,8 +226,9 @@ static void send_security_metadata(grpc_exec_ctx *exec_ctx,
static void on_host_checked(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error *error) {
grpc_transport_stream_op_batch *batch = (grpc_transport_stream_op_batch *)arg;
- grpc_call_element *elem = batch->handler_private.extra_arg;
- call_data *calld = elem->call_data;
+ grpc_call_element *elem =
+ (grpc_call_element *)batch->handler_private.extra_arg;
+ call_data *calld = (call_data *)elem->call_data;
if (error == GRPC_ERROR_NONE) {
send_security_metadata(exec_ctx, elem, batch);
} else {
@@ -264,8 +266,8 @@ static void auth_start_transport_stream_op_batch(
GPR_TIMER_BEGIN("auth_start_transport_stream_op_batch", 0);
/* grab pointers to our data from the call element */
- call_data *calld = elem->call_data;
- channel_data *chand = elem->channel_data;
+ call_data *calld = (call_data *)elem->call_data;
+ channel_data *chand = (channel_data *)elem->channel_data;
if (!batch->cancel_stream) {
GPR_ASSERT(batch->payload->context != NULL);
@@ -276,7 +278,9 @@ static void auth_start_transport_stream_op_batch(
grpc_client_security_context_destroy;
}
grpc_client_security_context *sec_ctx =
- batch->payload->context[GRPC_CONTEXT_SECURITY].value;
+ (grpc_client_security_context *)batch->payload
+ ->context[GRPC_CONTEXT_SECURITY]
+ .value;
GRPC_AUTH_CONTEXT_UNREF(sec_ctx->auth_context, "client auth filter");
sec_ctx->auth_context =
GRPC_AUTH_CONTEXT_REF(chand->auth_context, "client_auth_filter");
@@ -339,7 +343,7 @@ static void auth_start_transport_stream_op_batch(
static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
const grpc_call_element_args *args) {
- call_data *calld = elem->call_data;
+ call_data *calld = (call_data *)elem->call_data;
calld->owning_call = args->call_stack;
calld->call_combiner = args->call_combiner;
return GRPC_ERROR_NONE;
@@ -348,7 +352,7 @@ static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
static void set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_polling_entity *pollent) {
- call_data *calld = elem->call_data;
+ call_data *calld = (call_data *)elem->call_data;
calld->pollent = pollent;
}
@@ -356,7 +360,7 @@ static void set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx,
static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
const grpc_call_final_info *final_info,
grpc_closure *ignored) {
- call_data *calld = elem->call_data;
+ call_data *calld = (call_data *)elem->call_data;
grpc_credentials_mdelem_array_destroy(exec_ctx, &calld->md_array);
grpc_call_credentials_unref(exec_ctx, calld->creds);
if (calld->have_host) {
@@ -386,7 +390,7 @@ static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx,
}
/* grab pointers to our data from the channel element */
- channel_data *chand = elem->channel_data;
+ channel_data *chand = (channel_data *)elem->channel_data;
/* The first and the last filters tend to be implemented differently to
handle the case that there's no 'next' filter to call on the up or down
@@ -406,7 +410,7 @@ static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx,
static void destroy_channel_elem(grpc_exec_ctx *exec_ctx,
grpc_channel_element *elem) {
/* grab pointers to our data from the channel element */
- channel_data *chand = elem->channel_data;
+ channel_data *chand = (channel_data *)elem->channel_data;
grpc_channel_security_connector *sc = chand->security_connector;
if (sc != NULL) {
GRPC_SECURITY_CONNECTOR_UNREF(exec_ctx, &sc->base, "client_auth_filter");
diff --git a/src/core/lib/security/transport/lb_targets_info.c b/src/core/lib/security/transport/lb_targets_info.cc
index 5583a4e0ff..947fc1addf 100644
--- a/src/core/lib/security/transport/lb_targets_info.c
+++ b/src/core/lib/security/transport/lb_targets_info.cc
@@ -25,19 +25,22 @@
* secure naming purposes. */
#define GRPC_ARG_LB_SECURE_NAMING_MAP "grpc.lb_secure_naming_map"
-static void *targets_info_copy(void *p) { return grpc_slice_hash_table_ref(p); }
+static void *targets_info_copy(void *p) {
+ return grpc_slice_hash_table_ref((grpc_slice_hash_table *)p);
+}
static void targets_info_destroy(grpc_exec_ctx *exec_ctx, void *p) {
- grpc_slice_hash_table_unref(exec_ctx, p);
+ grpc_slice_hash_table_unref(exec_ctx, (grpc_slice_hash_table *)p);
}
static int targets_info_cmp(void *a, void *b) {
- return grpc_slice_hash_table_cmp(a, b);
+ return grpc_slice_hash_table_cmp((const grpc_slice_hash_table *)a,
+ (const grpc_slice_hash_table *)b);
}
static const grpc_arg_pointer_vtable server_to_balancer_names_vtable = {
targets_info_copy, targets_info_destroy, targets_info_cmp};
grpc_arg grpc_lb_targets_info_create_channel_arg(
grpc_slice_hash_table *targets_info) {
- return grpc_channel_arg_pointer_create(GRPC_ARG_LB_SECURE_NAMING_MAP,
+ return grpc_channel_arg_pointer_create((char *)GRPC_ARG_LB_SECURE_NAMING_MAP,
targets_info,
&server_to_balancer_names_vtable);
}
@@ -48,7 +51,7 @@ grpc_slice_hash_table *grpc_lb_targets_info_find_in_args(
grpc_channel_args_find(args, GRPC_ARG_LB_SECURE_NAMING_MAP);
if (targets_info_arg != NULL) {
GPR_ASSERT(targets_info_arg->type == GRPC_ARG_POINTER);
- return targets_info_arg->value.pointer.p;
+ return (grpc_slice_hash_table *)targets_info_arg->value.pointer.p;
}
return NULL;
}
diff --git a/src/core/lib/security/transport/lb_targets_info.h b/src/core/lib/security/transport/lb_targets_info.h
index c3d685df5f..705d33b0ab 100644
--- a/src/core/lib/security/transport/lb_targets_info.h
+++ b/src/core/lib/security/transport/lb_targets_info.h
@@ -21,6 +21,10 @@
#include "src/core/lib/slice/slice_hash_table.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** Return a channel argument containing \a targets_info. */
grpc_arg grpc_lb_targets_info_create_channel_arg(
grpc_slice_hash_table *targets_info);
@@ -29,4 +33,8 @@ grpc_arg grpc_lb_targets_info_create_channel_arg(
grpc_slice_hash_table *grpc_lb_targets_info_find_in_args(
const grpc_channel_args *args);
-#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_LB_TARGETS_INFO_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_LB_TARGETS_INFO_H */ \ No newline at end of file
diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.cc
index ae5633b82c..ae5633b82c 100644
--- a/src/core/lib/security/transport/secure_endpoint.c
+++ b/src/core/lib/security/transport/secure_endpoint.cc
diff --git a/src/core/lib/security/transport/secure_endpoint.h b/src/core/lib/security/transport/secure_endpoint.h
index 3323a6ff42..832cc1c0ce 100644
--- a/src/core/lib/security/transport/secure_endpoint.h
+++ b/src/core/lib/security/transport/secure_endpoint.h
@@ -22,6 +22,10 @@
#include <grpc/slice.h>
#include "src/core/lib/iomgr/endpoint.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct tsi_frame_protector;
struct tsi_zero_copy_grpc_protector;
@@ -36,4 +40,8 @@ grpc_endpoint *grpc_secure_endpoint_create(
grpc_endpoint *to_wrap, grpc_slice *leftover_slices,
size_t leftover_nslices);
-#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURE_ENDPOINT_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURE_ENDPOINT_H */ \ No newline at end of file
diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.cc
index 2a9e939d40..51844fb91f 100644
--- a/src/core/lib/security/transport/security_connector.c
+++ b/src/core/lib/security/transport/security_connector.cc
@@ -200,11 +200,13 @@ void grpc_security_connector_unref(grpc_exec_ctx *exec_ctx,
}
static void connector_pointer_arg_destroy(grpc_exec_ctx *exec_ctx, void *p) {
- GRPC_SECURITY_CONNECTOR_UNREF(exec_ctx, p, "connector_pointer_arg_destroy");
+ GRPC_SECURITY_CONNECTOR_UNREF(exec_ctx, (grpc_security_connector *)p,
+ "connector_pointer_arg_destroy");
}
static void *connector_pointer_arg_copy(void *p) {
- return GRPC_SECURITY_CONNECTOR_REF(p, "connector_pointer_arg_copy");
+ return GRPC_SECURITY_CONNECTOR_REF((grpc_security_connector *)p,
+ "connector_pointer_arg_copy");
}
static int connector_pointer_cmp(void *a, void *b) { return GPR_ICMP(a, b); }
@@ -214,8 +216,8 @@ static const grpc_arg_pointer_vtable connector_pointer_vtable = {
connector_pointer_cmp};
grpc_arg grpc_security_connector_to_arg(grpc_security_connector *sc) {
- return grpc_channel_arg_pointer_create(GRPC_ARG_SECURITY_CONNECTOR, sc,
- &connector_pointer_vtable);
+ return grpc_channel_arg_pointer_create((char *)GRPC_ARG_SECURITY_CONNECTOR,
+ sc, &connector_pointer_vtable);
}
grpc_security_connector *grpc_security_connector_from_arg(const grpc_arg *arg) {
@@ -225,7 +227,7 @@ grpc_security_connector *grpc_security_connector_from_arg(const grpc_arg *arg) {
GRPC_ARG_SECURITY_CONNECTOR);
return NULL;
}
- return arg->value.pointer.p;
+ return (grpc_security_connector *)arg->value.pointer.p;
}
grpc_security_connector *grpc_security_connector_find_in_args(
@@ -424,7 +426,8 @@ static grpc_security_connector_vtable fake_server_vtable = {
grpc_channel_security_connector *grpc_fake_channel_security_connector_create(
grpc_call_credentials *request_metadata_creds, const char *target,
const grpc_channel_args *args) {
- grpc_fake_channel_security_connector *c = gpr_zalloc(sizeof(*c));
+ grpc_fake_channel_security_connector *c =
+ (grpc_fake_channel_security_connector *)gpr_zalloc(sizeof(*c));
gpr_ref_init(&c->base.base.refcount, 1);
c->base.base.url_scheme = GRPC_FAKE_SECURITY_URL_SCHEME;
c->base.base.vtable = &fake_channel_vtable;
@@ -443,7 +446,8 @@ grpc_channel_security_connector *grpc_fake_channel_security_connector_create(
grpc_server_security_connector *grpc_fake_server_security_connector_create(
void) {
grpc_server_security_connector *c =
- gpr_zalloc(sizeof(grpc_server_security_connector));
+ (grpc_server_security_connector *)gpr_zalloc(
+ sizeof(grpc_server_security_connector));
gpr_ref_init(&c->base.refcount, 1);
c->base.vtable = &fake_server_vtable;
c->base.url_scheme = GRPC_FAKE_SECURITY_URL_SCHEME;
@@ -658,7 +662,8 @@ tsi_peer tsi_shallow_peer_from_ssl_auth_context(
while (grpc_auth_property_iterator_next(&it) != NULL) max_num_props++;
if (max_num_props > 0) {
- peer.properties = gpr_malloc(max_num_props * sizeof(tsi_peer_property));
+ peer.properties = (tsi_peer_property *)gpr_malloc(
+ max_num_props * sizeof(tsi_peer_property));
it = grpc_auth_context_property_iterator(auth_context);
while ((prop = grpc_auth_property_iterator_next(&it)) != NULL) {
if (strcmp(prop->name, GRPC_X509_SAN_PROPERTY_NAME) == 0) {
@@ -804,13 +809,13 @@ grpc_security_status grpc_ssl_channel_security_connector_create(
const char *overridden_target_name, grpc_channel_security_connector **sc) {
size_t num_alpn_protocols = grpc_chttp2_num_alpn_versions();
const char **alpn_protocol_strings =
- gpr_malloc(sizeof(const char *) * num_alpn_protocols);
+ (const char **)gpr_malloc(sizeof(const char *) * num_alpn_protocols);
tsi_result result = TSI_OK;
grpc_ssl_channel_security_connector *c;
size_t i;
const char *pem_root_certs;
char *port;
-
+ bool has_key_cert_pair;
for (i = 0; i < num_alpn_protocols; i++) {
alpn_protocol_strings[i] = grpc_chttp2_get_alpn_version_index(i);
}
@@ -829,7 +834,8 @@ grpc_security_status grpc_ssl_channel_security_connector_create(
pem_root_certs = config->pem_root_certs;
}
- c = gpr_zalloc(sizeof(grpc_ssl_channel_security_connector));
+ c = (grpc_ssl_channel_security_connector *)gpr_zalloc(
+ sizeof(grpc_ssl_channel_security_connector));
gpr_ref_init(&c->base.base.refcount, 1);
c->base.base.vtable = &ssl_channel_vtable;
@@ -845,8 +851,8 @@ grpc_security_status grpc_ssl_channel_security_connector_create(
c->overridden_target_name = gpr_strdup(overridden_target_name);
}
- bool has_key_cert_pair = config->pem_key_cert_pair.private_key != NULL &&
- config->pem_key_cert_pair.cert_chain != NULL;
+ has_key_cert_pair = config->pem_key_cert_pair.private_key != NULL &&
+ config->pem_key_cert_pair.cert_chain != NULL;
result = tsi_create_ssl_client_handshaker_factory(
has_key_cert_pair ? &config->pem_key_cert_pair : NULL, pem_root_certs,
ssl_cipher_suites(), alpn_protocol_strings, (uint16_t)num_alpn_protocols,
@@ -872,7 +878,7 @@ grpc_security_status grpc_ssl_server_security_connector_create(
grpc_server_security_connector **sc) {
size_t num_alpn_protocols = grpc_chttp2_num_alpn_versions();
const char **alpn_protocol_strings =
- gpr_malloc(sizeof(const char *) * num_alpn_protocols);
+ (const char **)gpr_malloc(sizeof(const char *) * num_alpn_protocols);
tsi_result result = TSI_OK;
grpc_ssl_server_security_connector *c;
size_t i;
@@ -885,7 +891,8 @@ grpc_security_status grpc_ssl_server_security_connector_create(
gpr_log(GPR_ERROR, "An SSL server needs a key and a cert.");
goto error;
}
- c = gpr_zalloc(sizeof(grpc_ssl_server_security_connector));
+ c = (grpc_ssl_server_security_connector *)gpr_zalloc(
+ sizeof(grpc_ssl_server_security_connector));
gpr_ref_init(&c->base.base.refcount, 1);
c->base.base.url_scheme = GRPC_SSL_URL_SCHEME;
diff --git a/src/core/lib/security/transport/security_connector.h b/src/core/lib/security/transport/security_connector.h
index 4f9b63ad20..4d87cd0c80 100644
--- a/src/core/lib/security/transport/security_connector.h
+++ b/src/core/lib/security/transport/security_connector.h
@@ -29,6 +29,10 @@
#include "src/core/tsi/ssl_transport_security.h"
#include "src/core/tsi/transport_security_interface.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef NDEBUG
extern grpc_tracer_flag grpc_trace_security_connector_refcount;
#endif
@@ -245,4 +249,8 @@ tsi_peer tsi_shallow_peer_from_ssl_auth_context(
const grpc_auth_context *auth_context);
void tsi_shallow_peer_destruct(tsi_peer *peer);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_CONNECTOR_H */
diff --git a/src/core/lib/security/transport/security_handshaker.c b/src/core/lib/security/transport/security_handshaker.cc
index 3d19605617..3d19605617 100644
--- a/src/core/lib/security/transport/security_handshaker.c
+++ b/src/core/lib/security/transport/security_handshaker.cc
diff --git a/src/core/lib/security/transport/security_handshaker.h b/src/core/lib/security/transport/security_handshaker.h
index 95bf127fc6..345065f26c 100644
--- a/src/core/lib/security/transport/security_handshaker.h
+++ b/src/core/lib/security/transport/security_handshaker.h
@@ -23,6 +23,10 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/security/transport/security_connector.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/// Creates a security handshaker using \a handshaker.
grpc_handshaker *grpc_security_handshaker_create(
grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker,
@@ -31,4 +35,8 @@ grpc_handshaker *grpc_security_handshaker_create(
/// Registers security handshaker factories.
void grpc_security_register_handshaker_factories();
-#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_HANDSHAKER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_HANDSHAKER_H */ \ No newline at end of file
diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.cc
index 7f523c0883..f5e02f42fe 100644
--- a/src/core/lib/security/transport/server_auth_filter.c
+++ b/src/core/lib/security/transport/server_auth_filter.cc
@@ -63,8 +63,8 @@ static grpc_metadata_array metadata_batch_to_md_array(
grpc_slice value = GRPC_MDVALUE(md);
if (result.count == result.capacity) {
result.capacity = GPR_MAX(result.capacity + 8, result.capacity * 2);
- result.metadata =
- gpr_realloc(result.metadata, result.capacity * sizeof(grpc_metadata));
+ result.metadata = (grpc_metadata *)gpr_realloc(
+ result.metadata, result.capacity * sizeof(grpc_metadata));
}
usr_md = &result.metadata[result.count++];
usr_md->key = grpc_slice_ref_internal(key);
@@ -76,8 +76,8 @@ static grpc_metadata_array metadata_batch_to_md_array(
static grpc_filtered_mdelem remove_consumed_md(grpc_exec_ctx *exec_ctx,
void *user_data,
grpc_mdelem md) {
- grpc_call_element *elem = user_data;
- call_data *calld = elem->call_data;
+ grpc_call_element *elem = (grpc_call_element *)user_data;
+ call_data *calld = (call_data *)elem->call_data;
size_t i;
for (i = 0; i < calld->num_consumed_md; i++) {
const grpc_metadata *consumed_md = &calld->consumed_md[i];
@@ -95,7 +95,7 @@ static void on_md_processing_done_inner(grpc_exec_ctx *exec_ctx,
const grpc_metadata *response_md,
size_t num_response_md,
grpc_error *error) {
- call_data *calld = elem->call_data;
+ call_data *calld = (call_data *)elem->call_data;
grpc_transport_stream_op_batch *batch = calld->recv_initial_metadata_batch;
/* TODO(jboeuf): Implement support for response_md. */
if (response_md != NULL && num_response_md > 0) {
@@ -119,8 +119,8 @@ static void on_md_processing_done(
void *user_data, const grpc_metadata *consumed_md, size_t num_consumed_md,
const grpc_metadata *response_md, size_t num_response_md,
grpc_status_code status, const char *error_details) {
- grpc_call_element *elem = user_data;
- call_data *calld = elem->call_data;
+ grpc_call_element *elem = (grpc_call_element *)user_data;
+ call_data *calld = (call_data *)elem->call_data;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
// If the call was not cancelled while we were in flight, process the result.
if (gpr_atm_full_cas(&calld->state, (gpr_atm)STATE_INIT,
@@ -149,7 +149,7 @@ static void on_md_processing_done(
static void cancel_call(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
grpc_call_element *elem = (grpc_call_element *)arg;
- call_data *calld = elem->call_data;
+ call_data *calld = (call_data *)elem->call_data;
// If the result was not already processed, invoke the callback now.
if (error != GRPC_ERROR_NONE &&
gpr_atm_full_cas(&calld->state, (gpr_atm)STATE_INIT,
@@ -163,8 +163,8 @@ static void cancel_call(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
static void recv_initial_metadata_ready(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error *error) {
grpc_call_element *elem = (grpc_call_element *)arg;
- channel_data *chand = elem->channel_data;
- call_data *calld = elem->call_data;
+ channel_data *chand = (channel_data *)elem->channel_data;
+ call_data *calld = (call_data *)elem->call_data;
grpc_transport_stream_op_batch *batch = calld->recv_initial_metadata_batch;
if (error == GRPC_ERROR_NONE) {
if (chand->creds != NULL && chand->creds->processor.process != NULL) {
@@ -191,7 +191,7 @@ static void recv_initial_metadata_ready(grpc_exec_ctx *exec_ctx, void *arg,
static void auth_start_transport_stream_op_batch(
grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
grpc_transport_stream_op_batch *batch) {
- call_data *calld = elem->call_data;
+ call_data *calld = (call_data *)elem->call_data;
if (batch->recv_initial_metadata) {
// Inject our callback.
calld->recv_initial_metadata_batch = batch;
@@ -207,8 +207,8 @@ static void auth_start_transport_stream_op_batch(
static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
const grpc_call_element_args *args) {
- call_data *calld = elem->call_data;
- channel_data *chand = elem->channel_data;
+ call_data *calld = (call_data *)elem->call_data;
+ channel_data *chand = (channel_data *)elem->channel_data;
calld->call_combiner = args->call_combiner;
calld->owning_call = args->call_stack;
GRPC_CLOSURE_INIT(&calld->recv_initial_metadata_ready,
@@ -240,7 +240,7 @@ static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx,
grpc_channel_element *elem,
grpc_channel_element_args *args) {
GPR_ASSERT(!args->is_last);
- channel_data *chand = elem->channel_data;
+ channel_data *chand = (channel_data *)elem->channel_data;
grpc_auth_context *auth_context =
grpc_find_auth_context_in_args(args->channel_args);
GPR_ASSERT(auth_context != NULL);
@@ -255,7 +255,7 @@ static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx,
/* Destructor for channel data */
static void destroy_channel_elem(grpc_exec_ctx *exec_ctx,
grpc_channel_element *elem) {
- channel_data *chand = elem->channel_data;
+ channel_data *chand = (channel_data *)elem->channel_data;
GRPC_AUTH_CONTEXT_UNREF(chand->auth_context, "server_auth_filter");
grpc_server_credentials_unref(exec_ctx, chand->creds);
}
diff --git a/src/core/lib/security/transport/tsi_error.c b/src/core/lib/security/transport/tsi_error.cc
index 72f9600e84..72f9600e84 100644
--- a/src/core/lib/security/transport/tsi_error.c
+++ b/src/core/lib/security/transport/tsi_error.cc
diff --git a/src/core/lib/security/transport/tsi_error.h b/src/core/lib/security/transport/tsi_error.h
index 87a63a8a7c..4c78b06603 100644
--- a/src/core/lib/security/transport/tsi_error.h
+++ b/src/core/lib/security/transport/tsi_error.h
@@ -22,6 +22,14 @@
#include "src/core/lib/iomgr/error.h"
#include "src/core/tsi/transport_security_interface.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
grpc_error *grpc_set_tsi_error_result(grpc_error *error, tsi_result result);
-#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_TSI_ERROR_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_TSI_ERROR_H */ \ No newline at end of file
diff --git a/src/core/lib/security/util/json_util.c b/src/core/lib/security/util/json_util.cc
index d847addef9..d847addef9 100644
--- a/src/core/lib/security/util/json_util.c
+++ b/src/core/lib/security/util/json_util.cc
diff --git a/src/core/lib/security/util/json_util.h b/src/core/lib/security/util/json_util.h
index 5ea831e27e..43a2f6b9d1 100644
--- a/src/core/lib/security/util/json_util.h
+++ b/src/core/lib/security/util/json_util.h
@@ -28,6 +28,10 @@
#define GRPC_AUTH_JSON_TYPE_SERVICE_ACCOUNT "service_account"
#define GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER "authorized_user"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// Gets a child property from a json node.
const char *grpc_json_get_string_property(const grpc_json *json,
const char *prop_name);
@@ -37,4 +41,8 @@ const char *grpc_json_get_string_property(const grpc_json *json,
bool grpc_copy_json_string_property(const grpc_json *json,
const char *prop_name, char **copied_value);
-#endif /* GRPC_CORE_LIB_SECURITY_UTIL_JSON_UTIL_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SECURITY_UTIL_JSON_UTIL_H */ \ No newline at end of file
diff --git a/src/core/lib/slice/b64.c b/src/core/lib/slice/b64.cc
index 50264719a4..50264719a4 100644
--- a/src/core/lib/slice/b64.c
+++ b/src/core/lib/slice/b64.cc
diff --git a/src/core/lib/slice/b64.h b/src/core/lib/slice/b64.h
index 3fd15febe5..c01da56575 100644
--- a/src/core/lib/slice/b64.h
+++ b/src/core/lib/slice/b64.h
@@ -21,6 +21,10 @@
#include <grpc/slice.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Encodes data using base64. It is the caller's responsability to free
the returned char * using gpr_free. Returns NULL on NULL input.
TODO(makdharma) : change the flags to bool from int */
@@ -47,4 +51,8 @@ grpc_slice grpc_base64_decode(grpc_exec_ctx *exec_ctx, const char *b64,
grpc_slice grpc_base64_decode_with_len(grpc_exec_ctx *exec_ctx, const char *b64,
size_t b64_len, int url_safe);
-#endif /* GRPC_CORE_LIB_SLICE_B64_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SLICE_B64_H */ \ No newline at end of file
diff --git a/src/core/lib/slice/percent_encoding.c b/src/core/lib/slice/percent_encoding.cc
index effc8d7ad6..effc8d7ad6 100644
--- a/src/core/lib/slice/percent_encoding.c
+++ b/src/core/lib/slice/percent_encoding.cc
diff --git a/src/core/lib/slice/percent_encoding.h b/src/core/lib/slice/percent_encoding.h
index faae26a683..e6f85120c3 100644
--- a/src/core/lib/slice/percent_encoding.h
+++ b/src/core/lib/slice/percent_encoding.h
@@ -30,6 +30,10 @@
#include <grpc/slice.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* URL percent encoding spec bitfield (usabel as 'unreserved_bytes' in
grpc_percent_encode_slice, grpc_strict_percent_decode_slice).
Flags [A-Za-z0-9-_.~] as unreserved bytes for the percent encoding routines
@@ -60,4 +64,8 @@ bool grpc_strict_percent_decode_slice(grpc_slice slice_in,
This cannot fail. */
grpc_slice grpc_permissive_percent_decode_slice(grpc_slice slice_in);
-#endif /* GRPC_CORE_LIB_SLICE_PERCENT_ENCODING_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SLICE_PERCENT_ENCODING_H */ \ No newline at end of file
diff --git a/src/core/lib/slice/slice.c b/src/core/lib/slice/slice.cc
index 0764eda052..0764eda052 100644
--- a/src/core/lib/slice/slice.c
+++ b/src/core/lib/slice/slice.cc
diff --git a/src/core/lib/slice/slice_buffer.c b/src/core/lib/slice/slice_buffer.cc
index 63ffc0b00d..63ffc0b00d 100644
--- a/src/core/lib/slice/slice_buffer.c
+++ b/src/core/lib/slice/slice_buffer.cc
diff --git a/src/core/lib/slice/slice_hash_table.c b/src/core/lib/slice/slice_hash_table.cc
index 6c2c9c201c..6c2c9c201c 100644
--- a/src/core/lib/slice/slice_hash_table.c
+++ b/src/core/lib/slice/slice_hash_table.cc
diff --git a/src/core/lib/slice/slice_hash_table.h b/src/core/lib/slice/slice_hash_table.h
index 339078fef5..3c3f0e61f3 100644
--- a/src/core/lib/slice/slice_hash_table.h
+++ b/src/core/lib/slice/slice_hash_table.h
@@ -19,6 +19,10 @@
#include "src/core/lib/transport/metadata.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** Hash table implementation.
*
* This implementation uses open addressing
@@ -67,4 +71,8 @@ void *grpc_slice_hash_table_get(const grpc_slice_hash_table *table,
int grpc_slice_hash_table_cmp(const grpc_slice_hash_table *a,
const grpc_slice_hash_table *b);
-#endif /* GRPC_CORE_LIB_SLICE_SLICE_HASH_TABLE_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SLICE_SLICE_HASH_TABLE_H */ \ No newline at end of file
diff --git a/src/core/lib/slice/slice_intern.c b/src/core/lib/slice/slice_intern.cc
index ec71b3ca1d..1ea9a2aa67 100644
--- a/src/core/lib/slice/slice_intern.c
+++ b/src/core/lib/slice/slice_intern.cc
@@ -18,6 +18,7 @@
#include "src/core/lib/slice/slice_internal.h"
+#include <inttypes.h>
#include <string.h>
#include <grpc/support/alloc.h>
diff --git a/src/core/lib/slice/slice_internal.h b/src/core/lib/slice/slice_internal.h
index 6df0b4b50b..8591185c53 100644
--- a/src/core/lib/slice/slice_internal.h
+++ b/src/core/lib/slice/slice_internal.h
@@ -24,6 +24,10 @@
#include "src/core/lib/iomgr/exec_ctx.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
grpc_slice grpc_slice_ref_internal(grpc_slice slice);
void grpc_slice_unref_internal(grpc_exec_ctx *exec_ctx, grpc_slice slice);
void grpc_slice_buffer_reset_and_unref_internal(grpc_exec_ctx *exec_ctx,
@@ -46,4 +50,8 @@ grpc_slice grpc_slice_maybe_static_intern(grpc_slice slice,
uint32_t grpc_static_slice_hash(grpc_slice s);
int grpc_static_slice_eq(grpc_slice a, grpc_slice b);
-#endif /* GRPC_CORE_LIB_SLICE_SLICE_INTERNAL_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SLICE_SLICE_INTERNAL_H */ \ No newline at end of file
diff --git a/src/core/lib/slice/slice_string_helpers.c b/src/core/lib/slice/slice_string_helpers.cc
index 3f054daf32..3f054daf32 100644
--- a/src/core/lib/slice/slice_string_helpers.c
+++ b/src/core/lib/slice/slice_string_helpers.cc
diff --git a/src/core/lib/slice/slice_traits.h b/src/core/lib/slice/slice_traits.h
index 4b898bdcd4..1eda17cf00 100644
--- a/src/core/lib/slice/slice_traits.h
+++ b/src/core/lib/slice/slice_traits.h
@@ -22,8 +22,16 @@
#include <grpc/slice.h>
#include <stdbool.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
bool grpc_slice_is_legal_header(grpc_slice s);
bool grpc_slice_is_legal_nonbin_header(grpc_slice s);
bool grpc_slice_is_bin_suffixed(grpc_slice s);
-#endif /* GRPC_CORE_LIB_SLICE_SLICE_TRAITS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SLICE_SLICE_TRAITS_H */ \ No newline at end of file
diff --git a/src/core/lib/support/alloc.c b/src/core/lib/support/alloc.cc
index 886d69d64c..886d69d64c 100644
--- a/src/core/lib/support/alloc.c
+++ b/src/core/lib/support/alloc.cc
diff --git a/src/core/lib/support/arena.c b/src/core/lib/support/arena.cc
index 9e0f73ae3d..9e0f73ae3d 100644
--- a/src/core/lib/support/arena.c
+++ b/src/core/lib/support/arena.cc
diff --git a/src/core/lib/support/arena.h b/src/core/lib/support/arena.h
index 47f0e4d16b..8a50786348 100644
--- a/src/core/lib/support/arena.h
+++ b/src/core/lib/support/arena.h
@@ -27,6 +27,10 @@
#include <stddef.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct gpr_arena gpr_arena;
// Create an arena, with \a initial_size bytes in the first allocated buffer
@@ -36,4 +40,8 @@ void *gpr_arena_alloc(gpr_arena *arena, size_t size);
// Destroy an arena, returning the total number of bytes allocated
size_t gpr_arena_destroy(gpr_arena *arena);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_ARENA_H */
diff --git a/src/core/lib/support/atm.c b/src/core/lib/support/atm.cc
index 2f37d62f76..2f37d62f76 100644
--- a/src/core/lib/support/atm.c
+++ b/src/core/lib/support/atm.cc
diff --git a/src/core/lib/support/avl.c b/src/core/lib/support/avl.cc
index 0e28b24c98..0e28b24c98 100644
--- a/src/core/lib/support/avl.c
+++ b/src/core/lib/support/avl.cc
diff --git a/src/core/lib/support/cmdline.c b/src/core/lib/support/cmdline.cc
index 9fb80d4460..9fb80d4460 100644
--- a/src/core/lib/support/cmdline.c
+++ b/src/core/lib/support/cmdline.cc
diff --git a/src/core/lib/support/cpu_iphone.c b/src/core/lib/support/cpu_iphone.cc
index dfd69b9fd8..2847e03ba5 100644
--- a/src/core/lib/support/cpu_iphone.c
+++ b/src/core/lib/support/cpu_iphone.cc
@@ -18,6 +18,8 @@
#include <grpc/support/port_platform.h>
+#include <grpc/support/cpu.h>
+
#ifdef GPR_CPU_IPHONE
/* Probably 2 instead of 1, but see comment on gpr_cpu_current_cpu. */
diff --git a/src/core/lib/support/cpu_linux.c b/src/core/lib/support/cpu_linux.cc
index 2280668442..2280668442 100644
--- a/src/core/lib/support/cpu_linux.c
+++ b/src/core/lib/support/cpu_linux.cc
diff --git a/src/core/lib/support/cpu_posix.c b/src/core/lib/support/cpu_posix.cc
index a1ba8202a8..503a96b4c8 100644
--- a/src/core/lib/support/cpu_posix.c
+++ b/src/core/lib/support/cpu_posix.cc
@@ -24,6 +24,7 @@
#include <string.h>
#include <unistd.h>
+#include <grpc/support/cpu.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
#include <grpc/support/useful.h>
diff --git a/src/core/lib/support/cpu_windows.c b/src/core/lib/support/cpu_windows.cc
index af26ff3679..8d89453403 100644
--- a/src/core/lib/support/cpu_windows.c
+++ b/src/core/lib/support/cpu_windows.cc
@@ -19,6 +19,7 @@
#include <grpc/support/port_platform.h>
#ifdef GPR_WINDOWS
+#include <grpc/support/cpu.h>
#include <grpc/support/log.h>
unsigned gpr_cpu_num_cores(void) {
diff --git a/src/core/lib/support/env_linux.c b/src/core/lib/support/env_linux.cc
index 4c45a977ca..4c45a977ca 100644
--- a/src/core/lib/support/env_linux.c
+++ b/src/core/lib/support/env_linux.cc
diff --git a/src/core/lib/support/env_posix.c b/src/core/lib/support/env_posix.cc
index b88822ca02..b88822ca02 100644
--- a/src/core/lib/support/env_posix.c
+++ b/src/core/lib/support/env_posix.cc
diff --git a/src/core/lib/support/env_windows.c b/src/core/lib/support/env_windows.cc
index 652eeb61c6..73c643c560 100644
--- a/src/core/lib/support/env_windows.c
+++ b/src/core/lib/support/env_windows.cc
@@ -45,7 +45,7 @@ char *gpr_getenv(const char *name) {
ret = GetEnvironmentVariable(tname, NULL, 0);
if (ret == 0) return NULL;
size = ret * (DWORD)sizeof(TCHAR);
- tresult = gpr_malloc(size);
+ tresult = (LPTSTR)gpr_malloc(size);
ret = GetEnvironmentVariable(tname, tresult, size);
gpr_free(tname);
if (ret == 0) {
diff --git a/src/core/lib/support/histogram.c b/src/core/lib/support/histogram.cc
index 6d5ead9aa6..6d5ead9aa6 100644
--- a/src/core/lib/support/histogram.c
+++ b/src/core/lib/support/histogram.cc
diff --git a/src/core/lib/support/host_port.c b/src/core/lib/support/host_port.cc
index 3302e574ab..3302e574ab 100644
--- a/src/core/lib/support/host_port.c
+++ b/src/core/lib/support/host_port.cc
diff --git a/src/core/lib/support/log.c b/src/core/lib/support/log.cc
index fadb4d9a2c..69f92e001c 100644
--- a/src/core/lib/support/log.c
+++ b/src/core/lib/support/log.cc
@@ -27,7 +27,7 @@
#include <stdio.h>
#include <string.h>
-extern void gpr_default_log(gpr_log_func_args *args);
+extern "C" void gpr_default_log(gpr_log_func_args *args);
static gpr_atm g_log_func = (gpr_atm)gpr_default_log;
static gpr_atm g_min_severity_to_print = GPR_LOG_VERBOSITY_UNSET;
diff --git a/src/core/lib/support/log_android.c b/src/core/lib/support/log_android.cc
index 6f1cec51f1..9e8529cbac 100644
--- a/src/core/lib/support/log_android.c
+++ b/src/core/lib/support/log_android.cc
@@ -39,8 +39,8 @@ static android_LogPriority severity_to_log_priority(gpr_log_severity severity) {
return ANDROID_LOG_DEFAULT;
}
-void gpr_log(const char *file, int line, gpr_log_severity severity,
- const char *format, ...) {
+extern "C" void gpr_log(const char *file, int line, gpr_log_severity severity,
+ const char *format, ...) {
char *message = NULL;
va_list args;
va_start(args, format);
@@ -50,8 +50,8 @@ void gpr_log(const char *file, int line, gpr_log_severity severity,
free(message);
}
-void gpr_default_log(gpr_log_func_args *args) {
- char *final_slash;
+extern "C" void gpr_default_log(gpr_log_func_args *args) {
+ const char *final_slash;
const char *display_file;
char *output = NULL;
diff --git a/src/core/lib/support/log_linux.c b/src/core/lib/support/log_linux.cc
index 7755018693..0914acedf4 100644
--- a/src/core/lib/support/log_linux.c
+++ b/src/core/lib/support/log_linux.cc
@@ -56,7 +56,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity,
free(message);
}
-void gpr_default_log(gpr_log_func_args *args) {
+extern "C" void gpr_default_log(gpr_log_func_args *args) {
const char *final_slash;
char *prefix;
const char *display_file;
diff --git a/src/core/lib/support/log_posix.c b/src/core/lib/support/log_posix.cc
index 8b376fce41..29530c858f 100644
--- a/src/core/lib/support/log_posix.c
+++ b/src/core/lib/support/log_posix.cc
@@ -48,7 +48,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity,
} else if ((size_t)ret <= sizeof(buf) - 1) {
message = buf;
} else {
- message = allocated = gpr_malloc((size_t)ret + 1);
+ message = allocated = (char *)gpr_malloc((size_t)ret + 1);
va_start(args, format);
vsnprintf(message, (size_t)(ret + 1), format, args);
va_end(args);
@@ -57,8 +57,8 @@ void gpr_log(const char *file, int line, gpr_log_severity severity,
gpr_free(allocated);
}
-void gpr_default_log(gpr_log_func_args *args) {
- char *final_slash;
+extern "C" void gpr_default_log(gpr_log_func_args *args) {
+ const char *final_slash;
const char *display_file;
char time_buffer[64];
time_t timer;
diff --git a/src/core/lib/support/log_windows.c b/src/core/lib/support/log_windows.cc
index 0fdab79ae6..ee52abea73 100644
--- a/src/core/lib/support/log_windows.c
+++ b/src/core/lib/support/log_windows.cc
@@ -47,7 +47,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity,
} else {
/* Allocate a new buffer, with space for the NUL terminator. */
size_t strp_buflen = (size_t)ret + 1;
- message = gpr_malloc(strp_buflen);
+ message = (char *)gpr_malloc(strp_buflen);
/* Print to the buffer. */
va_start(args, format);
@@ -65,8 +65,8 @@ void gpr_log(const char *file, int line, gpr_log_severity severity,
}
/* Simple starter implementation */
-void gpr_default_log(gpr_log_func_args *args) {
- char *final_slash;
+extern "C" void gpr_default_log(gpr_log_func_args *args) {
+ const char *final_slash;
const char *display_file;
char time_buffer[64];
time_t timer;
diff --git a/src/core/lib/support/mpscq.c b/src/core/lib/support/mpscq.cc
index e9f893988d..e9f893988d 100644
--- a/src/core/lib/support/mpscq.c
+++ b/src/core/lib/support/mpscq.cc
diff --git a/src/core/lib/support/mpscq.h b/src/core/lib/support/mpscq.h
index daa51768f7..ca63a044bb 100644
--- a/src/core/lib/support/mpscq.h
+++ b/src/core/lib/support/mpscq.h
@@ -23,6 +23,10 @@
#include <stdbool.h>
#include <stddef.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// Multiple-producer single-consumer lock free queue, based upon the
// implementation from Dmitry Vyukov here:
// http://www.1024cores.net/home/lock-free-algorithms/queues/intrusive-mpsc-node-based-queue
@@ -50,4 +54,8 @@ gpr_mpscq_node *gpr_mpscq_pop(gpr_mpscq *q);
// Pop a node; sets *empty to true if the queue is empty, or false if it is not
gpr_mpscq_node *gpr_mpscq_pop_and_check_end(gpr_mpscq *q, bool *empty);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_MPSCQ_H */
diff --git a/src/core/lib/support/murmur_hash.c b/src/core/lib/support/murmur_hash.cc
index f06b970de7..f06b970de7 100644
--- a/src/core/lib/support/murmur_hash.c
+++ b/src/core/lib/support/murmur_hash.cc
diff --git a/src/core/lib/support/murmur_hash.h b/src/core/lib/support/murmur_hash.h
index 7510b4d09c..a4c642e49f 100644
--- a/src/core/lib/support/murmur_hash.h
+++ b/src/core/lib/support/murmur_hash.h
@@ -23,7 +23,15 @@
#include <stddef.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* compute the hash of key (length len) */
uint32_t gpr_murmur_hash3(const void *key, size_t len, uint32_t seed);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_MURMUR_HASH_H */
diff --git a/src/core/lib/support/spinlock.h b/src/core/lib/support/spinlock.h
index 37adda11b0..47584f6279 100644
--- a/src/core/lib/support/spinlock.h
+++ b/src/core/lib/support/spinlock.h
@@ -25,9 +25,14 @@
a concurrency code smell. */
typedef struct { gpr_atm atm; } gpr_spinlock;
+#ifdef __cplusplus
+#define GPR_SPINLOCK_INITIALIZER (gpr_spinlock{0})
+#else
#define GPR_SPINLOCK_INITIALIZER ((gpr_spinlock){0})
+#endif
#define GPR_SPINLOCK_STATIC_INITIALIZER \
{ 0 }
+
#define gpr_spinlock_trylock(lock) (gpr_atm_acq_cas(&(lock)->atm, 0, 1))
#define gpr_spinlock_unlock(lock) (gpr_atm_rel_store(&(lock)->atm, 0))
#define gpr_spinlock_lock(lock) \
diff --git a/src/core/lib/support/stack_lockfree.c b/src/core/lib/support/stack_lockfree.cc
index 0fb64ed001..0fb64ed001 100644
--- a/src/core/lib/support/stack_lockfree.c
+++ b/src/core/lib/support/stack_lockfree.cc
diff --git a/src/core/lib/support/stack_lockfree.h b/src/core/lib/support/stack_lockfree.h
index 6324211b72..706f63fbf6 100644
--- a/src/core/lib/support/stack_lockfree.h
+++ b/src/core/lib/support/stack_lockfree.h
@@ -21,6 +21,10 @@
#include <stddef.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct gpr_stack_lockfree gpr_stack_lockfree;
/* This stack must specify the maximum number of entries to track.
@@ -35,4 +39,8 @@ int gpr_stack_lockfree_push(gpr_stack_lockfree *, int entry);
/* Returns -1 on empty or the actual entry number */
int gpr_stack_lockfree_pop(gpr_stack_lockfree *stack);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_STACK_LOCKFREE_H */
diff --git a/src/core/lib/support/string.c b/src/core/lib/support/string.cc
index 6b172df82f..d55863892f 100644
--- a/src/core/lib/support/string.c
+++ b/src/core/lib/support/string.cc
@@ -27,6 +27,7 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
+#include <grpc/support/string_util.h>
#include <grpc/support/useful.h>
char *gpr_strdup(const char *src) {
diff --git a/src/core/lib/support/string_posix.c b/src/core/lib/support/string_posix.cc
index e768faf739..92de21a6e1 100644
--- a/src/core/lib/support/string_posix.c
+++ b/src/core/lib/support/string_posix.cc
@@ -25,6 +25,7 @@
#include <string.h>
#include <grpc/support/alloc.h>
+#include <grpc/support/string_util.h>
int gpr_asprintf(char **strp, const char *format, ...) {
va_list args;
diff --git a/src/core/lib/support/string_util_windows.c b/src/core/lib/support/string_util_windows.cc
index 2a03404448..b365512ee3 100644
--- a/src/core/lib/support/string_util_windows.c
+++ b/src/core/lib/support/string_util_windows.cc
@@ -26,15 +26,18 @@
anything else, especially strsafe.h. */
#include <wchar.h>
+#include <inttypes.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <strsafe.h>
#include <grpc/support/alloc.h>
+#include <grpc/support/log_windows.h>
#include <grpc/support/string_util.h>
#include "src/core/lib/support/string.h"
+#include "src/core/lib/support/string_windows.h"
#if defined UNICODE || defined _UNICODE
LPTSTR
@@ -42,7 +45,7 @@ gpr_char_to_tchar(LPCSTR input) {
LPTSTR ret;
int needed = MultiByteToWideChar(CP_UTF8, 0, input, -1, NULL, 0);
if (needed <= 0) return NULL;
- ret = gpr_malloc((unsigned)needed * sizeof(TCHAR));
+ ret = (LPTSTR)gpr_malloc((unsigned)needed * sizeof(TCHAR));
MultiByteToWideChar(CP_UTF8, 0, input, -1, ret, needed);
return ret;
}
@@ -52,14 +55,14 @@ gpr_tchar_to_char(LPCTSTR input) {
LPSTR ret;
int needed = WideCharToMultiByte(CP_UTF8, 0, input, -1, NULL, 0, NULL, NULL);
if (needed <= 0) return NULL;
- ret = gpr_malloc((unsigned)needed);
+ ret = (LPSTR)gpr_malloc((unsigned)needed);
WideCharToMultiByte(CP_UTF8, 0, input, -1, ret, needed, NULL, NULL);
return ret;
}
#else
-char *gpr_tchar_to_char(LPTSTR input) { return gpr_strdup(input); }
+LPSTR gpr_tchar_to_char(LPCTSTR input) { return (LPSTR)gpr_strdup(input); }
-char *gpr_char_to_tchar(LPTSTR input) { return gpr_strdup(input); }
+LPTSTR gpr_char_to_tchar(LPCTSTR input) { return (LPTSTR)gpr_strdup(input); }
#endif
char *gpr_format_message(int messageid) {
diff --git a/src/core/lib/support/string_windows.c b/src/core/lib/support/string_windows.cc
index 50278d9559..d37863c066 100644
--- a/src/core/lib/support/string_windows.c
+++ b/src/core/lib/support/string_windows.cc
@@ -27,6 +27,7 @@
#include <string.h>
#include <grpc/support/alloc.h>
+#include <grpc/support/string_util.h>
#include "src/core/lib/support/string.h"
@@ -46,7 +47,7 @@ int gpr_asprintf(char **strp, const char *format, ...) {
/* Allocate a new buffer, with space for the NUL terminator. */
strp_buflen = (size_t)ret + 1;
- if ((*strp = gpr_malloc(strp_buflen)) == NULL) {
+ if ((*strp = (char *)gpr_malloc(strp_buflen)) == NULL) {
/* This shouldn't happen, because gpr_malloc() calls abort(). */
return -1;
}
diff --git a/src/core/lib/support/string_windows.h b/src/core/lib/support/string_windows.h
index 7c7f31e7aa..6771647581 100644
--- a/src/core/lib/support/string_windows.h
+++ b/src/core/lib/support/string_windows.h
@@ -21,6 +21,10 @@
#include <grpc/support/port_platform.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef GPR_WINDOWS
/* These allocate new strings using gpr_malloc to convert from and to utf-8. */
@@ -29,4 +33,8 @@ LPSTR gpr_tchar_to_char(LPCTSTR input);
#endif /* GPR_WINDOWS */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_STRING_WINDOWS_H */
diff --git a/src/core/lib/support/subprocess_posix.c b/src/core/lib/support/subprocess_posix.cc
index af75162ee9..af75162ee9 100644
--- a/src/core/lib/support/subprocess_posix.c
+++ b/src/core/lib/support/subprocess_posix.cc
diff --git a/src/core/lib/support/subprocess_windows.c b/src/core/lib/support/subprocess_windows.cc
index 7412f8d344..6769f1d3a4 100644
--- a/src/core/lib/support/subprocess_windows.c
+++ b/src/core/lib/support/subprocess_windows.cc
@@ -61,7 +61,7 @@ gpr_subprocess *gpr_subprocess_create(int argc, const char **argv) {
}
gpr_free(args_tchar);
- r = gpr_malloc(sizeof(gpr_subprocess));
+ r = (gpr_subprocess *)gpr_malloc(sizeof(gpr_subprocess));
memset(r, 0, sizeof(*r));
r->pi = pi;
return r;
diff --git a/src/core/lib/support/sync.c b/src/core/lib/support/sync.cc
index 994dcb0e14..994dcb0e14 100644
--- a/src/core/lib/support/sync.c
+++ b/src/core/lib/support/sync.cc
diff --git a/src/core/lib/support/sync_posix.c b/src/core/lib/support/sync_posix.cc
index 62d800b18c..62d800b18c 100644
--- a/src/core/lib/support/sync_posix.c
+++ b/src/core/lib/support/sync_posix.cc
diff --git a/src/core/lib/support/sync_windows.c b/src/core/lib/support/sync_windows.cc
index 008c5aecba..62fdd40af7 100644
--- a/src/core/lib/support/sync_windows.c
+++ b/src/core/lib/support/sync_windows.cc
@@ -104,7 +104,7 @@ struct run_once_func_arg {
void (*init_function)(void);
};
static BOOL CALLBACK run_once_func(gpr_once *once, void *v, void **pv) {
- struct run_once_func_arg *arg = v;
+ struct run_once_func_arg *arg = (struct run_once_func_arg *)v;
(*arg->init_function)();
return 1;
}
diff --git a/src/core/lib/support/thd.c b/src/core/lib/support/thd.cc
index ca62615d65..ca62615d65 100644
--- a/src/core/lib/support/thd.c
+++ b/src/core/lib/support/thd.cc
diff --git a/src/core/lib/support/thd_posix.c b/src/core/lib/support/thd_posix.cc
index 98afd10df7..98afd10df7 100644
--- a/src/core/lib/support/thd_posix.c
+++ b/src/core/lib/support/thd_posix.cc
diff --git a/src/core/lib/support/thd_windows.c b/src/core/lib/support/thd_windows.cc
index 54533e9412..1a82805dd9 100644
--- a/src/core/lib/support/thd_windows.c
+++ b/src/core/lib/support/thd_windows.cc
@@ -66,7 +66,7 @@ static DWORD WINAPI thread_body(void *v) {
int gpr_thd_new(gpr_thd_id *t, void (*thd_body)(void *arg), void *arg,
const gpr_thd_options *options) {
HANDLE handle;
- struct thd_info *info = gpr_malloc(sizeof(*info));
+ struct thd_info *info = (struct thd_info *)gpr_malloc(sizeof(*info));
info->body = thd_body;
info->arg = arg;
*t = 0;
diff --git a/src/core/lib/support/time.c b/src/core/lib/support/time.cc
index 6903674d75..6903674d75 100644
--- a/src/core/lib/support/time.c
+++ b/src/core/lib/support/time.cc
diff --git a/src/core/lib/support/time_posix.c b/src/core/lib/support/time_posix.cc
index 3ead40d807..3267ea6b54 100644
--- a/src/core/lib/support/time_posix.c
+++ b/src/core/lib/support/time_posix.cc
@@ -30,7 +30,6 @@
#include <grpc/support/atm.h>
#include <grpc/support/log.h>
#include <grpc/support/time.h>
-#include "src/core/lib/support/block_annotate.h"
static struct timespec timespec_from_gpr(gpr_timespec gts) {
struct timespec rv;
@@ -128,7 +127,9 @@ static gpr_timespec now_impl(gpr_clock_type clock) {
}
#endif
+extern "C" {
gpr_timespec (*gpr_now_impl)(gpr_clock_type clock_type) = now_impl;
+}
#ifdef GPR_LOW_LEVEL_COUNTERS
gpr_atm gpr_now_call_count;
@@ -157,9 +158,7 @@ void gpr_sleep_until(gpr_timespec until) {
delta = gpr_time_sub(until, now);
delta_ts = timespec_from_gpr(delta);
- GRPC_SCHEDULING_START_BLOCKING_REGION;
ns_result = nanosleep(&delta_ts, NULL);
- GRPC_SCHEDULING_END_BLOCKING_REGION;
if (ns_result == 0) {
break;
}
diff --git a/src/core/lib/support/time_precise.c b/src/core/lib/support/time_precise.cc
index 6ce19e53cc..05ef7c59bc 100644
--- a/src/core/lib/support/time_precise.c
+++ b/src/core/lib/support/time_precise.cc
@@ -20,6 +20,8 @@
#include <grpc/support/time.h>
#include <stdio.h>
+#include "src/core/lib/support/time_precise.h"
+
#ifdef GRPC_TIMERS_RDTSC
#if defined(__i386__)
static void gpr_get_cycle_counter(int64_t int *clk) {
diff --git a/src/core/lib/support/time_precise.h b/src/core/lib/support/time_precise.h
index aa28d6d7c4..cb15cdf919 100644
--- a/src/core/lib/support/time_precise.h
+++ b/src/core/lib/support/time_precise.h
@@ -21,7 +21,15 @@
#include <grpc/support/time.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void gpr_precise_clock_init(void);
void gpr_precise_clock_now(gpr_timespec *clk);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SUPPORT_TIME_PRECISE_H */
diff --git a/src/core/lib/support/time_windows.c b/src/core/lib/support/time_windows.cc
index 40df3761c0..08c1b22964 100644
--- a/src/core/lib/support/time_windows.c
+++ b/src/core/lib/support/time_windows.cc
@@ -28,7 +28,6 @@
#include <process.h>
#include <sys/timeb.h>
-#include "src/core/lib/support/block_annotate.h"
#include "src/core/lib/support/time_precise.h"
static LARGE_INTEGER g_start_time;
@@ -69,7 +68,9 @@ static gpr_timespec now_impl(gpr_clock_type clock) {
return now_tv;
}
+extern "C" {
gpr_timespec (*gpr_now_impl)(gpr_clock_type clock_type) = now_impl;
+}
gpr_timespec gpr_now(gpr_clock_type clock_type) {
return gpr_now_impl(clock_type);
@@ -92,9 +93,7 @@ void gpr_sleep_until(gpr_timespec until) {
sleep_millis =
delta.tv_sec * GPR_MS_PER_SEC + delta.tv_nsec / GPR_NS_PER_MS;
GPR_ASSERT((sleep_millis >= 0) && (sleep_millis <= INT_MAX));
- GRPC_SCHEDULING_START_BLOCKING_REGION;
Sleep((DWORD)sleep_millis);
- GRPC_SCHEDULING_END_BLOCKING_REGION;
}
}
diff --git a/src/core/lib/support/tls_pthread.c b/src/core/lib/support/tls_pthread.cc
index 9ebee577fe..9ebee577fe 100644
--- a/src/core/lib/support/tls_pthread.c
+++ b/src/core/lib/support/tls_pthread.cc
diff --git a/src/core/lib/support/tmpfile_msys.c b/src/core/lib/support/tmpfile_msys.cc
index 614c0a4a18..614c0a4a18 100644
--- a/src/core/lib/support/tmpfile_msys.c
+++ b/src/core/lib/support/tmpfile_msys.cc
diff --git a/src/core/lib/support/tmpfile_posix.c b/src/core/lib/support/tmpfile_posix.cc
index 7ad3af0a57..7ad3af0a57 100644
--- a/src/core/lib/support/tmpfile_posix.c
+++ b/src/core/lib/support/tmpfile_posix.cc
diff --git a/src/core/lib/support/tmpfile_windows.c b/src/core/lib/support/tmpfile_windows.cc
index 47b4510a72..47b4510a72 100644
--- a/src/core/lib/support/tmpfile_windows.c
+++ b/src/core/lib/support/tmpfile_windows.cc
diff --git a/src/core/lib/support/wrap_memcpy.c b/src/core/lib/support/wrap_memcpy.cc
index cff056dc3b..c2362bf5b8 100644
--- a/src/core/lib/support/wrap_memcpy.c
+++ b/src/core/lib/support/wrap_memcpy.cc
@@ -26,6 +26,7 @@
* Enable by setting LDFLAGS=-Wl,-wrap,memcpy when linking.
*/
+extern "C" {
#ifdef __linux__
#if defined(__x86_64__) && !defined(GPR_MUSL_LIBC_COMPAT)
__asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
@@ -38,3 +39,4 @@ void *__wrap_memcpy(void *destination, const void *source, size_t num) {
}
#endif
#endif
+}
diff --git a/src/core/lib/surface/alarm.c b/src/core/lib/surface/alarm.cc
index 7712f560b9..16a16bfd93 100644
--- a/src/core/lib/surface/alarm.c
+++ b/src/core/lib/surface/alarm.cc
@@ -15,6 +15,10 @@
* limitations under the License.
*
*/
+#include <grpc/support/port_platform.h>
+
+#include <inttypes.h>
+
#include "src/core/lib/surface/alarm_internal.h"
#include <grpc/grpc.h>
@@ -122,8 +126,7 @@ void grpc_alarm_set(grpc_alarm *alarm, grpc_completion_queue *cq,
GPR_ASSERT(grpc_cq_begin_op(cq, tag));
grpc_timer_init(&exec_ctx, &alarm->alarm,
- gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC),
- &alarm->on_alarm, gpr_now(GPR_CLOCK_MONOTONIC));
+ grpc_timespec_to_millis_round_up(deadline), &alarm->on_alarm);
grpc_exec_ctx_finish(&exec_ctx);
}
diff --git a/src/core/lib/surface/alarm_internal.h b/src/core/lib/surface/alarm_internal.h
index 7f2126c5c9..136b60547f 100644
--- a/src/core/lib/surface/alarm_internal.h
+++ b/src/core/lib/surface/alarm_internal.h
@@ -22,6 +22,10 @@
#include <grpc/support/log.h>
#include "src/core/lib/debug/trace.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef NDEBUG
extern grpc_tracer_flag grpc_trace_alarm_refcount;
@@ -37,4 +41,8 @@ extern grpc_tracer_flag grpc_trace_alarm_refcount;
#endif /* defined(NDEBUG) */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SURFACE_ALARM_INTERNAL_H */
diff --git a/src/core/lib/surface/api_trace.c b/src/core/lib/surface/api_trace.cc
index 56973303da..56973303da 100644
--- a/src/core/lib/surface/api_trace.c
+++ b/src/core/lib/surface/api_trace.cc
diff --git a/src/core/lib/surface/api_trace.h b/src/core/lib/surface/api_trace.h
index 849cbaaef6..105abdf629 100644
--- a/src/core/lib/surface/api_trace.h
+++ b/src/core/lib/surface/api_trace.h
@@ -22,6 +22,10 @@
#include <grpc/support/log.h>
#include "src/core/lib/debug/trace.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern grpc_tracer_flag grpc_api_trace;
/* Provide unwrapping macros because we're in C89 and variadic macros weren't
@@ -47,4 +51,8 @@ extern grpc_tracer_flag grpc_api_trace;
gpr_log(GPR_INFO, fmt GRPC_API_TRACE_UNWRAP##nargs args); \
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SURFACE_API_TRACE_H */
diff --git a/src/core/lib/surface/byte_buffer.c b/src/core/lib/surface/byte_buffer.cc
index 7ed550ef87..7ed550ef87 100644
--- a/src/core/lib/surface/byte_buffer.c
+++ b/src/core/lib/surface/byte_buffer.cc
diff --git a/src/core/lib/surface/byte_buffer_reader.c b/src/core/lib/surface/byte_buffer_reader.cc
index 373ee1fe8b..373ee1fe8b 100644
--- a/src/core/lib/surface/byte_buffer_reader.c
+++ b/src/core/lib/surface/byte_buffer_reader.cc
diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.cc
index 4f8cf08c52..781100d98a 100644
--- a/src/core/lib/surface/call.c
+++ b/src/core/lib/surface/call.cc
@@ -41,6 +41,7 @@
#include "src/core/lib/support/string.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/call.h"
+#include "src/core/lib/surface/call_test_only.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/completion_queue.h"
#include "src/core/lib/surface/validate_metadata.h"
@@ -93,10 +94,11 @@ static gpr_atm pack_received_status(received_status r) {
}
static received_status unpack_received_status(gpr_atm atm) {
- return (atm & 1) == 0
- ? (received_status){.is_set = false, .error = GRPC_ERROR_NONE}
- : (received_status){.is_set = true,
- .error = (grpc_error *)(atm & ~(gpr_atm)1)};
+ if ((atm & 1) == 0) {
+ return {false, GRPC_ERROR_NONE};
+ } else {
+ return {true, (grpc_error *)(atm & ~(gpr_atm)1)};
+ }
}
#define MAX_ERRORS_PER_BATCH 4
@@ -214,7 +216,7 @@ struct grpc_call {
server, it's trailing metadata */
grpc_linked_mdelem send_extra_metadata[MAX_SEND_EXTRA_METADATA_COUNT];
int send_extra_metadata_count;
- gpr_timespec send_deadline;
+ grpc_millis send_deadline;
grpc_slice_buffer_stream sending_stream;
@@ -281,7 +283,7 @@ static void destroy_call(grpc_exec_ctx *exec_ctx, void *call_stack,
grpc_error *error);
static void receiving_slice_ready(grpc_exec_ctx *exec_ctx, void *bctlp,
grpc_error *error);
-static void get_final_status(grpc_call *call,
+static void get_final_status(grpc_exec_ctx *exec_ctx, grpc_call *call,
void (*set_value)(grpc_status_code code,
void *user_data),
void *set_value_user_data, grpc_slice *details);
@@ -370,11 +372,10 @@ grpc_error *grpc_call_create(grpc_exec_ctx *exec_ctx,
}
for (i = 0; i < 2; i++) {
for (j = 0; j < 2; j++) {
- call->metadata_batch[i][j].deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
+ call->metadata_batch[i][j].deadline = GRPC_MILLIS_INF_FUTURE;
}
}
- gpr_timespec send_deadline =
- gpr_convert_clock_type(args->send_deadline, GPR_CLOCK_MONOTONIC);
+ grpc_millis send_deadline = args->send_deadline;
bool immediately_cancel = false;
@@ -392,10 +393,7 @@ grpc_error *grpc_call_create(grpc_exec_ctx *exec_ctx,
gpr_mu_lock(&pc->child_list_mu);
if (args->propagation_mask & GRPC_PROPAGATE_DEADLINE) {
- send_deadline = gpr_time_min(
- gpr_convert_clock_type(send_deadline,
- args->parent->send_deadline.clock_type),
- args->parent->send_deadline);
+ send_deadline = GPR_MIN(send_deadline, args->parent->send_deadline);
}
/* for now GRPC_PROPAGATE_TRACING_CONTEXT *MUST* be passed with
* GRPC_PROPAGATE_STATS_CONTEXT */
@@ -439,15 +437,14 @@ grpc_error *grpc_call_create(grpc_exec_ctx *exec_ctx,
GRPC_CHANNEL_INTERNAL_REF(args->channel, "call");
/* initial refcount dropped by grpc_call_unref */
- grpc_call_element_args call_args = {
- .call_stack = CALL_STACK_FROM_CALL(call),
- .server_transport_data = args->server_transport_data,
- .context = call->context,
- .path = path,
- .start_time = call->start_time,
- .deadline = send_deadline,
- .arena = call->arena,
- .call_combiner = &call->call_combiner};
+ grpc_call_element_args call_args = {CALL_STACK_FROM_CALL(call),
+ args->server_transport_data,
+ call->context,
+ path,
+ call->start_time,
+ send_deadline,
+ call->arena,
+ &call->call_combiner};
add_init_error(&error, grpc_call_stack_init(exec_ctx, channel_stack, 1,
destroy_call, call, &call_args));
if (error != GRPC_ERROR_NONE) {
@@ -550,8 +547,8 @@ static void destroy_call(grpc_exec_ctx *exec_ctx, void *call,
GRPC_CQ_INTERNAL_UNREF(exec_ctx, c->cq, "bind");
}
- get_final_status(c, set_status_value_directly, &c->final_info.final_status,
- NULL);
+ get_final_status(exec_ctx, c, set_status_value_directly,
+ &c->final_info.final_status, NULL);
c->final_info.stats.latency =
gpr_time_sub(gpr_now(GPR_CLOCK_MONOTONIC), c->start_time);
@@ -737,13 +734,16 @@ static void cancel_with_status(grpc_exec_ctx *exec_ctx, grpc_call *c,
* FINAL STATUS CODE MANIPULATION
*/
-static bool get_final_status_from(
- grpc_call *call, grpc_error *error, bool allow_ok_status,
- void (*set_value)(grpc_status_code code, void *user_data),
- void *set_value_user_data, grpc_slice *details) {
+static bool get_final_status_from(grpc_exec_ctx *exec_ctx, grpc_call *call,
+ grpc_error *error, bool allow_ok_status,
+ void (*set_value)(grpc_status_code code,
+ void *user_data),
+ void *set_value_user_data,
+ grpc_slice *details) {
grpc_status_code code;
grpc_slice slice = grpc_empty_slice();
- grpc_error_get_status(error, call->send_deadline, &code, &slice, NULL);
+ grpc_error_get_status(exec_ctx, error, call->send_deadline, &code, &slice,
+ NULL);
if (code == GRPC_STATUS_OK && !allow_ok_status) {
return false;
}
@@ -755,7 +755,7 @@ static bool get_final_status_from(
return true;
}
-static void get_final_status(grpc_call *call,
+static void get_final_status(grpc_exec_ctx *exec_ctx, grpc_call *call,
void (*set_value)(grpc_status_code code,
void *user_data),
void *set_value_user_data, grpc_slice *details) {
@@ -780,8 +780,9 @@ static void get_final_status(grpc_call *call,
for (i = 0; i < STATUS_SOURCE_COUNT; i++) {
if (status[i].is_set &&
grpc_error_has_clear_grpc_status(status[i].error)) {
- if (get_final_status_from(call, status[i].error, allow_ok_status != 0,
- set_value, set_value_user_data, details)) {
+ if (get_final_status_from(exec_ctx, call, status[i].error,
+ allow_ok_status != 0, set_value,
+ set_value_user_data, details)) {
return;
}
}
@@ -789,8 +790,9 @@ static void get_final_status(grpc_call *call,
/* If no clearly defined status exists, search for 'anything' */
for (i = 0; i < STATUS_SOURCE_COUNT; i++) {
if (status[i].is_set) {
- if (get_final_status_from(call, status[i].error, allow_ok_status != 0,
- set_value, set_value_user_data, details)) {
+ if (get_final_status_from(exec_ctx, call, status[i].error,
+ allow_ok_status != 0, set_value,
+ set_value_user_data, details)) {
return;
}
}
@@ -807,10 +809,8 @@ static void get_final_status(grpc_call *call,
static void set_status_from_error(grpc_exec_ctx *exec_ctx, grpc_call *call,
status_source source, grpc_error *error) {
if (!gpr_atm_rel_cas(&call->status[source],
- pack_received_status((received_status){
- .is_set = false, .error = GRPC_ERROR_NONE}),
- pack_received_status((received_status){
- .is_set = true, .error = error}))) {
+ pack_received_status({false, GRPC_ERROR_NONE}),
+ pack_received_status({true, error}))) {
GRPC_ERROR_UNREF(error);
}
}
@@ -1288,17 +1288,22 @@ static void post_batch_completion(grpc_exec_ctx *exec_ctx,
}
if (call->is_client) {
- get_final_status(call, set_status_value_directly,
+ get_final_status(exec_ctx, call, set_status_value_directly,
call->final_op.client.status,
call->final_op.client.status_details);
} else {
- get_final_status(call, set_cancelled_value,
+ get_final_status(exec_ctx, call, set_cancelled_value,
call->final_op.server.cancelled, NULL);
}
GRPC_ERROR_UNREF(error);
error = GRPC_ERROR_NONE;
}
+ if (error != GRPC_ERROR_NONE && bctl->op.recv_message &&
+ *call->receiving_buffer != NULL) {
+ grpc_byte_buffer_destroy(*call->receiving_buffer);
+ *call->receiving_buffer = NULL;
+ }
if (bctl->completion_data.notify_tag.is_closure) {
/* unrefs bctl->error */
@@ -1408,7 +1413,8 @@ static void process_data_after_md(grpc_exec_ctx *exec_ctx,
grpc_compression_algorithm algo;
GPR_ASSERT(
grpc_compression_algorithm_from_message_stream_compression_algorithm(
- &algo, call->incoming_message_compression_algorithm, 0));
+ &algo, call->incoming_message_compression_algorithm,
+ (grpc_stream_compression_algorithm)0));
*call->receiving_buffer =
grpc_raw_compressed_byte_buffer_create(NULL, 0, algo);
} else {
@@ -1552,11 +1558,8 @@ static void receiving_initial_metadata_ready(grpc_exec_ctx *exec_ctx,
validate_filtered_metadata(exec_ctx, bctl);
GPR_TIMER_END("validate_filtered_metadata", 0);
- if (gpr_time_cmp(md->deadline, gpr_inf_future(md->deadline.clock_type)) !=
- 0 &&
- !call->is_client) {
- call->send_deadline =
- gpr_convert_clock_type(md->deadline, GPR_CLOCK_MONOTONIC);
+ if (md->deadline != GRPC_MILLIS_INF_FUTURE && !call->is_client) {
+ call->send_deadline = md->deadline;
}
}
diff --git a/src/core/lib/surface/call.h b/src/core/lib/surface/call.h
index c680139cf6..27c2f5243c 100644
--- a/src/core/lib/surface/call.h
+++ b/src/core/lib/surface/call.h
@@ -49,7 +49,7 @@ typedef struct grpc_call_create_args {
grpc_mdelem *add_initial_metadata;
size_t add_initial_metadata_count;
- gpr_timespec send_deadline;
+ grpc_millis send_deadline;
} grpc_call_create_args;
/* Create a new call based on \a args.
diff --git a/src/core/lib/surface/call_details.c b/src/core/lib/surface/call_details.cc
index ea9208c7e3..ea9208c7e3 100644
--- a/src/core/lib/surface/call_details.c
+++ b/src/core/lib/surface/call_details.cc
diff --git a/src/core/lib/surface/call_log_batch.c b/src/core/lib/surface/call_log_batch.cc
index 4a1c265817..5557927b7c 100644
--- a/src/core/lib/surface/call_log_batch.c
+++ b/src/core/lib/surface/call_log_batch.cc
@@ -18,6 +18,8 @@
#include "src/core/lib/surface/call.h"
+#include <inttypes.h>
+
#include <grpc/support/alloc.h>
#include <grpc/support/string_util.h>
#include "src/core/lib/slice/slice_string_helpers.h"
diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.cc
index fc7d745463..b2395302f4 100644
--- a/src/core/lib/surface/channel.c
+++ b/src/core/lib/surface/channel.cc
@@ -18,6 +18,7 @@
#include "src/core/lib/surface/channel.h"
+#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
@@ -144,17 +145,15 @@ grpc_channel *grpc_channel_create_with_builder(
channel->compression_options.default_level.level =
(grpc_compression_level)grpc_channel_arg_get_integer(
&args->args[i],
- (grpc_integer_options){GRPC_COMPRESS_LEVEL_NONE,
- GRPC_COMPRESS_LEVEL_NONE,
- GRPC_COMPRESS_LEVEL_COUNT - 1});
+ {GRPC_COMPRESS_LEVEL_NONE, GRPC_COMPRESS_LEVEL_NONE,
+ 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(
- &args->args[i],
- (grpc_integer_options){GRPC_COMPRESS_NONE, GRPC_COMPRESS_NONE,
- GRPC_COMPRESS_ALGORITHMS_COUNT - 1});
+ &args->args[i], {GRPC_COMPRESS_NONE, GRPC_COMPRESS_NONE,
+ GRPC_COMPRESS_ALGORITHMS_COUNT - 1});
} else if (0 ==
strcmp(args->args[i].key,
GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET)) {
@@ -236,7 +235,7 @@ static grpc_call *grpc_channel_create_call_internal(
grpc_exec_ctx *exec_ctx, grpc_channel *channel, grpc_call *parent_call,
uint32_t propagation_mask, grpc_completion_queue *cq,
grpc_pollset_set *pollset_set_alternative, grpc_mdelem path_mdelem,
- grpc_mdelem authority_mdelem, gpr_timespec deadline) {
+ grpc_mdelem authority_mdelem, grpc_millis deadline) {
grpc_mdelem send_metadata[2];
size_t num_metadata = 0;
@@ -282,7 +281,7 @@ grpc_call *grpc_channel_create_call(grpc_channel *channel,
host != NULL ? grpc_mdelem_from_slices(&exec_ctx, GRPC_MDSTR_AUTHORITY,
grpc_slice_ref_internal(*host))
: GRPC_MDNULL,
- deadline);
+ grpc_timespec_to_millis_round_up(deadline));
grpc_exec_ctx_finish(&exec_ctx);
return call;
}
@@ -290,7 +289,7 @@ grpc_call *grpc_channel_create_call(grpc_channel *channel,
grpc_call *grpc_channel_create_pollset_set_call(
grpc_exec_ctx *exec_ctx, grpc_channel *channel, grpc_call *parent_call,
uint32_t propagation_mask, grpc_pollset_set *pollset_set, grpc_slice method,
- const grpc_slice *host, gpr_timespec deadline, void *reserved) {
+ const grpc_slice *host, grpc_millis deadline, void *reserved) {
GPR_ASSERT(!reserved);
return grpc_channel_create_call_internal(
exec_ctx, channel, parent_call, propagation_mask, NULL, pollset_set,
@@ -346,7 +345,8 @@ grpc_call *grpc_channel_create_registered_call(
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_call *call = grpc_channel_create_call_internal(
&exec_ctx, channel, parent_call, propagation_mask, completion_queue, NULL,
- GRPC_MDELEM_REF(rc->path), GRPC_MDELEM_REF(rc->authority), deadline);
+ GRPC_MDELEM_REF(rc->path), GRPC_MDELEM_REF(rc->authority),
+ grpc_timespec_to_millis_round_up(deadline));
grpc_exec_ctx_finish(&exec_ctx);
return call;
}
diff --git a/src/core/lib/surface/channel.h b/src/core/lib/surface/channel.h
index 528bb868e2..4d1c7e369f 100644
--- a/src/core/lib/surface/channel.h
+++ b/src/core/lib/surface/channel.h
@@ -23,6 +23,10 @@
#include "src/core/lib/channel/channel_stack_builder.h"
#include "src/core/lib/surface/channel_stack_type.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target,
const grpc_channel_args *args,
grpc_channel_stack_type channel_stack_type,
@@ -43,7 +47,7 @@ grpc_channel *grpc_channel_create_with_builder(
grpc_call *grpc_channel_create_pollset_set_call(
grpc_exec_ctx *exec_ctx, grpc_channel *channel, grpc_call *parent_call,
uint32_t propagation_mask, grpc_pollset_set *pollset_set, grpc_slice method,
- const grpc_slice *host, gpr_timespec deadline, void *reserved);
+ const grpc_slice *host, grpc_millis deadline, void *reserved);
/** Get a (borrowed) pointer to this channels underlying channel stack */
grpc_channel_stack *grpc_channel_get_channel_stack(grpc_channel *channel);
@@ -81,4 +85,8 @@ void grpc_channel_internal_unref(grpc_exec_ctx *exec_ctx,
grpc_compression_options grpc_channel_compression_options(
const grpc_channel *channel);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SURFACE_CHANNEL_H */
diff --git a/src/core/lib/surface/channel_init.c b/src/core/lib/surface/channel_init.cc
index 33f444b89e..33f444b89e 100644
--- a/src/core/lib/surface/channel_init.c
+++ b/src/core/lib/surface/channel_init.cc
diff --git a/src/core/lib/surface/channel_ping.c b/src/core/lib/surface/channel_ping.cc
index f45b568958..f45b568958 100644
--- a/src/core/lib/surface/channel_ping.c
+++ b/src/core/lib/surface/channel_ping.cc
diff --git a/src/core/lib/surface/channel_stack_type.c b/src/core/lib/surface/channel_stack_type.cc
index 5f5c877727..5f5c877727 100644
--- a/src/core/lib/surface/channel_stack_type.c
+++ b/src/core/lib/surface/channel_stack_type.cc
diff --git a/src/core/lib/surface/channel_stack_type.h b/src/core/lib/surface/channel_stack_type.h
index 3f0e14ffc0..903b90a071 100644
--- a/src/core/lib/surface/channel_stack_type.h
+++ b/src/core/lib/surface/channel_stack_type.h
@@ -21,6 +21,10 @@
#include <stdbool.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum {
// normal top-half client channel with load-balancing, connection management
GRPC_CLIENT_CHANNEL,
@@ -42,4 +46,8 @@ bool grpc_channel_stack_type_is_client(grpc_channel_stack_type type);
const char *grpc_channel_stack_type_string(grpc_channel_stack_type type);
-#endif /* GRPC_CORE_LIB_SURFACE_CHANNEL_STACK_TYPE_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SURFACE_CHANNEL_STACK_TYPE_H */ \ No newline at end of file
diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.cc
index fed66e3a20..36b4b835f8 100644
--- a/src/core/lib/surface/completion_queue.c
+++ b/src/core/lib/surface/completion_queue.cc
@@ -15,8 +15,11 @@
* limitations under the License.
*
*/
+#include <grpc/support/port_platform.h>
+
#include "src/core/lib/surface/completion_queue.h"
+#include <inttypes.h>
#include <stdio.h>
#include <string.h>
@@ -58,8 +61,7 @@ typedef struct {
grpc_error *(*kick)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
grpc_pollset_worker *specific_worker);
grpc_error *(*work)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
- grpc_pollset_worker **worker, gpr_timespec now,
- gpr_timespec deadline);
+ grpc_pollset_worker **worker, grpc_millis deadline);
void (*shutdown)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
grpc_closure *closure);
void (*destroy)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset);
@@ -97,8 +99,7 @@ static void non_polling_poller_destroy(grpc_exec_ctx *exec_ctx,
static grpc_error *non_polling_poller_work(grpc_exec_ctx *exec_ctx,
grpc_pollset *pollset,
grpc_pollset_worker **worker,
- gpr_timespec now,
- gpr_timespec deadline) {
+ grpc_millis deadline) {
non_polling_poller *npp = (non_polling_poller *)pollset;
if (npp->shutdown) return GRPC_ERROR_NONE;
non_polling_worker w;
@@ -112,7 +113,10 @@ static grpc_error *non_polling_poller_work(grpc_exec_ctx *exec_ctx,
w.next->prev = w.prev->next = &w;
}
w.kicked = false;
- while (!npp->shutdown && !w.kicked && !gpr_cv_wait(&w.cv, &npp->mu, deadline))
+ gpr_timespec deadline_ts =
+ grpc_millis_to_timespec(deadline, GPR_CLOCK_REALTIME);
+ while (!npp->shutdown && !w.kicked &&
+ !gpr_cv_wait(&w.cv, &npp->mu, deadline_ts))
;
if (&w == npp->root) {
npp->root = w.next;
@@ -164,32 +168,15 @@ static void non_polling_poller_shutdown(grpc_exec_ctx *exec_ctx,
static const cq_poller_vtable g_poller_vtable_by_poller_type[] = {
/* GRPC_CQ_DEFAULT_POLLING */
- {.can_get_pollset = true,
- .can_listen = true,
- .size = grpc_pollset_size,
- .init = grpc_pollset_init,
- .kick = grpc_pollset_kick,
- .work = grpc_pollset_work,
- .shutdown = grpc_pollset_shutdown,
- .destroy = grpc_pollset_destroy},
+ {true, true, grpc_pollset_size, grpc_pollset_init, grpc_pollset_kick,
+ grpc_pollset_work, grpc_pollset_shutdown, grpc_pollset_destroy},
/* GRPC_CQ_NON_LISTENING */
- {.can_get_pollset = true,
- .can_listen = false,
- .size = grpc_pollset_size,
- .init = grpc_pollset_init,
- .kick = grpc_pollset_kick,
- .work = grpc_pollset_work,
- .shutdown = grpc_pollset_shutdown,
- .destroy = grpc_pollset_destroy},
+ {true, false, grpc_pollset_size, grpc_pollset_init, grpc_pollset_kick,
+ grpc_pollset_work, grpc_pollset_shutdown, grpc_pollset_destroy},
/* GRPC_CQ_NON_POLLING */
- {.can_get_pollset = false,
- .can_listen = false,
- .size = non_polling_poller_size,
- .init = non_polling_poller_init,
- .kick = non_polling_poller_kick,
- .work = non_polling_poller_work,
- .shutdown = non_polling_poller_shutdown,
- .destroy = non_polling_poller_destroy},
+ {false, false, non_polling_poller_size, non_polling_poller_init,
+ non_polling_poller_kick, non_polling_poller_work,
+ non_polling_poller_shutdown, non_polling_poller_destroy},
};
typedef struct cq_vtable {
@@ -757,7 +744,7 @@ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cq,
typedef struct {
gpr_atm last_seen_things_queued_ever;
grpc_completion_queue *cq;
- gpr_timespec deadline;
+ grpc_millis deadline;
grpc_cq_completion *stolen_completion;
void *tag; /* for pluck */
bool first_loop;
@@ -786,8 +773,7 @@ static bool cq_is_next_finished(grpc_exec_ctx *exec_ctx, void *arg) {
return true;
}
}
- return !a->first_loop &&
- gpr_time_cmp(a->deadline, gpr_now(a->deadline.clock_type)) < 0;
+ return !a->first_loop && a->deadline < grpc_exec_ctx_now(exec_ctx);
}
#ifndef NDEBUG
@@ -816,7 +802,6 @@ static void dump_pending_tags(grpc_completion_queue *cq) {}
static grpc_event cq_next(grpc_completion_queue *cq, gpr_timespec deadline,
void *reserved) {
grpc_event ret;
- gpr_timespec now;
cq_next_data *cqd = (cq_next_data *)DATA_FROM_CQ(cq);
GPR_TIMER_BEGIN("grpc_completion_queue_next", 0);
@@ -833,23 +818,20 @@ static grpc_event cq_next(grpc_completion_queue *cq, gpr_timespec deadline,
dump_pending_tags(cq);
- deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC);
-
GRPC_CQ_INTERNAL_REF(cq, "next");
+ grpc_millis deadline_millis = grpc_timespec_to_millis_round_up(deadline);
cq_is_finished_arg is_finished_arg = {
- .last_seen_things_queued_ever =
- gpr_atm_no_barrier_load(&cqd->things_queued_ever),
- .cq = cq,
- .deadline = deadline,
- .stolen_completion = NULL,
- .tag = NULL,
- .first_loop = true};
+ gpr_atm_no_barrier_load(&cqd->things_queued_ever),
+ cq,
+ deadline_millis,
+ NULL,
+ NULL,
+ true};
grpc_exec_ctx exec_ctx =
GRPC_EXEC_CTX_INITIALIZER(0, cq_is_next_finished, &is_finished_arg);
-
for (;;) {
- gpr_timespec iteration_deadline = deadline;
+ grpc_millis iteration_deadline = deadline_millis;
if (is_finished_arg.stolen_completion != NULL) {
grpc_cq_completion *c = is_finished_arg.stolen_completion;
@@ -876,7 +858,7 @@ static grpc_event cq_next(grpc_completion_queue *cq, gpr_timespec deadline,
attempt at popping. Not doing this can potentially deadlock this
thread forever (if the deadline is infinity) */
if (cq_event_queue_num_items(&cqd->queue) > 0) {
- iteration_deadline = gpr_time_0(GPR_CLOCK_MONOTONIC);
+ iteration_deadline = 0;
}
}
@@ -897,8 +879,8 @@ static grpc_event cq_next(grpc_completion_queue *cq, gpr_timespec deadline,
break;
}
- now = gpr_now(GPR_CLOCK_MONOTONIC);
- if (!is_finished_arg.first_loop && gpr_time_cmp(now, deadline) >= 0) {
+ if (!is_finished_arg.first_loop &&
+ grpc_exec_ctx_now(&exec_ctx) >= deadline_millis) {
memset(&ret, 0, sizeof(ret));
ret.type = GRPC_QUEUE_TIMEOUT;
dump_pending_tags(cq);
@@ -909,7 +891,7 @@ static grpc_event cq_next(grpc_completion_queue *cq, gpr_timespec deadline,
gpr_mu_lock(cq->mu);
cq->num_polls++;
grpc_error *err = cq->poller_vtable->work(&exec_ctx, POLLSET_FROM_CQ(cq),
- NULL, now, iteration_deadline);
+ NULL, iteration_deadline);
gpr_mu_unlock(cq->mu);
if (err != GRPC_ERROR_NONE) {
@@ -1046,8 +1028,7 @@ static bool cq_is_pluck_finished(grpc_exec_ctx *exec_ctx, void *arg) {
}
gpr_mu_unlock(cq->mu);
}
- return !a->first_loop &&
- gpr_time_cmp(a->deadline, gpr_now(a->deadline.clock_type)) < 0;
+ return !a->first_loop && a->deadline < grpc_exec_ctx_now(exec_ctx);
}
static grpc_event cq_pluck(grpc_completion_queue *cq, void *tag,
@@ -1056,7 +1037,6 @@ static grpc_event cq_pluck(grpc_completion_queue *cq, void *tag,
grpc_cq_completion *c;
grpc_cq_completion *prev;
grpc_pollset_worker *worker = NULL;
- gpr_timespec now;
cq_pluck_data *cqd = (cq_pluck_data *)DATA_FROM_CQ(cq);
GPR_TIMER_BEGIN("grpc_completion_queue_pluck", 0);
@@ -1075,18 +1055,16 @@ static grpc_event cq_pluck(grpc_completion_queue *cq, void *tag,
dump_pending_tags(cq);
- deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC);
-
GRPC_CQ_INTERNAL_REF(cq, "pluck");
gpr_mu_lock(cq->mu);
+ grpc_millis deadline_millis = grpc_timespec_to_millis_round_up(deadline);
cq_is_finished_arg is_finished_arg = {
- .last_seen_things_queued_ever =
- gpr_atm_no_barrier_load(&cqd->things_queued_ever),
- .cq = cq,
- .deadline = deadline,
- .stolen_completion = NULL,
- .tag = tag,
- .first_loop = true};
+ gpr_atm_no_barrier_load(&cqd->things_queued_ever),
+ cq,
+ deadline_millis,
+ NULL,
+ tag,
+ true};
grpc_exec_ctx exec_ctx =
GRPC_EXEC_CTX_INITIALIZER(0, cq_is_pluck_finished, &is_finished_arg);
for (;;) {
@@ -1135,8 +1113,8 @@ static grpc_event cq_pluck(grpc_completion_queue *cq, void *tag,
dump_pending_tags(cq);
break;
}
- now = gpr_now(GPR_CLOCK_MONOTONIC);
- if (!is_finished_arg.first_loop && gpr_time_cmp(now, deadline) >= 0) {
+ if (!is_finished_arg.first_loop &&
+ grpc_exec_ctx_now(&exec_ctx) >= deadline_millis) {
del_plucker(cq, tag, &worker);
gpr_mu_unlock(cq->mu);
memset(&ret, 0, sizeof(ret));
@@ -1144,10 +1122,9 @@ static grpc_event cq_pluck(grpc_completion_queue *cq, void *tag,
dump_pending_tags(cq);
break;
}
-
cq->num_polls++;
grpc_error *err = cq->poller_vtable->work(&exec_ctx, POLLSET_FROM_CQ(cq),
- &worker, now, deadline);
+ &worker, deadline_millis);
if (err != GRPC_ERROR_NONE) {
del_plucker(cq, tag, &worker);
gpr_mu_unlock(cq->mu);
diff --git a/src/core/lib/surface/completion_queue_factory.c b/src/core/lib/surface/completion_queue_factory.cc
index aeecff5306..aeecff5306 100644
--- a/src/core/lib/surface/completion_queue_factory.c
+++ b/src/core/lib/surface/completion_queue_factory.cc
diff --git a/src/core/lib/surface/completion_queue_factory.h b/src/core/lib/surface/completion_queue_factory.h
index 89be8f8216..cb0af6f0fb 100644
--- a/src/core/lib/surface/completion_queue_factory.h
+++ b/src/core/lib/surface/completion_queue_factory.h
@@ -22,6 +22,10 @@
#include <grpc/grpc.h>
#include "src/core/lib/surface/completion_queue.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_completion_queue_factory_vtable {
grpc_completion_queue* (*create)(const grpc_completion_queue_factory*,
const grpc_completion_queue_attributes*);
@@ -33,4 +37,8 @@ struct grpc_completion_queue_factory {
grpc_completion_queue_factory_vtable* vtable;
};
-#endif /* GRPC_CORE_LIB_SURFACE_COMPLETION_QUEUE_FACTORY_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SURFACE_COMPLETION_QUEUE_FACTORY_H */ \ No newline at end of file
diff --git a/src/core/lib/surface/event_string.c b/src/core/lib/surface/event_string.cc
index f236272e2a..f236272e2a 100644
--- a/src/core/lib/surface/event_string.c
+++ b/src/core/lib/surface/event_string.cc
diff --git a/src/core/lib/surface/event_string.h b/src/core/lib/surface/event_string.h
index f00efca7f3..127609c404 100644
--- a/src/core/lib/surface/event_string.h
+++ b/src/core/lib/surface/event_string.h
@@ -21,7 +21,15 @@
#include <grpc/grpc.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Returns a string describing an event. Must be later freed with gpr_free() */
char *grpc_event_string(grpc_event *ev);
-#endif /* GRPC_CORE_LIB_SURFACE_EVENT_STRING_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SURFACE_EVENT_STRING_H */ \ No newline at end of file
diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.cc
index b089da2c54..b089da2c54 100644
--- a/src/core/lib/surface/init.c
+++ b/src/core/lib/surface/init.cc
diff --git a/src/core/lib/surface/init.h b/src/core/lib/surface/init.h
index 9353208332..b2f48576e5 100644
--- a/src/core/lib/surface/init.h
+++ b/src/core/lib/surface/init.h
@@ -19,9 +19,17 @@
#ifndef GRPC_CORE_LIB_SURFACE_INIT_H
#define GRPC_CORE_LIB_SURFACE_INIT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void grpc_register_security_filters(void);
void grpc_security_pre_init(void);
void grpc_security_init(void);
int grpc_is_initialized(void);
-#endif /* GRPC_CORE_LIB_SURFACE_INIT_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SURFACE_INIT_H */ \ No newline at end of file
diff --git a/src/core/lib/surface/init_secure.c b/src/core/lib/surface/init_secure.cc
index 2366c24910..8fbde3d1b4 100644
--- a/src/core/lib/surface/init_secure.c
+++ b/src/core/lib/surface/init_secure.cc
@@ -25,6 +25,7 @@
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/security/credentials/credentials.h"
+#include "src/core/lib/security/credentials/plugin/plugin_credentials.h"
#include "src/core/lib/security/transport/auth_filters.h"
#include "src/core/lib/security/transport/secure_endpoint.h"
#include "src/core/lib/security/transport/security_connector.h"
@@ -84,4 +85,7 @@ void grpc_register_security_filters(void) {
maybe_prepend_server_auth_filter, NULL);
}
-void grpc_security_init() { grpc_security_register_handshaker_factories(); }
+void grpc_security_init() {
+ grpc_security_register_handshaker_factories();
+ grpc_register_tracer(&grpc_plugin_credentials_trace);
+}
diff --git a/src/core/lib/surface/init_unsecure.c b/src/core/lib/surface/init_unsecure.cc
index b852cab985..b852cab985 100644
--- a/src/core/lib/surface/init_unsecure.c
+++ b/src/core/lib/surface/init_unsecure.cc
diff --git a/src/core/lib/surface/lame_client.cc b/src/core/lib/surface/lame_client.cc
index 6286f9159d..88e26cbeb7 100644
--- a/src/core/lib/surface/lame_client.cc
+++ b/src/core/lib/surface/lame_client.cc
@@ -74,7 +74,7 @@ static void fill_metadata(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
mdb->list.head = &calld->status;
mdb->list.tail = &calld->details;
mdb->list.count = 2;
- mdb->deadline = gpr_inf_future(GPR_CLOCK_REALTIME);
+ mdb->deadline = GRPC_MILLIS_INF_FUTURE;
}
static void lame_start_transport_stream_op_batch(
diff --git a/src/core/lib/surface/lame_client.h b/src/core/lib/surface/lame_client.h
index 3ce353f101..2f6f9cd046 100644
--- a/src/core/lib/surface/lame_client.h
+++ b/src/core/lib/surface/lame_client.h
@@ -21,6 +21,14 @@
#include "src/core/lib/channel/channel_stack.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern const grpc_channel_filter grpc_lame_filter;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SURFACE_LAME_CLIENT_H */
diff --git a/src/core/lib/surface/metadata_array.c b/src/core/lib/surface/metadata_array.cc
index 0afb8b4b87..0afb8b4b87 100644
--- a/src/core/lib/surface/metadata_array.c
+++ b/src/core/lib/surface/metadata_array.cc
diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.cc
index 1d0fd472d0..dd09cb91de 100644
--- a/src/core/lib/surface/server.c
+++ b/src/core/lib/surface/server.cc
@@ -137,7 +137,7 @@ struct call_data {
bool host_set;
grpc_slice path;
grpc_slice host;
- gpr_timespec deadline;
+ grpc_millis deadline;
grpc_completion_queue *cq_new;
@@ -492,11 +492,13 @@ static void publish_call(grpc_exec_ctx *exec_ctx, grpc_server *server,
GPR_ASSERT(calld->path_set);
rc->data.batch.details->host = grpc_slice_ref_internal(calld->host);
rc->data.batch.details->method = grpc_slice_ref_internal(calld->path);
- rc->data.batch.details->deadline = calld->deadline;
+ rc->data.batch.details->deadline =
+ grpc_millis_to_timespec(calld->deadline, GPR_CLOCK_MONOTONIC);
rc->data.batch.details->flags = calld->recv_initial_metadata_flags;
break;
case REGISTERED_CALL:
- *rc->data.registered.deadline = calld->deadline;
+ *rc->data.registered.deadline =
+ grpc_millis_to_timespec(calld->deadline, GPR_CLOCK_MONOTONIC);
if (rc->data.registered.optional_payload) {
*rc->data.registered.optional_payload = calld->payload;
calld->payload = NULL;
@@ -739,7 +741,7 @@ static void server_on_recv_initial_metadata(grpc_exec_ctx *exec_ctx, void *ptr,
grpc_error *error) {
grpc_call_element *elem = (grpc_call_element *)ptr;
call_data *calld = (call_data *)elem->call_data;
- gpr_timespec op_deadline;
+ grpc_millis op_deadline;
if (error == GRPC_ERROR_NONE) {
GPR_ASSERT(calld->recv_initial_metadata->idx.named.path != NULL);
@@ -759,7 +761,7 @@ static void server_on_recv_initial_metadata(grpc_exec_ctx *exec_ctx, void *ptr,
GRPC_ERROR_REF(error);
}
op_deadline = calld->recv_initial_metadata->deadline;
- if (0 != gpr_time_cmp(op_deadline, gpr_inf_future(op_deadline.clock_type))) {
+ if (op_deadline != GRPC_MILLIS_INF_FUTURE) {
calld->deadline = op_deadline;
}
if (calld->host_set && calld->path_set) {
@@ -833,7 +835,7 @@ static void accept_stream(grpc_exec_ctx *exec_ctx, void *cd,
memset(&args, 0, sizeof(args));
args.channel = chand->channel;
args.server_transport_data = transport_server_data;
- args.send_deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
+ args.send_deadline = GRPC_MILLIS_INF_FUTURE;
grpc_call *call;
grpc_error *error = grpc_call_create(exec_ctx, &args, &call);
grpc_call_element *elem =
@@ -881,7 +883,7 @@ static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
call_data *calld = (call_data *)elem->call_data;
channel_data *chand = (channel_data *)elem->channel_data;
memset(calld, 0, sizeof(call_data));
- calld->deadline = gpr_inf_future(GPR_CLOCK_REALTIME);
+ calld->deadline = GRPC_MILLIS_INF_FUTURE;
calld->call = grpc_call_from_top_element(elem);
gpr_mu_init(&calld->mu_state);
diff --git a/src/core/lib/surface/server.h b/src/core/lib/surface/server.h
index dd5639d97a..1114715833 100644
--- a/src/core/lib/surface/server.h
+++ b/src/core/lib/surface/server.h
@@ -24,6 +24,10 @@
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/transport/transport.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern const grpc_channel_filter grpc_server_top_filter;
/** Lightweight tracing of server channel state */
@@ -54,4 +58,8 @@ int grpc_server_has_open_connections(grpc_server *server);
void grpc_server_get_pollsets(grpc_server *server, grpc_pollset ***pollsets,
size_t *pollset_count);
-#endif /* GRPC_CORE_LIB_SURFACE_SERVER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SURFACE_SERVER_H */ \ No newline at end of file
diff --git a/src/core/lib/surface/validate_metadata.c b/src/core/lib/surface/validate_metadata.cc
index 61209ae48d..81d07fae44 100644
--- a/src/core/lib/surface/validate_metadata.c
+++ b/src/core/lib/surface/validate_metadata.cc
@@ -26,6 +26,7 @@
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_string_helpers.h"
+#include "src/core/lib/surface/validate_metadata.h"
static grpc_error *conforms_to(grpc_slice slice, const uint8_t *legal_bits,
const char *err_desc) {
diff --git a/src/core/lib/surface/validate_metadata.h b/src/core/lib/surface/validate_metadata.h
index de869d89b4..aa02419d9f 100644
--- a/src/core/lib/surface/validate_metadata.h
+++ b/src/core/lib/surface/validate_metadata.h
@@ -22,7 +22,15 @@
#include <grpc/slice.h>
#include "src/core/lib/iomgr/error.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
grpc_error *grpc_validate_header_key_is_legal(grpc_slice slice);
grpc_error *grpc_validate_header_nonbin_value_is_legal(grpc_slice slice);
-#endif /* GRPC_CORE_LIB_SURFACE_VALIDATE_METADATA_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SURFACE_VALIDATE_METADATA_H */ \ No newline at end of file
diff --git a/src/core/lib/surface/version.c b/src/core/lib/surface/version.cc
index fd6ea4daa9..6cb8e7e1a0 100644
--- a/src/core/lib/surface/version.c
+++ b/src/core/lib/surface/version.cc
@@ -23,4 +23,4 @@
const char *grpc_version_string(void) { return "5.0.0-dev"; }
-const char *grpc_g_stands_for(void) { return "gambit"; }
+const char *grpc_g_stands_for(void) { return "generous"; }
diff --git a/src/core/lib/transport/bdp_estimator.c b/src/core/lib/transport/bdp_estimator.cc
index 8b57693413..6ed427ce5c 100644
--- a/src/core/lib/transport/bdp_estimator.c
+++ b/src/core/lib/transport/bdp_estimator.cc
@@ -18,6 +18,7 @@
#include "src/core/lib/transport/bdp_estimator.h"
+#include <inttypes.h>
#include <stdlib.h>
#include <grpc/support/log.h>
@@ -29,8 +30,12 @@ grpc_tracer_flag grpc_bdp_estimator_trace =
void grpc_bdp_estimator_init(grpc_bdp_estimator *estimator, const char *name) {
estimator->estimate = 65536;
estimator->ping_state = GRPC_BDP_PING_UNSCHEDULED;
+ estimator->ping_start_time = gpr_time_0(GPR_CLOCK_MONOTONIC);
+ estimator->next_ping_scheduled = 0;
estimator->name = name;
estimator->bw_est = 0;
+ estimator->inter_ping_delay = 100.0; // start at 100ms
+ estimator->stable_estimate_count = 0;
}
bool grpc_bdp_estimator_get_estimate(const grpc_bdp_estimator *estimator,
@@ -50,10 +55,11 @@ void grpc_bdp_estimator_add_incoming_bytes(grpc_bdp_estimator *estimator,
estimator->accumulator += num_bytes;
}
-bool grpc_bdp_estimator_need_ping(const grpc_bdp_estimator *estimator) {
+bool grpc_bdp_estimator_need_ping(grpc_exec_ctx *exec_ctx,
+ const grpc_bdp_estimator *estimator) {
switch (estimator->ping_state) {
case GRPC_BDP_PING_UNSCHEDULED:
- return true;
+ return grpc_exec_ctx_now(exec_ctx) >= estimator->next_ping_scheduled;
case GRPC_BDP_PING_SCHEDULED:
return false;
case GRPC_BDP_PING_STARTED:
@@ -83,11 +89,13 @@ void grpc_bdp_estimator_start_ping(grpc_bdp_estimator *estimator) {
estimator->ping_start_time = gpr_now(GPR_CLOCK_MONOTONIC);
}
-void grpc_bdp_estimator_complete_ping(grpc_bdp_estimator *estimator) {
- gpr_timespec dt_ts =
- gpr_time_sub(gpr_now(GPR_CLOCK_MONOTONIC), estimator->ping_start_time);
+void grpc_bdp_estimator_complete_ping(grpc_exec_ctx *exec_ctx,
+ grpc_bdp_estimator *estimator) {
+ gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
+ gpr_timespec dt_ts = gpr_time_sub(now, estimator->ping_start_time);
double dt = (double)dt_ts.tv_sec + 1e-9 * (double)dt_ts.tv_nsec;
double bw = dt > 0 ? ((double)estimator->accumulator / dt) : 0;
+ int start_inter_ping_delay = estimator->inter_ping_delay;
if (GRPC_TRACER_ON(grpc_bdp_estimator_trace)) {
gpr_log(GPR_DEBUG, "bdp[%s]:complete acc=%" PRId64 " est=%" PRId64
" dt=%lf bw=%lfMbs bw_est=%lfMbs",
@@ -104,7 +112,26 @@ void grpc_bdp_estimator_complete_ping(grpc_bdp_estimator *estimator) {
gpr_log(GPR_DEBUG, "bdp[%s]: estimate increased to %" PRId64,
estimator->name, estimator->estimate);
}
+ estimator->inter_ping_delay /= 2; // if the ping estimate changes,
+ // exponentially get faster at probing
+ } else if (estimator->inter_ping_delay < 10000) {
+ estimator->stable_estimate_count++;
+ if (estimator->stable_estimate_count >= 2) {
+ estimator->inter_ping_delay +=
+ 100 +
+ (int)(rand() * 100.0 / RAND_MAX); // if the ping estimate is steady,
+ // slowly ramp down the probe time
+ }
+ }
+ if (start_inter_ping_delay != estimator->inter_ping_delay) {
+ estimator->stable_estimate_count = 0;
+ if (GRPC_TRACER_ON(grpc_bdp_estimator_trace)) {
+ gpr_log(GPR_DEBUG, "bdp[%s]:update_inter_time to %dms", estimator->name,
+ estimator->inter_ping_delay);
+ }
}
estimator->ping_state = GRPC_BDP_PING_UNSCHEDULED;
estimator->accumulator = 0;
+ estimator->next_ping_scheduled =
+ grpc_exec_ctx_now(exec_ctx) + estimator->inter_ping_delay;
}
diff --git a/src/core/lib/transport/bdp_estimator.h b/src/core/lib/transport/bdp_estimator.h
index 1ef0dc99dd..480d5237b8 100644
--- a/src/core/lib/transport/bdp_estimator.h
+++ b/src/core/lib/transport/bdp_estimator.h
@@ -23,10 +23,15 @@
#include <stdbool.h>
#include <stdint.h>
#include "src/core/lib/debug/trace.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
#define GRPC_BDP_SAMPLES 16
#define GRPC_BDP_MIN_SAMPLES_FOR_ESTIMATE 3
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern grpc_tracer_flag grpc_bdp_estimator_trace;
typedef enum {
@@ -39,7 +44,12 @@ typedef struct grpc_bdp_estimator {
grpc_bdp_estimator_ping_state ping_state;
int64_t accumulator;
int64_t estimate;
+ // when was the current ping started?
gpr_timespec ping_start_time;
+ // when should the next ping start?
+ grpc_millis next_ping_scheduled;
+ int inter_ping_delay;
+ int stable_estimate_count;
double bw_est;
const char *name;
} grpc_bdp_estimator;
@@ -55,7 +65,8 @@ bool grpc_bdp_estimator_get_bw(const grpc_bdp_estimator *estimator, double *bw);
void grpc_bdp_estimator_add_incoming_bytes(grpc_bdp_estimator *estimator,
int64_t num_bytes);
// Returns true if the user should schedule a ping
-bool grpc_bdp_estimator_need_ping(const grpc_bdp_estimator *estimator);
+bool grpc_bdp_estimator_need_ping(grpc_exec_ctx *exec_ctx,
+ const grpc_bdp_estimator *estimator);
// Schedule a ping: call in response to receiving a true from
// grpc_bdp_estimator_add_incoming_bytes once a ping has been scheduled by a
// transport (but not necessarily started)
@@ -64,6 +75,11 @@ void grpc_bdp_estimator_schedule_ping(grpc_bdp_estimator *estimator);
// the ping is on the wire
void grpc_bdp_estimator_start_ping(grpc_bdp_estimator *estimator);
// Completes a previously started ping
-void grpc_bdp_estimator_complete_ping(grpc_bdp_estimator *estimator);
+void grpc_bdp_estimator_complete_ping(grpc_exec_ctx *exec_ctx,
+ grpc_bdp_estimator *estimator);
+
+#ifdef __cplusplus
+}
+#endif
-#endif /* GRPC_CORE_LIB_TRANSPORT_BDP_ESTIMATOR_H */
+#endif /* GRPC_CORE_LIB_TRANSPORT_BDP_ESTIMATOR_H */ \ No newline at end of file
diff --git a/src/core/lib/transport/byte_stream.c b/src/core/lib/transport/byte_stream.cc
index 08f61629a9..08f61629a9 100644
--- a/src/core/lib/transport/byte_stream.c
+++ b/src/core/lib/transport/byte_stream.cc
diff --git a/src/core/lib/transport/byte_stream.h b/src/core/lib/transport/byte_stream.h
index be2a35213e..d3e04df5c0 100644
--- a/src/core/lib/transport/byte_stream.h
+++ b/src/core/lib/transport/byte_stream.h
@@ -28,6 +28,10 @@
/** Mask of all valid internal flags. */
#define GRPC_WRITE_INTERNAL_USED_MASK (GRPC_WRITE_INTERNAL_COMPRESS)
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_byte_stream grpc_byte_stream;
typedef struct {
@@ -135,4 +139,8 @@ void grpc_caching_byte_stream_init(grpc_caching_byte_stream *stream,
// Resets the byte stream to the start of the underlying stream.
void grpc_caching_byte_stream_reset(grpc_caching_byte_stream *stream);
-#endif /* GRPC_CORE_LIB_TRANSPORT_BYTE_STREAM_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_TRANSPORT_BYTE_STREAM_H */ \ No newline at end of file
diff --git a/src/core/lib/transport/connectivity_state.c b/src/core/lib/transport/connectivity_state.cc
index f328a6cdbb..f328a6cdbb 100644
--- a/src/core/lib/transport/connectivity_state.c
+++ b/src/core/lib/transport/connectivity_state.cc
diff --git a/src/core/lib/transport/connectivity_state.h b/src/core/lib/transport/connectivity_state.h
index 2fece6cc21..1796a540a7 100644
--- a/src/core/lib/transport/connectivity_state.h
+++ b/src/core/lib/transport/connectivity_state.h
@@ -23,6 +23,10 @@
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/iomgr/exec_ctx.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_connectivity_state_watcher {
/** we keep watchers in a linked list */
struct grpc_connectivity_state_watcher *next;
@@ -84,4 +88,8 @@ bool grpc_connectivity_state_notify_on_state_change(
grpc_exec_ctx *exec_ctx, grpc_connectivity_state_tracker *tracker,
grpc_connectivity_state *current, grpc_closure *notify);
-#endif /* GRPC_CORE_LIB_TRANSPORT_CONNECTIVITY_STATE_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_TRANSPORT_CONNECTIVITY_STATE_H */ \ No newline at end of file
diff --git a/src/core/lib/transport/error_utils.c b/src/core/lib/transport/error_utils.cc
index 5e3920b627..2e3b61b7ab 100644
--- a/src/core/lib/transport/error_utils.c
+++ b/src/core/lib/transport/error_utils.cc
@@ -39,8 +39,9 @@ static grpc_error *recursively_find_error_with_field(grpc_error *error,
return NULL;
}
-void grpc_error_get_status(grpc_error *error, gpr_timespec deadline,
- grpc_status_code *code, grpc_slice *slice,
+void grpc_error_get_status(grpc_exec_ctx *exec_ctx, grpc_error *error,
+ grpc_millis deadline, grpc_status_code *code,
+ grpc_slice *slice,
grpc_http2_error_code *http_error) {
// Start with the parent error and recurse through the tree of children
// until we find the first one that has a status code.
@@ -63,8 +64,8 @@ void grpc_error_get_status(grpc_error *error, gpr_timespec deadline,
status = (grpc_status_code)integer;
} else if (grpc_error_get_int(found_error, GRPC_ERROR_INT_HTTP2_ERROR,
&integer)) {
- status = grpc_http2_error_to_grpc_status((grpc_http2_error_code)integer,
- deadline);
+ status = grpc_http2_error_to_grpc_status(
+ exec_ctx, (grpc_http2_error_code)integer, deadline);
}
if (code != NULL) *code = status;
diff --git a/src/core/lib/transport/error_utils.h b/src/core/lib/transport/error_utils.h
index e530884215..2c97f9f0bc 100644
--- a/src/core/lib/transport/error_utils.h
+++ b/src/core/lib/transport/error_utils.h
@@ -20,16 +20,22 @@
#define GRPC_CORE_LIB_TRANSPORT_ERROR_UTILS_H
#include "src/core/lib/iomgr/error.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/transport/http2_errors.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/// A utility function to get the status code and message to be returned
/// to the application. If not set in the top-level message, looks
/// through child errors until it finds the first one with these attributes.
/// All attributes are pulled from the same child error. If any of the
/// attributes (code, msg, http_status) are unneeded, they can be passed as
/// NULL.
-void grpc_error_get_status(grpc_error *error, gpr_timespec deadline,
- grpc_status_code *code, grpc_slice *slice,
+void grpc_error_get_status(grpc_exec_ctx *exec_ctx, grpc_error *error,
+ grpc_millis deadline, grpc_status_code *code,
+ grpc_slice *slice,
grpc_http2_error_code *http_status);
/// A utility function to check whether there is a clear status code that
@@ -38,4 +44,8 @@ void grpc_error_get_status(grpc_error *error, gpr_timespec deadline,
/// GRPC_ERROR_CANCELLED
bool grpc_error_has_clear_grpc_status(grpc_error *error);
-#endif /* GRPC_CORE_LIB_TRANSPORT_ERROR_UTILS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_TRANSPORT_ERROR_UTILS_H */ \ No newline at end of file
diff --git a/src/core/lib/transport/metadata.c b/src/core/lib/transport/metadata.cc
index 188b485625..5455b2481b 100644
--- a/src/core/lib/transport/metadata.c
+++ b/src/core/lib/transport/metadata.cc
@@ -19,6 +19,7 @@
#include "src/core/lib/transport/metadata.h"
#include <assert.h>
+#include <inttypes.h>
#include <stddef.h>
#include <string.h>
diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h
index 974469e436..9f82225dc3 100644
--- a/src/core/lib/transport/metadata.h
+++ b/src/core/lib/transport/metadata.h
@@ -102,8 +102,13 @@ struct grpc_mdelem {
((grpc_mdelem_data *)((md).payload & ~(uintptr_t)3))
#define GRPC_MDELEM_STORAGE(md) \
((grpc_mdelem_data_storage)((md).payload & (uintptr_t)3))
+#ifdef __cplusplus
+#define GRPC_MAKE_MDELEM(data, storage) \
+ (grpc_mdelem{((uintptr_t)(data)) | ((uintptr_t)storage)})
+#else
#define GRPC_MAKE_MDELEM(data, storage) \
((grpc_mdelem){((uintptr_t)(data)) | ((uintptr_t)storage)})
+#endif
#define GRPC_MDELEM_IS_INTERNED(md) \
((grpc_mdelem_data_storage)((md).payload & \
(uintptr_t)GRPC_MDELEM_STORAGE_INTERNED_BIT))
diff --git a/src/core/lib/transport/metadata_batch.c b/src/core/lib/transport/metadata_batch.cc
index 54388bdcda..2df9c9189c 100644
--- a/src/core/lib/transport/metadata_batch.c
+++ b/src/core/lib/transport/metadata_batch.cc
@@ -74,7 +74,7 @@ void grpc_metadata_batch_assert_ok(grpc_metadata_batch *batch) {
void grpc_metadata_batch_init(grpc_metadata_batch *batch) {
memset(batch, 0, sizeof(*batch));
- batch->deadline = gpr_inf_future(GPR_CLOCK_REALTIME);
+ batch->deadline = GRPC_MILLIS_INF_FUTURE;
}
void grpc_metadata_batch_destroy(grpc_exec_ctx *exec_ctx,
@@ -270,9 +270,7 @@ void grpc_metadata_batch_clear(grpc_exec_ctx *exec_ctx,
}
bool grpc_metadata_batch_is_empty(grpc_metadata_batch *batch) {
- return batch->list.head == NULL &&
- gpr_time_cmp(gpr_inf_future(batch->deadline.clock_type),
- batch->deadline) == 0;
+ return batch->list.head == NULL && batch->deadline == GRPC_MILLIS_INF_FUTURE;
}
size_t grpc_metadata_batch_size(grpc_metadata_batch *batch) {
diff --git a/src/core/lib/transport/metadata_batch.h b/src/core/lib/transport/metadata_batch.h
index 57d298c75c..a2b4b92385 100644
--- a/src/core/lib/transport/metadata_batch.h
+++ b/src/core/lib/transport/metadata_batch.h
@@ -51,9 +51,9 @@ typedef struct grpc_metadata_batch {
grpc_mdelem_list list;
grpc_metadata_batch_callouts idx;
/** Used to calculate grpc-timeout at the point of sending,
- or gpr_inf_future if this batch does not need to send a
+ or GRPC_MILLIS_INF_FUTURE if this batch does not need to send a
grpc-timeout */
- gpr_timespec deadline;
+ grpc_millis deadline;
} grpc_metadata_batch;
void grpc_metadata_batch_init(grpc_metadata_batch *batch);
@@ -125,10 +125,11 @@ typedef struct {
} grpc_filtered_mdelem;
#define GRPC_FILTERED_ERROR(error) \
- ((grpc_filtered_mdelem){(error), GRPC_MDNULL})
-#define GRPC_FILTERED_MDELEM(md) ((grpc_filtered_mdelem){GRPC_ERROR_NONE, (md)})
+ { (error), GRPC_MDNULL }
+#define GRPC_FILTERED_MDELEM(md) \
+ { GRPC_ERROR_NONE, (md) }
#define GRPC_FILTERED_REMOVE() \
- ((grpc_filtered_mdelem){GRPC_ERROR_NONE, GRPC_MDNULL})
+ { GRPC_ERROR_NONE, GRPC_MDNULL }
typedef grpc_filtered_mdelem (*grpc_metadata_batch_filter_func)(
grpc_exec_ctx *exec_ctx, void *user_data, grpc_mdelem elem);
diff --git a/src/core/lib/transport/pid_controller.c b/src/core/lib/transport/pid_controller.cc
index 4b304f17b2..4b304f17b2 100644
--- a/src/core/lib/transport/pid_controller.c
+++ b/src/core/lib/transport/pid_controller.cc
diff --git a/src/core/lib/transport/pid_controller.h b/src/core/lib/transport/pid_controller.h
index 9352b2643f..17feabfd39 100644
--- a/src/core/lib/transport/pid_controller.h
+++ b/src/core/lib/transport/pid_controller.h
@@ -19,6 +19,10 @@
#ifndef GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H
#define GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* \file Simple PID controller.
Implements a proportional-integral-derivative controller.
Used when we want to iteratively control a variable to converge some other
@@ -59,4 +63,8 @@ double grpc_pid_controller_update(grpc_pid_controller *pid_controller,
/** Returns the last control value calculated */
double grpc_pid_controller_last(grpc_pid_controller *pid_controller);
-#endif /* GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H */ \ No newline at end of file
diff --git a/src/core/lib/transport/service_config.c b/src/core/lib/transport/service_config.cc
index 070a13a2b4..070a13a2b4 100644
--- a/src/core/lib/transport/service_config.c
+++ b/src/core/lib/transport/service_config.cc
diff --git a/src/core/lib/transport/service_config.h b/src/core/lib/transport/service_config.h
index 84110abc36..c485f52472 100644
--- a/src/core/lib/transport/service_config.h
+++ b/src/core/lib/transport/service_config.h
@@ -22,6 +22,10 @@
#include "src/core/lib/json/json.h"
#include "src/core/lib/slice/slice_hash_table.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_service_config grpc_service_config;
grpc_service_config* grpc_service_config_create(const char* json_string);
@@ -59,4 +63,8 @@ void* grpc_method_config_table_get(grpc_exec_ctx* exec_ctx,
const grpc_slice_hash_table* table,
grpc_slice path);
-#endif /* GRPC_CORE_LIB_TRANSPORT_SERVICE_CONFIG_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_TRANSPORT_SERVICE_CONFIG_H */ \ No newline at end of file
diff --git a/src/core/lib/transport/static_metadata.c b/src/core/lib/transport/static_metadata.cc
index 8edb3bbbd0..8edb3bbbd0 100644
--- a/src/core/lib/transport/static_metadata.c
+++ b/src/core/lib/transport/static_metadata.cc
diff --git a/src/core/lib/transport/static_metadata.h b/src/core/lib/transport/static_metadata.h
index 9c5504e299..6b535acebd 100644
--- a/src/core/lib/transport/static_metadata.h
+++ b/src/core/lib/transport/static_metadata.h
@@ -27,6 +27,10 @@
#ifndef GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H
#define GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "src/core/lib/transport/metadata.h"
#define GRPC_STATIC_MDSTR_COUNT 101
@@ -586,4 +590,7 @@ extern const uint8_t grpc_static_accept_stream_encoding_metadata[4];
(GRPC_MAKE_MDELEM(&grpc_static_mdelem_table \
[grpc_static_accept_stream_encoding_metadata[(algs)]], \
GRPC_MDELEM_STORAGE_STATIC))
+#ifdef __cplusplus
+}
+#endif
#endif /* GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H */
diff --git a/src/core/lib/transport/status_conversion.c b/src/core/lib/transport/status_conversion.cc
index a40d333284..891c4427d7 100644
--- a/src/core/lib/transport/status_conversion.c
+++ b/src/core/lib/transport/status_conversion.cc
@@ -37,8 +37,9 @@ grpc_http2_error_code grpc_status_to_http2_error(grpc_status_code status) {
}
}
-grpc_status_code grpc_http2_error_to_grpc_status(grpc_http2_error_code error,
- gpr_timespec deadline) {
+grpc_status_code grpc_http2_error_to_grpc_status(grpc_exec_ctx *exec_ctx,
+ grpc_http2_error_code error,
+ grpc_millis deadline) {
switch (error) {
case GRPC_HTTP2_NO_ERROR:
/* should never be received */
@@ -46,7 +47,7 @@ grpc_status_code grpc_http2_error_to_grpc_status(grpc_http2_error_code error,
case GRPC_HTTP2_CANCEL:
/* http2 cancel translates to STATUS_CANCELLED iff deadline hasn't been
* exceeded */
- return gpr_time_cmp(gpr_now(deadline.clock_type), deadline) >= 0
+ return grpc_exec_ctx_now(exec_ctx) > deadline
? GRPC_STATUS_DEADLINE_EXCEEDED
: GRPC_STATUS_CANCELLED;
case GRPC_HTTP2_ENHANCE_YOUR_CALM:
diff --git a/src/core/lib/transport/status_conversion.h b/src/core/lib/transport/status_conversion.h
index e93f3dfd9b..fd58a82cb7 100644
--- a/src/core/lib/transport/status_conversion.h
+++ b/src/core/lib/transport/status_conversion.h
@@ -20,15 +20,25 @@
#define GRPC_CORE_LIB_TRANSPORT_STATUS_CONVERSION_H
#include <grpc/grpc.h>
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/transport/http2_errors.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Conversion of grpc status codes to http2 error codes (for RST_STREAM) */
grpc_http2_error_code grpc_status_to_http2_error(grpc_status_code status);
-grpc_status_code grpc_http2_error_to_grpc_status(grpc_http2_error_code error,
- gpr_timespec deadline);
+grpc_status_code grpc_http2_error_to_grpc_status(grpc_exec_ctx *exec_ctx,
+ grpc_http2_error_code error,
+ grpc_millis deadline);
/* Conversion of HTTP status codes (:status) to grpc status codes */
grpc_status_code grpc_http2_status_to_grpc_status(int status);
int grpc_status_to_http2_status(grpc_status_code status);
-#endif /* GRPC_CORE_LIB_TRANSPORT_STATUS_CONVERSION_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_TRANSPORT_STATUS_CONVERSION_H */ \ No newline at end of file
diff --git a/src/core/lib/transport/timeout_encoding.c b/src/core/lib/transport/timeout_encoding.cc
index 02f179d6a3..23a9ef308f 100644
--- a/src/core/lib/transport/timeout_encoding.c
+++ b/src/core/lib/transport/timeout_encoding.cc
@@ -59,60 +59,27 @@ static void enc_seconds(char *buffer, int64_t sec) {
}
}
-static void enc_nanos(char *buffer, int64_t x) {
+static void enc_millis(char *buffer, int64_t x) {
x = round_up_to_three_sig_figs(x);
- if (x < 100000) {
- if (x % 1000 == 0) {
- enc_ext(buffer, x / 1000, 'u');
- } else {
- enc_ext(buffer, x, 'n');
- }
- } else if (x < 100000000) {
- if (x % 1000000 == 0) {
- enc_ext(buffer, x / 1000000, 'm');
- } else {
- enc_ext(buffer, x / 1000, 'u');
- }
- } else if (x < 1000000000) {
- enc_ext(buffer, x / 1000000, 'm');
+ if (x < GPR_MS_PER_SEC) {
+ enc_ext(buffer, x, 'm');
} else {
- /* note that this is only ever called with times of less than one second,
- so if we reach here the time must have been rounded up to a whole second
- (and no more) */
- memcpy(buffer, "1S", 3);
- }
-}
-
-static void enc_micros(char *buffer, int64_t x) {
- x = round_up_to_three_sig_figs(x);
- if (x < 100000) {
- if (x % 1000 == 0) {
- enc_ext(buffer, x / 1000, 'm');
+ if (x % GPR_MS_PER_SEC == 0) {
+ enc_seconds(buffer, x / GPR_MS_PER_SEC);
} else {
- enc_ext(buffer, x, 'u');
+ enc_ext(buffer, x, 'm');
}
- } else if (x < 100000000) {
- if (x % 1000000 == 0) {
- enc_ext(buffer, x / 1000000, 'S');
- } else {
- enc_ext(buffer, x / 1000, 'm');
- }
- } else {
- enc_ext(buffer, x / 1000000, 'S');
}
}
-void grpc_http2_encode_timeout(gpr_timespec timeout, char *buffer) {
- if (timeout.tv_sec < 0) {
+void grpc_http2_encode_timeout(grpc_millis timeout, char *buffer) {
+ if (timeout <= 0) {
enc_tiny(buffer);
- } else if (timeout.tv_sec == 0) {
- enc_nanos(buffer, timeout.tv_nsec);
- } else if (timeout.tv_sec < 1000 && timeout.tv_nsec != 0) {
- enc_micros(buffer,
- (int64_t)(timeout.tv_sec * 1000000) +
- (timeout.tv_nsec / 1000 + (timeout.tv_nsec % 1000 != 0)));
+ } else if (timeout < 1000 * GPR_MS_PER_SEC) {
+ enc_millis(buffer, timeout);
} else {
- enc_seconds(buffer, timeout.tv_sec + (timeout.tv_nsec != 0));
+ enc_seconds(buffer,
+ timeout / GPR_MS_PER_SEC + (timeout % GPR_MS_PER_SEC != 0));
}
}
@@ -121,8 +88,8 @@ static int is_all_whitespace(const char *p, const char *end) {
return p == end;
}
-int grpc_http2_decode_timeout(grpc_slice text, gpr_timespec *timeout) {
- int32_t x = 0;
+int grpc_http2_decode_timeout(grpc_slice text, grpc_millis *timeout) {
+ grpc_millis x = 0;
const uint8_t *p = GRPC_SLICE_START_PTR(text);
const uint8_t *end = GRPC_SLICE_END_PTR(text);
int have_digit = 0;
@@ -136,7 +103,7 @@ int grpc_http2_decode_timeout(grpc_slice text, gpr_timespec *timeout) {
/* spec allows max. 8 digits, but we allow values up to 1,000,000,000 */
if (x >= (100 * 1000 * 1000)) {
if (x != (100 * 1000 * 1000) || digit != 0) {
- *timeout = gpr_inf_future(GPR_TIMESPAN);
+ *timeout = GRPC_MILLIS_INF_FUTURE;
return 1;
}
}
@@ -150,22 +117,22 @@ int grpc_http2_decode_timeout(grpc_slice text, gpr_timespec *timeout) {
/* decode unit specifier */
switch (*p) {
case 'n':
- *timeout = gpr_time_from_nanos(x, GPR_TIMESPAN);
+ *timeout = x / GPR_NS_PER_MS + (x % GPR_NS_PER_MS != 0);
break;
case 'u':
- *timeout = gpr_time_from_micros(x, GPR_TIMESPAN);
+ *timeout = x / GPR_US_PER_MS + (x % GPR_US_PER_MS != 0);
break;
case 'm':
- *timeout = gpr_time_from_millis(x, GPR_TIMESPAN);
+ *timeout = x;
break;
case 'S':
- *timeout = gpr_time_from_seconds(x, GPR_TIMESPAN);
+ *timeout = x * GPR_MS_PER_SEC;
break;
case 'M':
- *timeout = gpr_time_from_minutes(x, GPR_TIMESPAN);
+ *timeout = x * 60 * GPR_MS_PER_SEC;
break;
case 'H':
- *timeout = gpr_time_from_hours(x, GPR_TIMESPAN);
+ *timeout = x * 60 * 60 * GPR_MS_PER_SEC;
break;
default:
return 0;
diff --git a/src/core/lib/transport/timeout_encoding.h b/src/core/lib/transport/timeout_encoding.h
index 7ff35c4083..25cb663959 100644
--- a/src/core/lib/transport/timeout_encoding.h
+++ b/src/core/lib/transport/timeout_encoding.h
@@ -22,13 +22,22 @@
#include <grpc/slice.h>
#include <grpc/support/time.h>
+#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/support/string.h"
#define GRPC_HTTP2_TIMEOUT_ENCODE_MIN_BUFSIZE (GPR_LTOA_MIN_BUFSIZE + 1)
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Encode/decode timeouts to the GRPC over HTTP/2 format;
encoding may round up arbitrarily */
-void grpc_http2_encode_timeout(gpr_timespec timeout, char *buffer);
-int grpc_http2_decode_timeout(grpc_slice text, gpr_timespec *timeout);
+void grpc_http2_encode_timeout(grpc_millis timeout, char *buffer);
+int grpc_http2_decode_timeout(grpc_slice text, grpc_millis *timeout);
+
+#ifdef __cplusplus
+}
+#endif
-#endif /* GRPC_CORE_LIB_TRANSPORT_TIMEOUT_ENCODING_H */
+#endif /* GRPC_CORE_LIB_TRANSPORT_TIMEOUT_ENCODING_H */ \ No newline at end of file
diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.cc
index 682a820b48..ab4f938e7b 100644
--- a/src/core/lib/transport/transport.c
+++ b/src/core/lib/transport/transport.cc
@@ -110,10 +110,11 @@ grpc_slice grpc_slice_from_stream_owned_buffer(grpc_stream_refcount *refcount,
}
static const grpc_slice_refcount_vtable stream_ref_slice_vtable = {
- .ref = slice_stream_ref,
- .unref = slice_stream_unref,
- .eq = grpc_slice_default_eq_impl,
- .hash = grpc_slice_default_hash_impl};
+ slice_stream_ref, /* ref */
+ slice_stream_unref, /* unref */
+ grpc_slice_default_eq_impl, /* eq */
+ grpc_slice_default_hash_impl /* hash */
+};
#ifndef NDEBUG
void grpc_stream_ref_init(grpc_stream_refcount *refcount, int initial_refs,
diff --git a/src/core/lib/transport/transport_impl.h b/src/core/lib/transport/transport_impl.h
index bbae69c223..41d34d3954 100644
--- a/src/core/lib/transport/transport_impl.h
+++ b/src/core/lib/transport/transport_impl.h
@@ -21,6 +21,10 @@
#include "src/core/lib/transport/transport.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct grpc_transport_vtable {
/* Memory required for a single stream element - this is allocated by upper
layers and initialized by the transport */
@@ -69,4 +73,8 @@ struct grpc_transport {
const grpc_transport_vtable *vtable;
};
-#endif /* GRPC_CORE_LIB_TRANSPORT_TRANSPORT_IMPL_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_TRANSPORT_TRANSPORT_IMPL_H */ \ No newline at end of file
diff --git a/src/core/lib/transport/transport_op_string.c b/src/core/lib/transport/transport_op_string.cc
index 858664715c..cc11b0cc49 100644
--- a/src/core/lib/transport/transport_op_string.c
+++ b/src/core/lib/transport/transport_op_string.cc
@@ -16,8 +16,11 @@
*
*/
+#include <grpc/support/port_platform.h>
+
#include "src/core/lib/channel/channel_stack.h"
+#include <inttypes.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
@@ -48,10 +51,9 @@ static void put_metadata_list(gpr_strvec *b, grpc_metadata_batch md) {
if (m != md.list.head) gpr_strvec_add(b, gpr_strdup(", "));
put_metadata(b, m->md);
}
- if (gpr_time_cmp(md.deadline, gpr_inf_future(md.deadline.clock_type)) != 0) {
+ if (md.deadline != GRPC_MILLIS_INF_FUTURE) {
char *tmp;
- gpr_asprintf(&tmp, " deadline=%" PRId64 ".%09d", md.deadline.tv_sec,
- md.deadline.tv_nsec);
+ gpr_asprintf(&tmp, " deadline=%" PRIdPTR, md.deadline);
gpr_strvec_add(b, tmp);
}
}
diff --git a/src/core/plugin_registry/grpc_cronet_plugin_registry.c b/src/core/plugin_registry/grpc_cronet_plugin_registry.cc
index 1c09f54ad9..e0422f6750 100644
--- a/src/core/plugin_registry/grpc_cronet_plugin_registry.c
+++ b/src/core/plugin_registry/grpc_cronet_plugin_registry.cc
@@ -18,18 +18,18 @@
#include <grpc/grpc.h>
-extern void grpc_http_filters_init(void);
-extern void grpc_http_filters_shutdown(void);
-extern void grpc_chttp2_plugin_init(void);
-extern void grpc_chttp2_plugin_shutdown(void);
-extern void grpc_deadline_filter_init(void);
-extern void grpc_deadline_filter_shutdown(void);
-extern void grpc_client_channel_init(void);
-extern void grpc_client_channel_shutdown(void);
-extern void grpc_tsi_gts_init(void);
-extern void grpc_tsi_gts_shutdown(void);
-extern void grpc_server_load_reporting_plugin_init(void);
-extern void grpc_server_load_reporting_plugin_shutdown(void);
+extern "C" void grpc_http_filters_init(void);
+extern "C" void grpc_http_filters_shutdown(void);
+extern "C" void grpc_chttp2_plugin_init(void);
+extern "C" void grpc_chttp2_plugin_shutdown(void);
+extern "C" void grpc_deadline_filter_init(void);
+extern "C" void grpc_deadline_filter_shutdown(void);
+extern "C" void grpc_client_channel_init(void);
+extern "C" void grpc_client_channel_shutdown(void);
+extern "C" void grpc_tsi_gts_init(void);
+extern "C" void grpc_tsi_gts_shutdown(void);
+extern "C" void grpc_server_load_reporting_plugin_init(void);
+extern "C" void grpc_server_load_reporting_plugin_shutdown(void);
void grpc_register_built_in_plugins(void) {
grpc_register_plugin(grpc_http_filters_init,
diff --git a/src/core/plugin_registry/grpc_plugin_registry.c b/src/core/plugin_registry/grpc_plugin_registry.cc
index 9cacf3d306..2d332e2b91 100644
--- a/src/core/plugin_registry/grpc_plugin_registry.c
+++ b/src/core/plugin_registry/grpc_plugin_registry.cc
@@ -18,42 +18,42 @@
#include <grpc/grpc.h>
-extern void grpc_http_filters_init(void);
-extern void grpc_http_filters_shutdown(void);
-extern void grpc_chttp2_plugin_init(void);
-extern void grpc_chttp2_plugin_shutdown(void);
-extern void grpc_tsi_gts_init(void);
-extern void grpc_tsi_gts_shutdown(void);
-extern void grpc_deadline_filter_init(void);
-extern void grpc_deadline_filter_shutdown(void);
-extern void grpc_client_channel_init(void);
-extern void grpc_client_channel_shutdown(void);
-extern void grpc_inproc_plugin_init(void);
-extern void grpc_inproc_plugin_shutdown(void);
-extern void grpc_resolver_fake_init(void);
-extern void grpc_resolver_fake_shutdown(void);
-extern void grpc_lb_policy_grpclb_init(void);
-extern void grpc_lb_policy_grpclb_shutdown(void);
-extern void grpc_lb_policy_pick_first_init(void);
-extern void grpc_lb_policy_pick_first_shutdown(void);
-extern void grpc_lb_policy_round_robin_init(void);
-extern void grpc_lb_policy_round_robin_shutdown(void);
-extern void grpc_resolver_dns_ares_init(void);
-extern void grpc_resolver_dns_ares_shutdown(void);
-extern void grpc_resolver_dns_native_init(void);
-extern void grpc_resolver_dns_native_shutdown(void);
-extern void grpc_resolver_sockaddr_init(void);
-extern void grpc_resolver_sockaddr_shutdown(void);
-extern void grpc_server_load_reporting_plugin_init(void);
-extern void grpc_server_load_reporting_plugin_shutdown(void);
-extern void census_grpc_plugin_init(void);
-extern void census_grpc_plugin_shutdown(void);
-extern void grpc_max_age_filter_init(void);
-extern void grpc_max_age_filter_shutdown(void);
-extern void grpc_message_size_filter_init(void);
-extern void grpc_message_size_filter_shutdown(void);
-extern void grpc_workaround_cronet_compression_filter_init(void);
-extern void grpc_workaround_cronet_compression_filter_shutdown(void);
+extern "C" void grpc_http_filters_init(void);
+extern "C" void grpc_http_filters_shutdown(void);
+extern "C" void grpc_chttp2_plugin_init(void);
+extern "C" void grpc_chttp2_plugin_shutdown(void);
+extern "C" void grpc_tsi_gts_init(void);
+extern "C" void grpc_tsi_gts_shutdown(void);
+extern "C" void grpc_deadline_filter_init(void);
+extern "C" void grpc_deadline_filter_shutdown(void);
+extern "C" void grpc_client_channel_init(void);
+extern "C" void grpc_client_channel_shutdown(void);
+extern "C" void grpc_inproc_plugin_init(void);
+extern "C" void grpc_inproc_plugin_shutdown(void);
+extern "C" void grpc_resolver_fake_init(void);
+extern "C" void grpc_resolver_fake_shutdown(void);
+extern "C" void grpc_lb_policy_grpclb_init(void);
+extern "C" void grpc_lb_policy_grpclb_shutdown(void);
+extern "C" void grpc_lb_policy_pick_first_init(void);
+extern "C" void grpc_lb_policy_pick_first_shutdown(void);
+extern "C" void grpc_lb_policy_round_robin_init(void);
+extern "C" void grpc_lb_policy_round_robin_shutdown(void);
+extern "C" void grpc_resolver_dns_ares_init(void);
+extern "C" void grpc_resolver_dns_ares_shutdown(void);
+extern "C" void grpc_resolver_dns_native_init(void);
+extern "C" void grpc_resolver_dns_native_shutdown(void);
+extern "C" void grpc_resolver_sockaddr_init(void);
+extern "C" void grpc_resolver_sockaddr_shutdown(void);
+extern "C" void grpc_server_load_reporting_plugin_init(void);
+extern "C" void grpc_server_load_reporting_plugin_shutdown(void);
+extern "C" void census_grpc_plugin_init(void);
+extern "C" void census_grpc_plugin_shutdown(void);
+extern "C" void grpc_max_age_filter_init(void);
+extern "C" void grpc_max_age_filter_shutdown(void);
+extern "C" void grpc_message_size_filter_init(void);
+extern "C" void grpc_message_size_filter_shutdown(void);
+extern "C" void grpc_workaround_cronet_compression_filter_init(void);
+extern "C" void grpc_workaround_cronet_compression_filter_shutdown(void);
void grpc_register_built_in_plugins(void) {
grpc_register_plugin(grpc_http_filters_init,
diff --git a/src/core/plugin_registry/grpc_unsecure_plugin_registry.c b/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc
index 7b90d796d5..78218582f0 100644
--- a/src/core/plugin_registry/grpc_unsecure_plugin_registry.c
+++ b/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc
@@ -18,40 +18,40 @@
#include <grpc/grpc.h>
-extern void grpc_http_filters_init(void);
-extern void grpc_http_filters_shutdown(void);
-extern void grpc_chttp2_plugin_init(void);
-extern void grpc_chttp2_plugin_shutdown(void);
-extern void grpc_deadline_filter_init(void);
-extern void grpc_deadline_filter_shutdown(void);
-extern void grpc_client_channel_init(void);
-extern void grpc_client_channel_shutdown(void);
-extern void grpc_inproc_plugin_init(void);
-extern void grpc_inproc_plugin_shutdown(void);
-extern void grpc_resolver_dns_ares_init(void);
-extern void grpc_resolver_dns_ares_shutdown(void);
-extern void grpc_resolver_dns_native_init(void);
-extern void grpc_resolver_dns_native_shutdown(void);
-extern void grpc_resolver_sockaddr_init(void);
-extern void grpc_resolver_sockaddr_shutdown(void);
-extern void grpc_resolver_fake_init(void);
-extern void grpc_resolver_fake_shutdown(void);
-extern void grpc_server_load_reporting_plugin_init(void);
-extern void grpc_server_load_reporting_plugin_shutdown(void);
-extern void grpc_lb_policy_grpclb_init(void);
-extern void grpc_lb_policy_grpclb_shutdown(void);
-extern void grpc_lb_policy_pick_first_init(void);
-extern void grpc_lb_policy_pick_first_shutdown(void);
-extern void grpc_lb_policy_round_robin_init(void);
-extern void grpc_lb_policy_round_robin_shutdown(void);
-extern void census_grpc_plugin_init(void);
-extern void census_grpc_plugin_shutdown(void);
-extern void grpc_max_age_filter_init(void);
-extern void grpc_max_age_filter_shutdown(void);
-extern void grpc_message_size_filter_init(void);
-extern void grpc_message_size_filter_shutdown(void);
-extern void grpc_workaround_cronet_compression_filter_init(void);
-extern void grpc_workaround_cronet_compression_filter_shutdown(void);
+extern "C" void grpc_http_filters_init(void);
+extern "C" void grpc_http_filters_shutdown(void);
+extern "C" void grpc_chttp2_plugin_init(void);
+extern "C" void grpc_chttp2_plugin_shutdown(void);
+extern "C" void grpc_deadline_filter_init(void);
+extern "C" void grpc_deadline_filter_shutdown(void);
+extern "C" void grpc_client_channel_init(void);
+extern "C" void grpc_client_channel_shutdown(void);
+extern "C" void grpc_inproc_plugin_init(void);
+extern "C" void grpc_inproc_plugin_shutdown(void);
+extern "C" void grpc_resolver_dns_ares_init(void);
+extern "C" void grpc_resolver_dns_ares_shutdown(void);
+extern "C" void grpc_resolver_dns_native_init(void);
+extern "C" void grpc_resolver_dns_native_shutdown(void);
+extern "C" void grpc_resolver_sockaddr_init(void);
+extern "C" void grpc_resolver_sockaddr_shutdown(void);
+extern "C" void grpc_resolver_fake_init(void);
+extern "C" void grpc_resolver_fake_shutdown(void);
+extern "C" void grpc_server_load_reporting_plugin_init(void);
+extern "C" void grpc_server_load_reporting_plugin_shutdown(void);
+extern "C" void grpc_lb_policy_grpclb_init(void);
+extern "C" void grpc_lb_policy_grpclb_shutdown(void);
+extern "C" void grpc_lb_policy_pick_first_init(void);
+extern "C" void grpc_lb_policy_pick_first_shutdown(void);
+extern "C" void grpc_lb_policy_round_robin_init(void);
+extern "C" void grpc_lb_policy_round_robin_shutdown(void);
+extern "C" void census_grpc_plugin_init(void);
+extern "C" void census_grpc_plugin_shutdown(void);
+extern "C" void grpc_max_age_filter_init(void);
+extern "C" void grpc_max_age_filter_shutdown(void);
+extern "C" void grpc_message_size_filter_init(void);
+extern "C" void grpc_message_size_filter_shutdown(void);
+extern "C" void grpc_workaround_cronet_compression_filter_init(void);
+extern "C" void grpc_workaround_cronet_compression_filter_shutdown(void);
void grpc_register_built_in_plugins(void) {
grpc_register_plugin(grpc_http_filters_init,
diff --git a/src/core/tsi/fake_transport_security.c b/src/core/tsi/fake_transport_security.cc
index 64043fea08..349dcf5cb8 100644
--- a/src/core/tsi/fake_transport_security.c
+++ b/src/core/tsi/fake_transport_security.cc
@@ -98,11 +98,10 @@ static const char *tsi_fake_handshake_message_to_string(int msg) {
static tsi_result tsi_fake_handshake_message_from_string(
const char *msg_string, tsi_fake_handshake_message *msg) {
- tsi_fake_handshake_message i;
- for (i = 0; i < TSI_FAKE_HANDSHAKE_MESSAGE_MAX; i++) {
+ for (int i = 0; i < TSI_FAKE_HANDSHAKE_MESSAGE_MAX; i++) {
if (strncmp(msg_string, tsi_fake_handshake_message_strings[i],
strlen(tsi_fake_handshake_message_strings[i])) == 0) {
- *msg = i;
+ *msg = (tsi_fake_handshake_message)i;
return TSI_OK;
}
}
@@ -155,9 +154,10 @@ static void tsi_fake_frame_reset(tsi_fake_frame *frame, int needs_draining) {
static void tsi_fake_frame_ensure_size(tsi_fake_frame *frame) {
if (frame->data == NULL) {
frame->allocated_size = frame->size;
- frame->data = gpr_malloc(frame->allocated_size);
+ frame->data = (unsigned char *)gpr_malloc(frame->allocated_size);
} else if (frame->size > frame->allocated_size) {
- unsigned char *new_data = gpr_realloc(frame->data, frame->size);
+ unsigned char *new_data =
+ (unsigned char *)gpr_realloc(frame->data, frame->size);
frame->data = new_data;
frame->allocated_size = frame->size;
}
@@ -176,7 +176,7 @@ static tsi_result tsi_fake_frame_decode(const unsigned char *incoming_bytes,
if (frame->needs_draining) return TSI_INTERNAL_ERROR;
if (frame->data == NULL) {
frame->allocated_size = TSI_FAKE_FRAME_INITIAL_ALLOCATED_SIZE;
- frame->data = gpr_malloc(frame->allocated_size);
+ frame->data = (unsigned char *)gpr_malloc(frame->allocated_size);
}
if (frame->offset < TSI_FAKE_FRAME_HEADER_SIZE) {
@@ -538,10 +538,11 @@ static tsi_result fake_handshaker_result_create(
handshaker_result == NULL) {
return TSI_INVALID_ARGUMENT;
}
- fake_handshaker_result *result = gpr_zalloc(sizeof(*result));
+ fake_handshaker_result *result =
+ (fake_handshaker_result *)gpr_zalloc(sizeof(*result));
result->base.vtable = &handshaker_result_vtable;
if (unused_bytes_size > 0) {
- result->unused_bytes = gpr_malloc(unused_bytes_size);
+ result->unused_bytes = (unsigned char *)gpr_malloc(unused_bytes_size);
memcpy(result->unused_bytes, unused_bytes, unused_bytes_size);
}
result->unused_bytes_size = unused_bytes_size;
@@ -561,7 +562,7 @@ static tsi_result fake_handshaker_get_bytes_to_send_to_peer(
}
if (!impl->outgoing_frame.needs_draining) {
tsi_fake_handshake_message next_message_to_send =
- impl->next_message_to_send + 2;
+ (tsi_fake_handshake_message)(impl->next_message_to_send + 2);
const char *msg_string =
tsi_fake_handshake_message_to_string(impl->next_message_to_send);
result = tsi_fake_frame_set_data((unsigned char *)msg_string,
@@ -596,7 +597,8 @@ static tsi_result fake_handshaker_process_bytes_from_peer(
tsi_handshaker *self, const unsigned char *bytes, size_t *bytes_size) {
tsi_result result = TSI_OK;
tsi_fake_handshaker *impl = (tsi_fake_handshaker *)self;
- tsi_fake_handshake_message expected_msg = impl->next_message_to_send - 1;
+ tsi_fake_handshake_message expected_msg =
+ (tsi_fake_handshake_message)(impl->next_message_to_send - 1);
tsi_fake_handshake_message received_msg;
if (!impl->needs_incoming_message || impl->result == TSI_OK) {
@@ -681,8 +683,8 @@ static tsi_result fake_handshaker_next(
if (result == TSI_INCOMPLETE_DATA) {
handshaker->outgoing_bytes_buffer_size *= 2;
handshaker->outgoing_bytes_buffer =
- gpr_realloc(handshaker->outgoing_bytes_buffer,
- handshaker->outgoing_bytes_buffer_size);
+ (unsigned char *)gpr_realloc(handshaker->outgoing_bytes_buffer,
+ handshaker->outgoing_bytes_buffer_size);
}
} while (result == TSI_INCOMPLETE_DATA);
if (result != TSI_OK) return result;
@@ -723,13 +725,14 @@ static const tsi_handshaker_vtable handshaker_vtable = {
};
tsi_handshaker *tsi_create_fake_handshaker(int is_client) {
- tsi_fake_handshaker *impl = gpr_zalloc(sizeof(*impl));
+ tsi_fake_handshaker *impl = (tsi_fake_handshaker *)gpr_zalloc(sizeof(*impl));
impl->base.vtable = &handshaker_vtable;
impl->is_client = is_client;
impl->result = TSI_HANDSHAKE_IN_PROGRESS;
impl->outgoing_bytes_buffer_size =
TSI_FAKE_HANDSHAKER_OUTGOING_BUFFER_INITIAL_SIZE;
- impl->outgoing_bytes_buffer = gpr_malloc(impl->outgoing_bytes_buffer_size);
+ impl->outgoing_bytes_buffer =
+ (unsigned char *)gpr_malloc(impl->outgoing_bytes_buffer_size);
if (is_client) {
impl->needs_incoming_message = 0;
impl->next_message_to_send = TSI_FAKE_CLIENT_INIT;
@@ -742,7 +745,8 @@ tsi_handshaker *tsi_create_fake_handshaker(int is_client) {
tsi_frame_protector *tsi_create_fake_frame_protector(
size_t *max_protected_frame_size) {
- tsi_fake_frame_protector *impl = gpr_zalloc(sizeof(*impl));
+ tsi_fake_frame_protector *impl =
+ (tsi_fake_frame_protector *)gpr_zalloc(sizeof(*impl));
impl->max_frame_size = (max_protected_frame_size == NULL)
? TSI_FAKE_DEFAULT_FRAME_SIZE
: *max_protected_frame_size;
@@ -752,7 +756,8 @@ tsi_frame_protector *tsi_create_fake_frame_protector(
tsi_zero_copy_grpc_protector *tsi_create_fake_zero_copy_grpc_protector(
size_t *max_protected_frame_size) {
- tsi_fake_zero_copy_grpc_protector *impl = gpr_zalloc(sizeof(*impl));
+ tsi_fake_zero_copy_grpc_protector *impl =
+ (tsi_fake_zero_copy_grpc_protector *)gpr_zalloc(sizeof(*impl));
grpc_slice_buffer_init(&impl->header_sb);
grpc_slice_buffer_init(&impl->protected_sb);
impl->max_frame_size = (max_protected_frame_size == NULL)
diff --git a/src/core/tsi/gts_transport_security.c b/src/core/tsi/gts_transport_security.cc
index e2ac685e44..d37f3bf8f6 100644
--- a/src/core/tsi/gts_transport_security.c
+++ b/src/core/tsi/gts_transport_security.cc
@@ -24,12 +24,12 @@ static gts_shared_resource g_gts_resource;
gts_shared_resource *gts_get_shared_resource(void) { return &g_gts_resource; }
-void grpc_tsi_gts_init() {
+extern "C" void grpc_tsi_gts_init() {
memset(&g_gts_resource, 0, sizeof(gts_shared_resource));
gpr_mu_init(&g_gts_resource.mu);
}
-void grpc_tsi_gts_shutdown() {
+extern "C" void grpc_tsi_gts_shutdown() {
gpr_mu_destroy(&g_gts_resource.mu);
if (g_gts_resource.cq == NULL) {
return;
diff --git a/src/core/tsi/gts_transport_security.h b/src/core/tsi/gts_transport_security.h
index 538e1030bc..b988c3f861 100644
--- a/src/core/tsi/gts_transport_security.h
+++ b/src/core/tsi/gts_transport_security.h
@@ -23,6 +23,10 @@
#include <grpc/support/sync.h>
#include <grpc/support/thd.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct gts_shared_resource {
gpr_thd_id thread_id;
grpc_channel *channel;
@@ -34,4 +38,8 @@ typedef struct gts_shared_resource {
* TSI handshakes. */
gts_shared_resource *gts_get_shared_resource(void);
-#endif /* GRPC_CORE_TSI_GTS_TRANSPORT_SECURITY_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_TSI_GTS_TRANSPORT_SECURITY_H */ \ No newline at end of file
diff --git a/src/core/tsi/ssl_transport_security.c b/src/core/tsi/ssl_transport_security.cc
index 7ebf9dd96f..b1c69e9c7b 100644
--- a/src/core/tsi/ssl_transport_security.c
+++ b/src/core/tsi/ssl_transport_security.cc
@@ -39,12 +39,14 @@
#include <grpc/support/thd.h>
#include <grpc/support/useful.h>
+extern "C" {
#include <openssl/bio.h>
#include <openssl/crypto.h> /* For OPENSSL_free */
#include <openssl/err.h>
#include <openssl/ssl.h>
#include <openssl/x509.h>
#include <openssl/x509v3.h>
+}
#include "src/core/tsi/ssl_types.h"
#include "src/core/tsi/transport_security.h"
@@ -135,7 +137,7 @@ static void init_openssl(void) {
OpenSSL_add_all_algorithms();
num_locks = CRYPTO_num_locks();
GPR_ASSERT(num_locks > 0);
- openssl_mutexes = gpr_malloc((size_t)num_locks * sizeof(gpr_mu));
+ openssl_mutexes = (gpr_mu *)gpr_malloc((size_t)num_locks * sizeof(gpr_mu));
for (i = 0; i < CRYPTO_num_locks(); i++) {
gpr_mu_init(&openssl_mutexes[i]);
}
@@ -361,7 +363,7 @@ static tsi_result peer_from_x509(X509 *cert, int include_certificate_type,
tsi_peer *peer) {
/* TODO(jboeuf): Maybe add more properties. */
GENERAL_NAMES *subject_alt_names =
- X509_get_ext_d2i(cert, NID_subject_alt_name, 0, 0);
+ (GENERAL_NAMES *)X509_get_ext_d2i(cert, NID_subject_alt_name, 0, 0);
int subject_alt_name_count = (subject_alt_names != NULL)
? (int)sk_GENERAL_NAME_num(subject_alt_names)
: 0;
@@ -479,7 +481,7 @@ static tsi_result ssl_ctx_use_certificate_chain(SSL_CTX *context,
if (pem == NULL) return TSI_OUT_OF_RESOURCES;
do {
- certificate = PEM_read_bio_X509_AUX(pem, NULL, NULL, "");
+ certificate = PEM_read_bio_X509_AUX(pem, NULL, NULL, (void *)"");
if (certificate == NULL) {
result = TSI_INVALID_ARGUMENT;
break;
@@ -489,7 +491,8 @@ static tsi_result ssl_ctx_use_certificate_chain(SSL_CTX *context,
break;
}
while (1) {
- X509 *certificate_authority = PEM_read_bio_X509(pem, NULL, NULL, "");
+ X509 *certificate_authority =
+ PEM_read_bio_X509(pem, NULL, NULL, (void *)"");
if (certificate_authority == NULL) {
ERR_clear_error();
break; /* Done reading. */
@@ -520,7 +523,7 @@ static tsi_result ssl_ctx_use_private_key(SSL_CTX *context, const char *pem_key,
pem = BIO_new_mem_buf((void *)pem_key, (int)pem_key_size);
if (pem == NULL) return TSI_OUT_OF_RESOURCES;
do {
- private_key = PEM_read_bio_PrivateKey(pem, NULL, NULL, "");
+ private_key = PEM_read_bio_PrivateKey(pem, NULL, NULL, (void *)"");
if (private_key == NULL) {
result = TSI_INVALID_ARGUMENT;
break;
@@ -559,7 +562,7 @@ static tsi_result ssl_ctx_load_verification_certs(SSL_CTX *context,
}
while (1) {
- root = PEM_read_bio_X509_AUX(pem, NULL, NULL, "");
+ root = PEM_read_bio_X509_AUX(pem, NULL, NULL, (void *)"");
if (root == NULL) {
ERR_clear_error();
break; /* We're at the end of stream. */
@@ -655,7 +658,7 @@ static tsi_result extract_x509_subject_names_from_pem_cert(const char *pem_cert,
pem = BIO_new_mem_buf((void *)pem_cert, (int)strlen(pem_cert));
if (pem == NULL) return TSI_OUT_OF_RESOURCES;
- cert = PEM_read_bio_X509(pem, NULL, NULL, "");
+ cert = PEM_read_bio_X509(pem, NULL, NULL, (void *)"");
if (cert == NULL) {
gpr_log(GPR_ERROR, "Invalid certificate");
result = TSI_INVALID_ARGUMENT;
@@ -684,7 +687,7 @@ static tsi_result build_alpn_protocol_name_list(
}
*protocol_name_list_length += length + 1;
}
- *protocol_name_list = gpr_malloc(*protocol_name_list_length);
+ *protocol_name_list = (unsigned char *)gpr_malloc(*protocol_name_list_length);
if (*protocol_name_list == NULL) return TSI_OUT_OF_RESOURCES;
current = *protocol_name_list;
for (i = 0; i < num_alpn_protocols; i++) {
@@ -998,8 +1001,8 @@ static tsi_result ssl_handshaker_extract_peer(tsi_handshaker *self,
}
if (alpn_selected != NULL) {
size_t i;
- tsi_peer_property *new_properties =
- gpr_zalloc(sizeof(*new_properties) * (peer->property_count + 1));
+ tsi_peer_property *new_properties = (tsi_peer_property *)gpr_zalloc(
+ sizeof(*new_properties) * (peer->property_count + 1));
for (i = 0; i < peer->property_count; i++) {
new_properties[i] = peer->properties[i];
}
@@ -1023,7 +1026,8 @@ static tsi_result ssl_handshaker_create_frame_protector(
size_t actual_max_output_protected_frame_size =
TSI_SSL_MAX_PROTECTED_FRAME_SIZE_UPPER_BOUND;
tsi_ssl_handshaker *impl = (tsi_ssl_handshaker *)self;
- tsi_ssl_frame_protector *protector_impl = gpr_zalloc(sizeof(*protector_impl));
+ tsi_ssl_frame_protector *protector_impl =
+ (tsi_ssl_frame_protector *)gpr_zalloc(sizeof(*protector_impl));
if (max_output_protected_frame_size != NULL) {
if (*max_output_protected_frame_size >
@@ -1039,7 +1043,8 @@ static tsi_result ssl_handshaker_create_frame_protector(
}
protector_impl->buffer_size =
actual_max_output_protected_frame_size - TSI_SSL_MAX_PROTECTION_OVERHEAD;
- protector_impl->buffer = gpr_malloc(protector_impl->buffer_size);
+ protector_impl->buffer =
+ (unsigned char *)gpr_malloc(protector_impl->buffer_size);
if (protector_impl->buffer == NULL) {
gpr_log(GPR_ERROR,
"Could not allocated buffer for tsi_ssl_frame_protector.");
@@ -1130,7 +1135,7 @@ static tsi_result create_tsi_ssl_handshaker(SSL_CTX *ctx, int is_client,
SSL_set_accept_state(ssl);
}
- impl = gpr_zalloc(sizeof(*impl));
+ impl = (tsi_ssl_handshaker *)gpr_zalloc(sizeof(*impl));
impl->ssl = ssl;
impl->into_ssl = into_ssl;
impl->from_ssl = from_ssl;
@@ -1359,7 +1364,7 @@ tsi_result tsi_create_ssl_client_handshaker_factory(
return TSI_INVALID_ARGUMENT;
}
- impl = gpr_zalloc(sizeof(*impl));
+ impl = (tsi_ssl_client_handshaker_factory *)gpr_zalloc(sizeof(*impl));
tsi_ssl_handshaker_factory_init(&impl->base);
impl->base.vtable = &client_handshaker_factory_vtable;
@@ -1444,13 +1449,14 @@ tsi_result tsi_create_ssl_server_handshaker_factory_ex(
return TSI_INVALID_ARGUMENT;
}
- impl = gpr_zalloc(sizeof(*impl));
+ impl = (tsi_ssl_server_handshaker_factory *)gpr_zalloc(sizeof(*impl));
tsi_ssl_handshaker_factory_init(&impl->base);
impl->base.vtable = &server_handshaker_factory_vtable;
- impl->ssl_contexts = gpr_zalloc(num_key_cert_pairs * sizeof(SSL_CTX *));
+ impl->ssl_contexts =
+ (SSL_CTX **)gpr_zalloc(num_key_cert_pairs * sizeof(SSL_CTX *));
impl->ssl_context_x509_subject_names =
- gpr_zalloc(num_key_cert_pairs * sizeof(tsi_peer));
+ (tsi_peer *)gpr_zalloc(num_key_cert_pairs * sizeof(tsi_peer));
if (impl->ssl_contexts == NULL ||
impl->ssl_context_x509_subject_names == NULL) {
tsi_ssl_handshaker_factory_unref(&impl->base);
diff --git a/src/core/tsi/ssl_types.h b/src/core/tsi/ssl_types.h
index 3788643355..e0e967034b 100644
--- a/src/core/tsi/ssl_types.h
+++ b/src/core/tsi/ssl_types.h
@@ -19,6 +19,10 @@
#ifndef GRPC_CORE_TSI_SSL_TYPES_H
#define GRPC_CORE_TSI_SSL_TYPES_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* A collection of macros to cast between various integer types that are
* used differently between BoringSSL and OpenSSL:
* TSI_INT_AS_SIZE(x): convert 'int x' to a length parameter for an OpenSSL
@@ -37,4 +41,8 @@
#define TSI_SIZE_AS_SIZE(x) ((int)(x))
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_TSI_SSL_TYPES_H */
diff --git a/src/core/tsi/transport_security.c b/src/core/tsi/transport_security.cc
index 76213072a3..21bd8eba78 100644
--- a/src/core/tsi/transport_security.c
+++ b/src/core/tsi/transport_security.cc
@@ -282,7 +282,7 @@ tsi_result tsi_construct_allocated_string_peer_property(
*property = tsi_init_peer_property();
if (name != NULL) property->name = gpr_strdup(name);
if (value_length > 0) {
- property->value.data = gpr_zalloc(value_length);
+ property->value.data = (char *)gpr_zalloc(value_length);
property->value.length = value_length;
}
return TSI_OK;
@@ -310,7 +310,8 @@ tsi_result tsi_construct_string_peer_property(const char *name,
tsi_result tsi_construct_peer(size_t property_count, tsi_peer *peer) {
memset(peer, 0, sizeof(tsi_peer));
if (property_count > 0) {
- peer->properties = gpr_zalloc(property_count * sizeof(tsi_peer_property));
+ peer->properties = (tsi_peer_property *)gpr_zalloc(
+ property_count * sizeof(tsi_peer_property));
peer->property_count = property_count;
}
return TSI_OK;
diff --git a/src/core/tsi/transport_security_adapter.c b/src/core/tsi/transport_security_adapter.cc
index 1c2a57b3bd..e399e42758 100644
--- a/src/core/tsi/transport_security_adapter.c
+++ b/src/core/tsi/transport_security_adapter.cc
@@ -80,12 +80,13 @@ static tsi_result tsi_adapter_create_handshaker_result(
if (wrapped == NULL || (unused_bytes_size > 0 && unused_bytes == NULL)) {
return TSI_INVALID_ARGUMENT;
}
- tsi_adapter_handshaker_result *impl = gpr_zalloc(sizeof(*impl));
+ tsi_adapter_handshaker_result *impl =
+ (tsi_adapter_handshaker_result *)gpr_zalloc(sizeof(*impl));
impl->base.vtable = &result_vtable;
impl->wrapped = wrapped;
impl->unused_bytes_size = unused_bytes_size;
if (unused_bytes_size > 0) {
- impl->unused_bytes = gpr_malloc(unused_bytes_size);
+ impl->unused_bytes = (unsigned char *)gpr_malloc(unused_bytes_size);
memcpy(impl->unused_bytes, unused_bytes, unused_bytes_size);
} else {
impl->unused_bytes = NULL;
@@ -172,8 +173,8 @@ static tsi_result adapter_next(
offset += to_send_size;
if (status == TSI_INCOMPLETE_DATA) {
impl->adapter_buffer_size *= 2;
- impl->adapter_buffer =
- gpr_realloc(impl->adapter_buffer, impl->adapter_buffer_size);
+ impl->adapter_buffer = (unsigned char *)gpr_realloc(
+ impl->adapter_buffer, impl->adapter_buffer_size);
}
} while (status == TSI_INCOMPLETE_DATA);
if (status != TSI_OK) return status;
@@ -209,11 +210,12 @@ static const tsi_handshaker_vtable handshaker_vtable = {
tsi_handshaker *tsi_create_adapter_handshaker(tsi_handshaker *wrapped) {
GPR_ASSERT(wrapped != NULL);
- tsi_adapter_handshaker *impl = gpr_zalloc(sizeof(*impl));
+ tsi_adapter_handshaker *impl =
+ (tsi_adapter_handshaker *)gpr_zalloc(sizeof(*impl));
impl->base.vtable = &handshaker_vtable;
impl->wrapped = wrapped;
impl->adapter_buffer_size = TSI_ADAPTER_INITIAL_BUFFER_SIZE;
- impl->adapter_buffer = gpr_malloc(impl->adapter_buffer_size);
+ impl->adapter_buffer = (unsigned char *)gpr_malloc(impl->adapter_buffer_size);
return &impl->base;
}
diff --git a/src/core/tsi/transport_security_grpc.c b/src/core/tsi/transport_security_grpc.cc
index affd995230..affd995230 100644
--- a/src/core/tsi/transport_security_grpc.c
+++ b/src/core/tsi/transport_security_grpc.cc
diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc
index 057a058a3f..13bbc3075d 100644
--- a/src/cpp/client/secure_credentials.cc
+++ b/src/cpp/client/secure_credentials.cc
@@ -21,6 +21,7 @@
#include <grpc++/impl/grpc_library.h>
#include <grpc++/support/channel_arguments.h>
#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
#include "src/cpp/client/create_channel_internal.h"
#include "src/cpp/common/secure_auth_context.h"
@@ -150,6 +151,18 @@ std::shared_ptr<ChannelCredentials> CompositeChannelCredentials(
return nullptr;
}
+std::shared_ptr<CallCredentials> CompositeCallCredentials(
+ const std::shared_ptr<CallCredentials>& creds1,
+ const std::shared_ptr<CallCredentials>& creds2) {
+ SecureCallCredentials* s_creds1 = creds1->AsSecureCredentials();
+ SecureCallCredentials* s_creds2 = creds2->AsSecureCredentials();
+ if (s_creds1 != nullptr && s_creds2 != nullptr) {
+ return WrapCallCredentials(grpc_composite_call_credentials_create(
+ s_creds1->GetRawCreds(), s_creds2->GetRawCreds(), nullptr));
+ }
+ return nullptr;
+}
+
void MetadataCredentialsPluginWrapper::Destroy(void* wrapper) {
if (wrapper == nullptr) return;
MetadataCredentialsPluginWrapper* w =
@@ -157,28 +170,50 @@ void MetadataCredentialsPluginWrapper::Destroy(void* wrapper) {
delete w;
}
-void MetadataCredentialsPluginWrapper::GetMetadata(
+int MetadataCredentialsPluginWrapper::GetMetadata(
void* wrapper, grpc_auth_metadata_context context,
- grpc_credentials_plugin_metadata_cb cb, void* user_data) {
+ grpc_credentials_plugin_metadata_cb cb, void* user_data,
+ grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
+ size_t* num_creds_md, grpc_status_code* status,
+ const char** error_details) {
GPR_ASSERT(wrapper);
MetadataCredentialsPluginWrapper* w =
reinterpret_cast<MetadataCredentialsPluginWrapper*>(wrapper);
if (!w->plugin_) {
- cb(user_data, NULL, 0, GRPC_STATUS_OK, NULL);
- return;
+ *num_creds_md = 0;
+ *status = GRPC_STATUS_OK;
+ *error_details = nullptr;
+ return true;
}
if (w->plugin_->IsBlocking()) {
+ // Asynchronous return.
w->thread_pool_->Add(
std::bind(&MetadataCredentialsPluginWrapper::InvokePlugin, w, context,
- cb, user_data));
+ cb, user_data, nullptr, nullptr, nullptr, nullptr));
+ return 0;
} else {
- w->InvokePlugin(context, cb, user_data);
+ // Synchronous return.
+ w->InvokePlugin(context, cb, user_data, creds_md, num_creds_md, status,
+ error_details);
+ return 1;
+ }
+}
+
+namespace {
+
+void UnrefMetadata(const std::vector<grpc_metadata>& md) {
+ for (auto it = md.begin(); it != md.end(); ++it) {
+ grpc_slice_unref(it->key);
+ grpc_slice_unref(it->value);
}
}
+} // namespace
+
void MetadataCredentialsPluginWrapper::InvokePlugin(
grpc_auth_metadata_context context, grpc_credentials_plugin_metadata_cb cb,
- void* user_data) {
+ void* user_data, grpc_metadata creds_md[4], size_t* num_creds_md,
+ grpc_status_code* status_code, const char** error_details) {
std::multimap<grpc::string, grpc::string> metadata;
// const_cast is safe since the SecureAuthContext does not take owndership and
@@ -196,12 +231,31 @@ void MetadataCredentialsPluginWrapper::InvokePlugin(
md_entry.flags = 0;
md.push_back(md_entry);
}
- cb(user_data, md.empty() ? nullptr : &md[0], md.size(),
- static_cast<grpc_status_code>(status.error_code()),
- status.error_message().c_str());
- for (auto it = md.begin(); it != md.end(); ++it) {
- grpc_slice_unref(it->key);
- grpc_slice_unref(it->value);
+ if (creds_md != nullptr) {
+ // Synchronous return.
+ if (md.size() > GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX) {
+ *num_creds_md = 0;
+ *status_code = GRPC_STATUS_INTERNAL;
+ *error_details = gpr_strdup(
+ "blocking plugin credentials returned too many metadata keys");
+ UnrefMetadata(md);
+ } else {
+ for (const auto& elem : md) {
+ creds_md[*num_creds_md].key = elem.key;
+ creds_md[*num_creds_md].value = elem.value;
+ creds_md[*num_creds_md].flags = elem.flags;
+ ++(*num_creds_md);
+ }
+ *status_code = static_cast<grpc_status_code>(status.error_code());
+ *error_details =
+ status.ok() ? nullptr : gpr_strdup(status.error_message().c_str());
+ }
+ } else {
+ // Asynchronous return.
+ cb(user_data, md.empty() ? nullptr : &md[0], md.size(),
+ static_cast<grpc_status_code>(status.error_code()),
+ status.error_message().c_str());
+ UnrefMetadata(md);
}
}
diff --git a/src/cpp/client/secure_credentials.h b/src/cpp/client/secure_credentials.h
index 66547c736b..ed9afb37b0 100644
--- a/src/cpp/client/secure_credentials.h
+++ b/src/cpp/client/secure_credentials.h
@@ -58,16 +58,23 @@ class SecureCallCredentials final : public CallCredentials {
class MetadataCredentialsPluginWrapper final : private GrpcLibraryCodegen {
public:
static void Destroy(void* wrapper);
- static void GetMetadata(void* wrapper, grpc_auth_metadata_context context,
- grpc_credentials_plugin_metadata_cb cb,
- void* user_data);
+ static int GetMetadata(
+ void* wrapper, grpc_auth_metadata_context context,
+ grpc_credentials_plugin_metadata_cb cb, void* user_data,
+ grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
+ size_t* num_creds_md, grpc_status_code* status,
+ const char** error_details);
explicit MetadataCredentialsPluginWrapper(
std::unique_ptr<MetadataCredentialsPlugin> plugin);
private:
- void InvokePlugin(grpc_auth_metadata_context context,
- grpc_credentials_plugin_metadata_cb cb, void* user_data);
+ void InvokePlugin(
+ grpc_auth_metadata_context context,
+ grpc_credentials_plugin_metadata_cb cb, void* user_data,
+ grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
+ size_t* num_creds_md, grpc_status_code* status_code,
+ const char** error_details);
std::unique_ptr<ThreadPoolInterface> thread_pool_;
std::unique_ptr<MetadataCredentialsPlugin> plugin_;
};
diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc
index f130aecd4b..f89f5f1f03 100644
--- a/src/cpp/common/channel_arguments.cc
+++ b/src/cpp/common/channel_arguments.cc
@@ -86,6 +86,10 @@ void ChannelArguments::SetCompressionAlgorithm(
SetInt(GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM, algorithm);
}
+void ChannelArguments::SetGrpclbFallbackTimeout(int fallback_timeout) {
+ SetInt(GRPC_ARG_GRPCLB_FALLBACK_TIMEOUT_MS, fallback_timeout);
+}
+
void ChannelArguments::SetSocketMutator(grpc_socket_mutator* mutator) {
if (!mutator) {
return;
diff --git a/src/cpp/common/version_cc.cc b/src/cpp/common/version_cc.cc
index 2e9a51316d..8049cbe0c9 100644
--- a/src/cpp/common/version_cc.cc
+++ b/src/cpp/common/version_cc.cc
@@ -22,5 +22,5 @@
#include <grpc++/grpc++.h>
namespace grpc {
-grpc::string Version() { return "1.7.0-dev"; }
+grpc::string Version() { return "1.8.0-dev"; }
}
diff --git a/src/csharp/Grpc.Core/Internal/AsyncCall.cs b/src/csharp/Grpc.Core/Internal/AsyncCall.cs
index 17109de587..09fb722c81 100644
--- a/src/csharp/Grpc.Core/Internal/AsyncCall.cs
+++ b/src/csharp/Grpc.Core/Internal/AsyncCall.cs
@@ -34,6 +34,9 @@ namespace Grpc.Core.Internal
readonly CallInvocationDetails<TRequest, TResponse> details;
readonly INativeCall injectedNativeCall; // for testing
+ // Dispose of to de-register cancellation token registration
+ IDisposable cancellationTokenRegistration;
+
// Completion of a pending unary response if not null.
TaskCompletionSource<TResponse> unaryResponseTcs;
@@ -320,6 +323,7 @@ namespace Grpc.Core.Internal
protected override void OnAfterReleaseResources()
{
details.Channel.RemoveCallReference(this);
+ cancellationTokenRegistration?.Dispose();
}
protected override bool IsClient
@@ -405,7 +409,7 @@ namespace Grpc.Core.Internal
var token = details.Options.CancellationToken;
if (token.CanBeCanceled)
{
- token.Register(() => this.Cancel());
+ cancellationTokenRegistration = token.Register(() => this.Cancel());
}
}
diff --git a/src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs b/src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs
index b56bdbb23f..a8cb357181 100644
--- a/src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs
+++ b/src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs
@@ -61,12 +61,9 @@ namespace Grpc.Core.Internal
try
{
- var context = new AuthInterceptorContext(Marshal.PtrToStringAnsi(serviceUrlPtr),
- Marshal.PtrToStringAnsi(methodNamePtr));
- // Don't await, we are in a native callback and need to return.
- #pragma warning disable 4014
- GetMetadataAsync(context, callbackPtr, userDataPtr);
- #pragma warning restore 4014
+ var context = new AuthInterceptorContext(Marshal.PtrToStringAnsi(serviceUrlPtr), Marshal.PtrToStringAnsi(methodNamePtr));
+ // Make a guarantee that credentials_notify_from_plugin is invoked async to be compliant with c-core API.
+ ThreadPool.QueueUserWorkItem(async (stateInfo) => await GetMetadataAsync(context, callbackPtr, userDataPtr));
}
catch (Exception e)
{
diff --git a/src/csharp/Grpc.Core/Version.csproj.include b/src/csharp/Grpc.Core/Version.csproj.include
index 124ecab14c..b9ceaf8254 100755
--- a/src/csharp/Grpc.Core/Version.csproj.include
+++ b/src/csharp/Grpc.Core/Version.csproj.include
@@ -1,7 +1,7 @@
<!-- This file is generated -->
<Project>
<PropertyGroup>
- <GrpcCsharpVersion>1.7.0-dev</GrpcCsharpVersion>
+ <GrpcCsharpVersion>1.8.0-dev</GrpcCsharpVersion>
<GoogleProtobufVersion>3.3.0</GoogleProtobufVersion>
</PropertyGroup>
</Project>
diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs
index 588cc84516..dab938821f 100644
--- a/src/csharp/Grpc.Core/VersionInfo.cs
+++ b/src/csharp/Grpc.Core/VersionInfo.cs
@@ -33,11 +33,11 @@ namespace Grpc.Core
/// <summary>
/// Current <c>AssemblyFileVersion</c> of gRPC C# assemblies
/// </summary>
- public const string CurrentAssemblyFileVersion = "1.7.0.0";
+ public const string CurrentAssemblyFileVersion = "1.8.0.0";
/// <summary>
/// Current version of gRPC C#
/// </summary>
- public const string CurrentVersion = "1.7.0-dev";
+ public const string CurrentVersion = "1.8.0-dev";
}
}
diff --git a/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs b/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs
index e81157cf97..eba6276a1f 100644
--- a/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs
+++ b/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs
@@ -90,6 +90,54 @@ namespace Grpc.IntegrationTesting
}
[Test]
+ public async Task MetadataCredentials_Composed()
+ {
+ var first = CallCredentials.FromInterceptor(new AsyncAuthInterceptor((context, metadata) => {
+ // Attempt to exercise the case where async callback is inlineable/synchronously-runnable.
+ metadata.Add("first_authorization", "FIRST_SECRET_TOKEN");
+ return TaskUtils.CompletedTask;
+ }));
+ var second = CallCredentials.FromInterceptor(new AsyncAuthInterceptor((context, metadata) => {
+ metadata.Add("second_authorization", "SECOND_SECRET_TOKEN");
+ return TaskUtils.CompletedTask;
+ }));
+ var third = CallCredentials.FromInterceptor(new AsyncAuthInterceptor((context, metadata) => {
+ metadata.Add("third_authorization", "THIRD_SECRET_TOKEN");
+ return TaskUtils.CompletedTask;
+ }));
+ var channelCredentials = ChannelCredentials.Create(TestCredentials.CreateSslCredentials(),
+ CallCredentials.Compose(first, second, third));
+ channel = new Channel(Host, server.Ports.Single().BoundPort, channelCredentials, options);
+ var client = new TestService.TestServiceClient(channel);
+ var call = client.StreamingOutputCall(new StreamingOutputCallRequest { });
+ Assert.IsTrue(await call.ResponseStream.MoveNext());
+ Assert.IsFalse(await call.ResponseStream.MoveNext());
+ }
+
+ [Test]
+ public async Task MetadataCredentials_ComposedPerCall()
+ {
+ channel = new Channel(Host, server.Ports.Single().BoundPort, TestCredentials.CreateSslCredentials(), options);
+ var client = new TestService.TestServiceClient(channel);
+ var first = CallCredentials.FromInterceptor(new AsyncAuthInterceptor((context, metadata) => {
+ metadata.Add("first_authorization", "FIRST_SECRET_TOKEN");
+ return TaskUtils.CompletedTask;
+ }));
+ var second = CallCredentials.FromInterceptor(new AsyncAuthInterceptor((context, metadata) => {
+ metadata.Add("second_authorization", "SECOND_SECRET_TOKEN");
+ return TaskUtils.CompletedTask;
+ }));
+ var third = CallCredentials.FromInterceptor(new AsyncAuthInterceptor((context, metadata) => {
+ metadata.Add("third_authorization", "THIRD_SECRET_TOKEN");
+ return TaskUtils.CompletedTask;
+ }));
+ var call = client.StreamingOutputCall(new StreamingOutputCallRequest{ },
+ new CallOptions(credentials: CallCredentials.Compose(first, second, third)));
+ Assert.IsTrue(await call.ResponseStream.MoveNext());
+ Assert.IsFalse(await call.ResponseStream.MoveNext());
+ }
+
+ [Test]
public void MetadataCredentials_InterceptorLeavesMetadataEmpty()
{
var channelCredentials = ChannelCredentials.Create(TestCredentials.CreateSslCredentials(),
@@ -125,6 +173,17 @@ namespace Grpc.IntegrationTesting
Assert.AreEqual("SECRET_TOKEN", authToken);
return Task.FromResult(new SimpleResponse());
}
+
+ public override async Task StreamingOutputCall(StreamingOutputCallRequest request, IServerStreamWriter<StreamingOutputCallResponse> responseStream, ServerCallContext context)
+ {
+ var first = context.RequestHeaders.First((entry) => entry.Key == "first_authorization").Value;
+ Assert.AreEqual("FIRST_SECRET_TOKEN", first);
+ var second = context.RequestHeaders.First((entry) => entry.Key == "second_authorization").Value;
+ Assert.AreEqual("SECOND_SECRET_TOKEN", second);
+ var third = context.RequestHeaders.First((entry) => entry.Key == "third_authorization").Value;
+ Assert.AreEqual("THIRD_SECRET_TOKEN", third);
+ await responseStream.WriteAsync(new StreamingOutputCallResponse());
+ }
}
}
}
diff --git a/src/csharp/build_packages_dotnetcli.bat b/src/csharp/build_packages_dotnetcli.bat
index c419d87049..ff013d5680 100755
--- a/src/csharp/build_packages_dotnetcli.bat
+++ b/src/csharp/build_packages_dotnetcli.bat
@@ -13,7 +13,7 @@
@rem limitations under the License.
@rem Current package versions
-set VERSION=1.7.0-dev
+set VERSION=1.8.0-dev
@rem Adjust the location of nuget.exe
set NUGET=C:\nuget\nuget.exe
diff --git a/src/csharp/build_packages_dotnetcli.sh b/src/csharp/build_packages_dotnetcli.sh
index 124dfbb257..44a4791146 100755
--- a/src/csharp/build_packages_dotnetcli.sh
+++ b/src/csharp/build_packages_dotnetcli.sh
@@ -39,7 +39,7 @@ dotnet pack --configuration Release Grpc.Auth --output ../../../artifacts
dotnet pack --configuration Release Grpc.HealthCheck --output ../../../artifacts
dotnet pack --configuration Release Grpc.Reflection --output ../../../artifacts
-nuget pack Grpc.nuspec -Version "1.7.0-dev" -OutputDirectory ../../artifacts
-nuget pack Grpc.Tools.nuspec -Version "1.7.0-dev" -OutputDirectory ../../artifacts
+nuget pack Grpc.nuspec -Version "1.8.0-dev" -OutputDirectory ../../artifacts
+nuget pack Grpc.Tools.nuspec -Version "1.8.0-dev" -OutputDirectory ../../artifacts
(cd ../../artifacts && zip csharp_nugets_dotnetcli.zip *.nupkg)
diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c
index aebce364c5..92291f9011 100644
--- a/src/csharp/ext/grpc_csharp_ext.c
+++ b/src/csharp/ext/grpc_csharp_ext.c
@@ -1023,13 +1023,17 @@ typedef void(GPR_CALLTYPE *grpcsharp_metadata_interceptor_func)(
grpc_credentials_plugin_metadata_cb cb, void *user_data,
int32_t is_destroy);
-static void grpcsharp_get_metadata_handler(
+static int grpcsharp_get_metadata_handler(
void *state, grpc_auth_metadata_context context,
- grpc_credentials_plugin_metadata_cb cb, void *user_data) {
+ grpc_credentials_plugin_metadata_cb cb, void *user_data,
+ grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
+ size_t *num_creds_md, grpc_status_code *status,
+ const char **error_details) {
grpcsharp_metadata_interceptor_func interceptor =
(grpcsharp_metadata_interceptor_func)(intptr_t)state;
interceptor(state, context.service_url, context.method_name, cb, user_data,
0);
+ return 0; /* Asynchronous return. */
}
static void grpcsharp_metadata_credentials_destroy_handler(void *state) {
diff --git a/src/node/ext/call_credentials.cc b/src/node/ext/call_credentials.cc
index 4cf3e565ef..0644a812e9 100644
--- a/src/node/ext/call_credentials.cc
+++ b/src/node/ext/call_credentials.cc
@@ -238,9 +238,12 @@ NAUV_WORK_CB(SendPluginCallback) {
}
}
-void plugin_get_metadata(void *state, grpc_auth_metadata_context context,
- grpc_credentials_plugin_metadata_cb cb,
- void *user_data) {
+int plugin_get_metadata(
+ void *state, grpc_auth_metadata_context context,
+ grpc_credentials_plugin_metadata_cb cb, void *user_data,
+ grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
+ size_t *num_creds_md, grpc_status_code *status,
+ const char **error_details) {
plugin_state *p_state = reinterpret_cast<plugin_state *>(state);
plugin_callback_data *data = new plugin_callback_data;
data->service_url = context.service_url;
@@ -252,6 +255,7 @@ void plugin_get_metadata(void *state, grpc_auth_metadata_context context,
uv_mutex_unlock(&p_state->plugin_mutex);
uv_async_send(&p_state->plugin_async);
+ return 0; // Async processing.
}
void plugin_uv_close_cb(uv_handle_t *handle) {
diff --git a/src/node/ext/call_credentials.h b/src/node/ext/call_credentials.h
index adcff84573..3a54bbf0cf 100644
--- a/src/node/ext/call_credentials.h
+++ b/src/node/ext/call_credentials.h
@@ -75,9 +75,11 @@ typedef struct plugin_state {
uv_async_t plugin_async;
} plugin_state;
-void plugin_get_metadata(void *state, grpc_auth_metadata_context context,
- grpc_credentials_plugin_metadata_cb cb,
- void *user_data);
+int plugin_get_metadata(
+ void *state, grpc_auth_metadata_context context,
+ grpc_credentials_plugin_metadata_cb cb, void *user_data,
+ grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
+ size_t *num_creds_md, grpc_status_code *status, const char **error_details);
void plugin_destroy_state(void *state);
diff --git a/src/node/health_check/package.json b/src/node/health_check/package.json
index 3c7d3707ee..6f09c8f9f0 100644
--- a/src/node/health_check/package.json
+++ b/src/node/health_check/package.json
@@ -1,6 +1,6 @@
{
"name": "grpc-health-check",
- "version": "1.7.0-dev",
+ "version": "1.8.0-dev",
"author": "Google Inc.",
"description": "Health check service for use with gRPC",
"repository": {
@@ -15,7 +15,7 @@
}
],
"dependencies": {
- "grpc": "^1.7.0-dev",
+ "grpc": "^1.8.0-dev",
"lodash": "^3.9.3",
"google-protobuf": "^3.0.0"
},
diff --git a/src/node/tools/package.json b/src/node/tools/package.json
index d9b1fb86c9..f88fc65cdf 100644
--- a/src/node/tools/package.json
+++ b/src/node/tools/package.json
@@ -1,6 +1,6 @@
{
"name": "grpc-tools",
- "version": "1.7.0-dev",
+ "version": "1.8.0-dev",
"author": "Google Inc.",
"description": "Tools for developing with gRPC on Node.js",
"homepage": "https://grpc.io/",
diff --git a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec
index 7d073c9a84..9065ab9f73 100644
--- a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec
+++ b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec
@@ -42,7 +42,7 @@ Pod::Spec.new do |s|
# exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed
# before them.
s.name = '!ProtoCompiler-gRPCPlugin'
- v = '1.7.0-dev'
+ v = '1.8.0-dev'
s.version = v
s.summary = 'The gRPC ProtoC plugin generates Objective-C files from .proto services.'
s.description = <<-DESC
diff --git a/src/objective-c/GRPCClient/private/version.h b/src/objective-c/GRPCClient/private/version.h
index 843954e84a..db589d12de 100644
--- a/src/objective-c/GRPCClient/private/version.h
+++ b/src/objective-c/GRPCClient/private/version.h
@@ -23,4 +23,4 @@
// `tools/buildgen/generate_projects.sh`.
-#define GRPC_OBJC_VERSION_STRING @"1.7.0-dev"
+#define GRPC_OBJC_VERSION_STRING @"1.8.0-dev"
diff --git a/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec b/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec
index 1796c6d746..ad83481595 100644
--- a/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec
+++ b/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec
@@ -47,7 +47,7 @@ Pod::Spec.new do |s|
s.pod_target_xcconfig = {
# This is needed by all pods that depend on Protobuf:
- 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1',
+ 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 GPB_GRPC_FORWARD_DECLARE_MESSAGE_PROTO=1',
# This is needed by all pods that depend on gRPC-RxLibrary:
'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
}
diff --git a/src/php/composer.json b/src/php/composer.json
index 3606a18f34..09471d23fe 100644
--- a/src/php/composer.json
+++ b/src/php/composer.json
@@ -2,7 +2,7 @@
"name": "grpc/grpc-dev",
"description": "gRPC library for PHP - for Developement use only",
"license": "Apache-2.0",
- "version": "1.7.0",
+ "version": "1.8.0",
"require": {
"php": ">=5.5.0",
"google/protobuf": "^v3.3.0"
diff --git a/src/php/ext/grpc/call_credentials.c b/src/php/ext/grpc/call_credentials.c
index 1eee8645df..a395d53614 100644
--- a/src/php/ext/grpc/call_credentials.c
+++ b/src/php/ext/grpc/call_credentials.c
@@ -35,6 +35,7 @@
#include <grpc/grpc.h>
#include <grpc/grpc_security.h>
+#include <grpc/support/string_util.h>
zend_class_entry *grpc_ce_call_credentials;
#if PHP_MAJOR_VERSION >= 7
@@ -143,9 +144,12 @@ PHP_METHOD(CallCredentials, createFromPlugin) {
}
/* Callback function for plugin creds API */
-void plugin_get_metadata(void *ptr, grpc_auth_metadata_context context,
- grpc_credentials_plugin_metadata_cb cb,
- void *user_data) {
+int plugin_get_metadata(
+ void *ptr, grpc_auth_metadata_context context,
+ grpc_credentials_plugin_metadata_cb cb, void *user_data,
+ grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
+ size_t *num_creds_md, grpc_status_code *status,
+ const char **error_details) {
TSRMLS_FETCH();
plugin_state *state = (plugin_state *)ptr;
@@ -175,15 +179,19 @@ void plugin_get_metadata(void *ptr, grpc_auth_metadata_context context,
/* call the user callback function */
zend_call_function(state->fci, state->fci_cache TSRMLS_CC);
- grpc_status_code code = GRPC_STATUS_OK;
+ *num_creds_md = 0;
+ *status = GRPC_STATUS_OK;
+ *error_details = NULL;
+
grpc_metadata_array metadata;
- bool cleanup = true;
if (retval == NULL || Z_TYPE_P(retval) != IS_ARRAY) {
- cleanup = false;
- code = GRPC_STATUS_INVALID_ARGUMENT;
- } else if (!create_metadata_array(retval, &metadata)) {
- code = GRPC_STATUS_INVALID_ARGUMENT;
+ *status = GRPC_STATUS_INVALID_ARGUMENT;
+ return true; // Synchronous return.
+ }
+ if (!create_metadata_array(retval, &metadata)) {
+ *status = GRPC_STATUS_INVALID_ARGUMENT;
+ return true; // Synchronous return.
}
if (retval != NULL) {
@@ -197,14 +205,24 @@ void plugin_get_metadata(void *ptr, grpc_auth_metadata_context context,
#endif
}
- /* Pass control back to core */
- cb(user_data, metadata.metadata, metadata.count, code, NULL);
- if (cleanup) {
- for (int i = 0; i < metadata.count; i++) {
+ if (metadata.count > GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX) {
+ *status = GRPC_STATUS_INTERNAL;
+ *error_details = gpr_strdup(
+ "PHP plugin credentials returned too many metadata entries");
+ for (size_t i = 0; i < metadata.count; i++) {
+ // TODO(stanleycheung): Why don't we need to unref the key here?
grpc_slice_unref(metadata.metadata[i].value);
}
- grpc_metadata_array_destroy(&metadata);
+ } else {
+ // Return data to core.
+ *num_creds_md = metadata.count;
+ for (size_t i = 0; i < metadata.count; ++i) {
+ creds_md[i] = metadata.metadata[i];
+ }
}
+
+ grpc_metadata_array_destroy(&metadata);
+ return true; // Synchronous return.
}
/* Cleanup function for plugin creds API */
diff --git a/src/php/ext/grpc/call_credentials.h b/src/php/ext/grpc/call_credentials.h
index 9be8763278..663cc6858d 100755
--- a/src/php/ext/grpc/call_credentials.h
+++ b/src/php/ext/grpc/call_credentials.h
@@ -65,9 +65,12 @@ typedef struct plugin_state {
} plugin_state;
/* Callback function for plugin creds API */
-void plugin_get_metadata(void *state, grpc_auth_metadata_context context,
- grpc_credentials_plugin_metadata_cb cb,
- void *user_data);
+int plugin_get_metadata(
+ void *ptr, grpc_auth_metadata_context context,
+ grpc_credentials_plugin_metadata_cb cb, void *user_data,
+ grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
+ size_t *num_creds_md, grpc_status_code *status,
+ const char **error_details);
/* Cleanup function for plugin creds API */
void plugin_destroy_state(void *ptr);
diff --git a/src/php/ext/grpc/version.h b/src/php/ext/grpc/version.h
index 07d8eee7fe..93dd563cff 100644
--- a/src/php/ext/grpc/version.h
+++ b/src/php/ext/grpc/version.h
@@ -20,6 +20,6 @@
#ifndef VERSION_H
#define VERSION_H
-#define PHP_GRPC_VERSION "1.7.0dev"
+#define PHP_GRPC_VERSION "1.8.0dev"
#endif /* VERSION_H */
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi
index a0e69dd613..41975cbe9e 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi
@@ -41,7 +41,8 @@ cdef class CredentialsMetadataPlugin:
cdef object plugin_callback
cdef bytes plugin_name
- cdef grpc_metadata_credentials_plugin make_c_plugin(self)
+
+cdef grpc_metadata_credentials_plugin _c_plugin(CredentialsMetadataPlugin plugin)
cdef class AuthMetadataContext:
@@ -49,8 +50,11 @@ cdef class AuthMetadataContext:
cdef grpc_auth_metadata_context context
-cdef void plugin_get_metadata(
+cdef int plugin_get_metadata(
void *state, grpc_auth_metadata_context context,
- grpc_credentials_plugin_metadata_cb cb, void *user_data) with gil
+ grpc_credentials_plugin_metadata_cb cb, void *user_data,
+ grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
+ size_t *num_creds_md, grpc_status_code *status,
+ const char **error_details) with gil
cdef void plugin_destroy_c_plugin_state(void *state) with gil
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
index 57816f1cab..0fabda19ce 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
@@ -14,6 +14,7 @@
cimport cpython
+import threading
import traceback
@@ -89,20 +90,20 @@ cdef class CredentialsMetadataPlugin:
self.plugin_callback = plugin_callback
self.plugin_name = name
- @staticmethod
- cdef grpc_metadata_credentials_plugin make_c_plugin(self):
- cdef grpc_metadata_credentials_plugin result
- result.get_metadata = plugin_get_metadata
- result.destroy = plugin_destroy_c_plugin_state
- result.state = <void *>self
- result.type = self.plugin_name
- cpython.Py_INCREF(self)
- return result
-
def __dealloc__(self):
grpc_shutdown()
+cdef grpc_metadata_credentials_plugin _c_plugin(CredentialsMetadataPlugin plugin):
+ cdef grpc_metadata_credentials_plugin c_plugin
+ c_plugin.get_metadata = plugin_get_metadata
+ c_plugin.destroy = plugin_destroy_c_plugin_state
+ c_plugin.state = <void *>plugin
+ c_plugin.type = plugin.plugin_name
+ cpython.Py_INCREF(plugin)
+ return c_plugin
+
+
cdef class AuthMetadataContext:
def __cinit__(self):
@@ -122,9 +123,12 @@ cdef class AuthMetadataContext:
grpc_shutdown()
-cdef void plugin_get_metadata(
+cdef int plugin_get_metadata(
void *state, grpc_auth_metadata_context context,
- grpc_credentials_plugin_metadata_cb cb, void *user_data) with gil:
+ grpc_credentials_plugin_metadata_cb cb, void *user_data,
+ grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
+ size_t *num_creds_md, grpc_status_code *status,
+ const char **error_details) with gil:
called_flag = [False]
def python_callback(
Metadata metadata, grpc_status_code status,
@@ -134,12 +138,15 @@ cdef void plugin_get_metadata(
cdef CredentialsMetadataPlugin self = <CredentialsMetadataPlugin>state
cdef AuthMetadataContext cy_context = AuthMetadataContext()
cy_context.context = context
- try:
- self.plugin_callback(cy_context, python_callback)
- except Exception as error:
- if not called_flag[0]:
- cb(user_data, NULL, 0, StatusCode.unknown,
- traceback.format_exc().encode())
+ def async_callback():
+ try:
+ self.plugin_callback(cy_context, python_callback)
+ except Exception as error:
+ if not called_flag[0]:
+ cb(user_data, NULL, 0, StatusCode.unknown,
+ traceback.format_exc().encode())
+ threading.Thread(group=None, target=async_callback).start()
+ return 0 # Asynchronous return
cdef void plugin_destroy_c_plugin_state(void *state) with gil:
cpython.Py_DECREF(<CredentialsMetadataPlugin>state)
@@ -239,7 +246,7 @@ def call_credentials_google_iam(authorization_token, authority_selector):
def call_credentials_metadata_plugin(CredentialsMetadataPlugin plugin):
cdef CallCredentials credentials = CallCredentials()
- cdef grpc_metadata_credentials_plugin c_plugin = plugin.make_c_plugin()
+ cdef grpc_metadata_credentials_plugin c_plugin = _c_plugin(plugin)
with nogil:
credentials.c_credentials = (
grpc_metadata_credentials_create_from_plugin(c_plugin, NULL))
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
index 94877bb234..340584d347 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
@@ -375,6 +375,10 @@ cdef extern from "grpc/grpc.h":
cdef extern from "grpc/grpc_security.h":
+ # Declare this as an enum, this is the only way to make it a const in
+ # cython
+ enum: GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX
+
ctypedef enum grpc_ssl_roots_override_result:
GRPC_SSL_ROOTS_OVERRIDE_OK
GRPC_SSL_ROOTS_OVERRIDE_FAILED_PERMANENTLY
@@ -462,9 +466,12 @@ cdef extern from "grpc/grpc_security.h":
grpc_status_code status, const char *error_details)
ctypedef struct grpc_metadata_credentials_plugin:
- void (*get_metadata)(
+ int (*get_metadata)(
void *state, grpc_auth_metadata_context context,
- grpc_credentials_plugin_metadata_cb cb, void *user_data)
+ grpc_credentials_plugin_metadata_cb cb, void *user_data,
+ grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
+ size_t *num_creds_md, grpc_status_code *status,
+ const char **error_details)
void (*destroy)(void *state)
void *state
const char *type
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
index 3195509496..e8e3aa9720 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
@@ -171,14 +171,6 @@ cdef class Timespec:
gpr_convert_clock_type(self.c_time, GPR_CLOCK_REALTIME))
return <double>real_time.seconds + <double>real_time.nanoseconds / 1e9
- @staticmethod
- def infinite_future():
- return Timespec(float("+inf"))
-
- @staticmethod
- def infinite_past():
- return Timespec(float("-inf"))
-
def __richcmp__(Timespec self not None, Timespec other not None, int op):
cdef gpr_timespec self_c_time = self.c_time
cdef gpr_timespec other_c_time = other.c_time
@@ -454,7 +446,7 @@ cdef class _MetadataIterator:
self.i = self.i + 1
return result
else:
- raise StopIteration
+ raise StopIteration()
# TODO(https://github.com/grpc/grpc/issues/7950): Eliminate this; just use an
@@ -518,7 +510,7 @@ cdef class MetadataArray:
def __getitem__(self, size_t i):
if i >= self.c_metadata_array.count:
- raise IndexError
+ raise IndexError()
key = _slice_bytes(self.c_metadata_array.metadata[i].key)
value = _slice_bytes(self.c_metadata_array.metadata[i].value)
return Metadatum(key=key, value=value)
@@ -720,7 +712,7 @@ cdef class _OperationsIterator:
self.i = self.i + 1
return result
else:
- raise StopIteration
+ raise StopIteration()
cdef class Operations:
diff --git a/src/python/grpcio/grpc/_grpcio_metadata.py b/src/python/grpcio/grpc/_grpcio_metadata.py
index a4eb358c4e..0887ac1722 100644
--- a/src/python/grpcio/grpc/_grpcio_metadata.py
+++ b/src/python/grpcio/grpc/_grpcio_metadata.py
@@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc/_grpcio_metadata.py.template`!!!
-__version__ = """1.7.0.dev0"""
+__version__ = """1.8.0.dev0"""
diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py
index 62723d047e..f631527ec2 100644
--- a/src/python/grpcio/grpc_core_dependencies.py
+++ b/src/python/grpcio/grpc_core_dependencies.py
@@ -15,314 +15,314 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_core_dependencies.py.template`!!!
CORE_SOURCE_FILES = [
- 'src/core/lib/profiling/basic_timers.c',
- 'src/core/lib/profiling/stap_timers.c',
- 'src/core/lib/support/alloc.c',
- 'src/core/lib/support/arena.c',
- 'src/core/lib/support/atm.c',
- 'src/core/lib/support/avl.c',
- 'src/core/lib/support/backoff.c',
- 'src/core/lib/support/cmdline.c',
- 'src/core/lib/support/cpu_iphone.c',
- 'src/core/lib/support/cpu_linux.c',
- 'src/core/lib/support/cpu_posix.c',
- 'src/core/lib/support/cpu_windows.c',
- 'src/core/lib/support/env_linux.c',
- 'src/core/lib/support/env_posix.c',
- 'src/core/lib/support/env_windows.c',
- 'src/core/lib/support/histogram.c',
- 'src/core/lib/support/host_port.c',
- 'src/core/lib/support/log.c',
- 'src/core/lib/support/log_android.c',
- 'src/core/lib/support/log_linux.c',
- 'src/core/lib/support/log_posix.c',
- 'src/core/lib/support/log_windows.c',
- 'src/core/lib/support/mpscq.c',
- 'src/core/lib/support/murmur_hash.c',
- 'src/core/lib/support/stack_lockfree.c',
- 'src/core/lib/support/string.c',
- 'src/core/lib/support/string_posix.c',
- 'src/core/lib/support/string_util_windows.c',
- 'src/core/lib/support/string_windows.c',
- 'src/core/lib/support/subprocess_posix.c',
- 'src/core/lib/support/subprocess_windows.c',
- 'src/core/lib/support/sync.c',
- 'src/core/lib/support/sync_posix.c',
- 'src/core/lib/support/sync_windows.c',
- 'src/core/lib/support/thd.c',
- 'src/core/lib/support/thd_posix.c',
- 'src/core/lib/support/thd_windows.c',
- 'src/core/lib/support/time.c',
- 'src/core/lib/support/time_posix.c',
- 'src/core/lib/support/time_precise.c',
- 'src/core/lib/support/time_windows.c',
- 'src/core/lib/support/tls_pthread.c',
- 'src/core/lib/support/tmpfile_msys.c',
- 'src/core/lib/support/tmpfile_posix.c',
- 'src/core/lib/support/tmpfile_windows.c',
- 'src/core/lib/support/wrap_memcpy.c',
- 'src/core/lib/surface/init.c',
- 'src/core/lib/channel/channel_args.c',
- 'src/core/lib/channel/channel_stack.c',
- 'src/core/lib/channel/channel_stack_builder.c',
- 'src/core/lib/channel/connected_channel.c',
- 'src/core/lib/channel/handshaker.c',
- 'src/core/lib/channel/handshaker_factory.c',
- 'src/core/lib/channel/handshaker_registry.c',
- 'src/core/lib/compression/compression.c',
- 'src/core/lib/compression/compression_internal.c',
- 'src/core/lib/compression/message_compress.c',
- 'src/core/lib/compression/stream_compression.c',
- 'src/core/lib/compression/stream_compression_gzip.c',
- 'src/core/lib/compression/stream_compression_identity.c',
- 'src/core/lib/debug/stats.c',
- 'src/core/lib/debug/stats_data.c',
- 'src/core/lib/http/format_request.c',
- 'src/core/lib/http/httpcli.c',
- 'src/core/lib/http/parser.c',
- 'src/core/lib/iomgr/call_combiner.c',
- 'src/core/lib/iomgr/closure.c',
- 'src/core/lib/iomgr/combiner.c',
- 'src/core/lib/iomgr/endpoint.c',
- 'src/core/lib/iomgr/endpoint_pair_posix.c',
- 'src/core/lib/iomgr/endpoint_pair_uv.c',
- 'src/core/lib/iomgr/endpoint_pair_windows.c',
- 'src/core/lib/iomgr/error.c',
- 'src/core/lib/iomgr/ev_epoll1_linux.c',
- 'src/core/lib/iomgr/ev_epollex_linux.c',
- 'src/core/lib/iomgr/ev_epollsig_linux.c',
- 'src/core/lib/iomgr/ev_poll_posix.c',
- 'src/core/lib/iomgr/ev_posix.c',
- 'src/core/lib/iomgr/ev_windows.c',
- 'src/core/lib/iomgr/exec_ctx.c',
- 'src/core/lib/iomgr/executor.c',
- 'src/core/lib/iomgr/gethostname_fallback.c',
- 'src/core/lib/iomgr/gethostname_host_name_max.c',
- 'src/core/lib/iomgr/gethostname_sysconf.c',
- 'src/core/lib/iomgr/iocp_windows.c',
- 'src/core/lib/iomgr/iomgr.c',
- 'src/core/lib/iomgr/iomgr_posix.c',
- 'src/core/lib/iomgr/iomgr_uv.c',
- 'src/core/lib/iomgr/iomgr_windows.c',
- 'src/core/lib/iomgr/is_epollexclusive_available.c',
- 'src/core/lib/iomgr/load_file.c',
- 'src/core/lib/iomgr/lockfree_event.c',
- 'src/core/lib/iomgr/network_status_tracker.c',
- 'src/core/lib/iomgr/polling_entity.c',
- 'src/core/lib/iomgr/pollset_set_uv.c',
- 'src/core/lib/iomgr/pollset_set_windows.c',
- 'src/core/lib/iomgr/pollset_uv.c',
- 'src/core/lib/iomgr/pollset_windows.c',
- 'src/core/lib/iomgr/resolve_address_posix.c',
- 'src/core/lib/iomgr/resolve_address_uv.c',
- 'src/core/lib/iomgr/resolve_address_windows.c',
- 'src/core/lib/iomgr/resource_quota.c',
- 'src/core/lib/iomgr/sockaddr_utils.c',
- 'src/core/lib/iomgr/socket_factory_posix.c',
- 'src/core/lib/iomgr/socket_mutator.c',
- 'src/core/lib/iomgr/socket_utils_common_posix.c',
- 'src/core/lib/iomgr/socket_utils_linux.c',
- 'src/core/lib/iomgr/socket_utils_posix.c',
- 'src/core/lib/iomgr/socket_utils_uv.c',
- 'src/core/lib/iomgr/socket_utils_windows.c',
- 'src/core/lib/iomgr/socket_windows.c',
- 'src/core/lib/iomgr/tcp_client_posix.c',
- 'src/core/lib/iomgr/tcp_client_uv.c',
- 'src/core/lib/iomgr/tcp_client_windows.c',
- 'src/core/lib/iomgr/tcp_posix.c',
- 'src/core/lib/iomgr/tcp_server_posix.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_common.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c',
- 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c',
- 'src/core/lib/iomgr/tcp_server_uv.c',
- 'src/core/lib/iomgr/tcp_server_windows.c',
- 'src/core/lib/iomgr/tcp_uv.c',
- 'src/core/lib/iomgr/tcp_windows.c',
- 'src/core/lib/iomgr/time_averaged_stats.c',
- 'src/core/lib/iomgr/timer_generic.c',
- 'src/core/lib/iomgr/timer_heap.c',
- 'src/core/lib/iomgr/timer_manager.c',
- 'src/core/lib/iomgr/timer_uv.c',
- 'src/core/lib/iomgr/udp_server.c',
- 'src/core/lib/iomgr/unix_sockets_posix.c',
- 'src/core/lib/iomgr/unix_sockets_posix_noop.c',
- 'src/core/lib/iomgr/wakeup_fd_cv.c',
- 'src/core/lib/iomgr/wakeup_fd_eventfd.c',
- 'src/core/lib/iomgr/wakeup_fd_nospecial.c',
- 'src/core/lib/iomgr/wakeup_fd_pipe.c',
- 'src/core/lib/iomgr/wakeup_fd_posix.c',
- 'src/core/lib/json/json.c',
- 'src/core/lib/json/json_reader.c',
- 'src/core/lib/json/json_string.c',
- 'src/core/lib/json/json_writer.c',
- 'src/core/lib/slice/b64.c',
- 'src/core/lib/slice/percent_encoding.c',
- 'src/core/lib/slice/slice.c',
- 'src/core/lib/slice/slice_buffer.c',
- 'src/core/lib/slice/slice_hash_table.c',
- 'src/core/lib/slice/slice_intern.c',
- 'src/core/lib/slice/slice_string_helpers.c',
- 'src/core/lib/surface/alarm.c',
- 'src/core/lib/surface/api_trace.c',
- 'src/core/lib/surface/byte_buffer.c',
- 'src/core/lib/surface/byte_buffer_reader.c',
- 'src/core/lib/surface/call.c',
- 'src/core/lib/surface/call_details.c',
- 'src/core/lib/surface/call_log_batch.c',
- 'src/core/lib/surface/channel.c',
- 'src/core/lib/surface/channel_init.c',
- 'src/core/lib/surface/channel_ping.c',
- 'src/core/lib/surface/channel_stack_type.c',
- 'src/core/lib/surface/completion_queue.c',
- 'src/core/lib/surface/completion_queue_factory.c',
- 'src/core/lib/surface/event_string.c',
+ 'src/core/lib/profiling/basic_timers.cc',
+ 'src/core/lib/profiling/stap_timers.cc',
+ 'src/core/lib/support/alloc.cc',
+ 'src/core/lib/support/arena.cc',
+ 'src/core/lib/support/atm.cc',
+ 'src/core/lib/support/avl.cc',
+ 'src/core/lib/support/cmdline.cc',
+ 'src/core/lib/support/cpu_iphone.cc',
+ 'src/core/lib/support/cpu_linux.cc',
+ 'src/core/lib/support/cpu_posix.cc',
+ 'src/core/lib/support/cpu_windows.cc',
+ 'src/core/lib/support/env_linux.cc',
+ 'src/core/lib/support/env_posix.cc',
+ 'src/core/lib/support/env_windows.cc',
+ 'src/core/lib/support/histogram.cc',
+ 'src/core/lib/support/host_port.cc',
+ 'src/core/lib/support/log.cc',
+ 'src/core/lib/support/log_android.cc',
+ 'src/core/lib/support/log_linux.cc',
+ 'src/core/lib/support/log_posix.cc',
+ 'src/core/lib/support/log_windows.cc',
+ 'src/core/lib/support/mpscq.cc',
+ 'src/core/lib/support/murmur_hash.cc',
+ 'src/core/lib/support/stack_lockfree.cc',
+ 'src/core/lib/support/string.cc',
+ 'src/core/lib/support/string_posix.cc',
+ 'src/core/lib/support/string_util_windows.cc',
+ 'src/core/lib/support/string_windows.cc',
+ 'src/core/lib/support/subprocess_posix.cc',
+ 'src/core/lib/support/subprocess_windows.cc',
+ 'src/core/lib/support/sync.cc',
+ 'src/core/lib/support/sync_posix.cc',
+ 'src/core/lib/support/sync_windows.cc',
+ 'src/core/lib/support/thd.cc',
+ 'src/core/lib/support/thd_posix.cc',
+ 'src/core/lib/support/thd_windows.cc',
+ 'src/core/lib/support/time.cc',
+ 'src/core/lib/support/time_posix.cc',
+ 'src/core/lib/support/time_precise.cc',
+ 'src/core/lib/support/time_windows.cc',
+ 'src/core/lib/support/tls_pthread.cc',
+ 'src/core/lib/support/tmpfile_msys.cc',
+ 'src/core/lib/support/tmpfile_posix.cc',
+ 'src/core/lib/support/tmpfile_windows.cc',
+ 'src/core/lib/support/wrap_memcpy.cc',
+ 'src/core/lib/surface/init.cc',
+ 'src/core/lib/backoff/backoff.cc',
+ 'src/core/lib/channel/channel_args.cc',
+ 'src/core/lib/channel/channel_stack.cc',
+ 'src/core/lib/channel/channel_stack_builder.cc',
+ 'src/core/lib/channel/connected_channel.cc',
+ 'src/core/lib/channel/handshaker.cc',
+ '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/message_compress.cc',
+ 'src/core/lib/compression/stream_compression.cc',
+ 'src/core/lib/compression/stream_compression_gzip.cc',
+ 'src/core/lib/compression/stream_compression_identity.cc',
+ 'src/core/lib/debug/stats.cc',
+ 'src/core/lib/debug/stats_data.cc',
+ 'src/core/lib/http/format_request.cc',
+ 'src/core/lib/http/httpcli.cc',
+ 'src/core/lib/http/parser.cc',
+ 'src/core/lib/iomgr/call_combiner.cc',
+ 'src/core/lib/iomgr/closure.cc',
+ 'src/core/lib/iomgr/combiner.cc',
+ 'src/core/lib/iomgr/endpoint.cc',
+ 'src/core/lib/iomgr/endpoint_pair_posix.cc',
+ 'src/core/lib/iomgr/endpoint_pair_uv.cc',
+ 'src/core/lib/iomgr/endpoint_pair_windows.cc',
+ 'src/core/lib/iomgr/error.cc',
+ 'src/core/lib/iomgr/ev_epoll1_linux.cc',
+ 'src/core/lib/iomgr/ev_epollex_linux.cc',
+ 'src/core/lib/iomgr/ev_epollsig_linux.cc',
+ 'src/core/lib/iomgr/ev_poll_posix.cc',
+ 'src/core/lib/iomgr/ev_posix.cc',
+ 'src/core/lib/iomgr/ev_windows.cc',
+ 'src/core/lib/iomgr/exec_ctx.cc',
+ 'src/core/lib/iomgr/executor.cc',
+ 'src/core/lib/iomgr/gethostname_fallback.cc',
+ 'src/core/lib/iomgr/gethostname_host_name_max.cc',
+ 'src/core/lib/iomgr/gethostname_sysconf.cc',
+ 'src/core/lib/iomgr/iocp_windows.cc',
+ 'src/core/lib/iomgr/iomgr.cc',
+ 'src/core/lib/iomgr/iomgr_posix.cc',
+ 'src/core/lib/iomgr/iomgr_uv.cc',
+ 'src/core/lib/iomgr/iomgr_windows.cc',
+ 'src/core/lib/iomgr/is_epollexclusive_available.cc',
+ 'src/core/lib/iomgr/load_file.cc',
+ 'src/core/lib/iomgr/lockfree_event.cc',
+ 'src/core/lib/iomgr/network_status_tracker.cc',
+ 'src/core/lib/iomgr/polling_entity.cc',
+ 'src/core/lib/iomgr/pollset_set_uv.cc',
+ 'src/core/lib/iomgr/pollset_set_windows.cc',
+ 'src/core/lib/iomgr/pollset_uv.cc',
+ 'src/core/lib/iomgr/pollset_windows.cc',
+ 'src/core/lib/iomgr/resolve_address_posix.cc',
+ 'src/core/lib/iomgr/resolve_address_uv.cc',
+ 'src/core/lib/iomgr/resolve_address_windows.cc',
+ 'src/core/lib/iomgr/resource_quota.cc',
+ 'src/core/lib/iomgr/sockaddr_utils.cc',
+ 'src/core/lib/iomgr/socket_factory_posix.cc',
+ 'src/core/lib/iomgr/socket_mutator.cc',
+ 'src/core/lib/iomgr/socket_utils_common_posix.cc',
+ 'src/core/lib/iomgr/socket_utils_linux.cc',
+ 'src/core/lib/iomgr/socket_utils_posix.cc',
+ 'src/core/lib/iomgr/socket_utils_uv.cc',
+ 'src/core/lib/iomgr/socket_utils_windows.cc',
+ 'src/core/lib/iomgr/socket_windows.cc',
+ 'src/core/lib/iomgr/tcp_client_posix.cc',
+ 'src/core/lib/iomgr/tcp_client_uv.cc',
+ 'src/core/lib/iomgr/tcp_client_windows.cc',
+ 'src/core/lib/iomgr/tcp_posix.cc',
+ 'src/core/lib/iomgr/tcp_server_posix.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_common.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc',
+ 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc',
+ 'src/core/lib/iomgr/tcp_server_uv.cc',
+ 'src/core/lib/iomgr/tcp_server_windows.cc',
+ 'src/core/lib/iomgr/tcp_uv.cc',
+ 'src/core/lib/iomgr/tcp_windows.cc',
+ 'src/core/lib/iomgr/time_averaged_stats.cc',
+ 'src/core/lib/iomgr/timer_generic.cc',
+ 'src/core/lib/iomgr/timer_heap.cc',
+ 'src/core/lib/iomgr/timer_manager.cc',
+ 'src/core/lib/iomgr/timer_uv.cc',
+ 'src/core/lib/iomgr/udp_server.cc',
+ 'src/core/lib/iomgr/unix_sockets_posix.cc',
+ 'src/core/lib/iomgr/unix_sockets_posix_noop.cc',
+ 'src/core/lib/iomgr/wakeup_fd_cv.cc',
+ 'src/core/lib/iomgr/wakeup_fd_eventfd.cc',
+ 'src/core/lib/iomgr/wakeup_fd_nospecial.cc',
+ 'src/core/lib/iomgr/wakeup_fd_pipe.cc',
+ 'src/core/lib/iomgr/wakeup_fd_posix.cc',
+ 'src/core/lib/json/json.cc',
+ 'src/core/lib/json/json_reader.cc',
+ 'src/core/lib/json/json_string.cc',
+ 'src/core/lib/json/json_writer.cc',
+ 'src/core/lib/slice/b64.cc',
+ 'src/core/lib/slice/percent_encoding.cc',
+ 'src/core/lib/slice/slice.cc',
+ 'src/core/lib/slice/slice_buffer.cc',
+ 'src/core/lib/slice/slice_hash_table.cc',
+ 'src/core/lib/slice/slice_intern.cc',
+ 'src/core/lib/slice/slice_string_helpers.cc',
+ 'src/core/lib/surface/alarm.cc',
+ 'src/core/lib/surface/api_trace.cc',
+ 'src/core/lib/surface/byte_buffer.cc',
+ 'src/core/lib/surface/byte_buffer_reader.cc',
+ 'src/core/lib/surface/call.cc',
+ 'src/core/lib/surface/call_details.cc',
+ 'src/core/lib/surface/call_log_batch.cc',
+ 'src/core/lib/surface/channel.cc',
+ 'src/core/lib/surface/channel_init.cc',
+ 'src/core/lib/surface/channel_ping.cc',
+ 'src/core/lib/surface/channel_stack_type.cc',
+ 'src/core/lib/surface/completion_queue.cc',
+ 'src/core/lib/surface/completion_queue_factory.cc',
+ 'src/core/lib/surface/event_string.cc',
'src/core/lib/surface/lame_client.cc',
- 'src/core/lib/surface/metadata_array.c',
- 'src/core/lib/surface/server.c',
- 'src/core/lib/surface/validate_metadata.c',
- 'src/core/lib/surface/version.c',
- 'src/core/lib/transport/bdp_estimator.c',
- 'src/core/lib/transport/byte_stream.c',
- 'src/core/lib/transport/connectivity_state.c',
- 'src/core/lib/transport/error_utils.c',
- 'src/core/lib/transport/metadata.c',
- 'src/core/lib/transport/metadata_batch.c',
- 'src/core/lib/transport/pid_controller.c',
- 'src/core/lib/transport/service_config.c',
- 'src/core/lib/transport/static_metadata.c',
- 'src/core/lib/transport/status_conversion.c',
- 'src/core/lib/transport/timeout_encoding.c',
- 'src/core/lib/transport/transport.c',
- 'src/core/lib/transport/transport_op_string.c',
- 'src/core/lib/debug/trace.c',
- 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c',
- 'src/core/ext/transport/chttp2/transport/bin_decoder.c',
- 'src/core/ext/transport/chttp2/transport/bin_encoder.c',
- 'src/core/ext/transport/chttp2/transport/chttp2_plugin.c',
- 'src/core/ext/transport/chttp2/transport/chttp2_transport.c',
- 'src/core/ext/transport/chttp2/transport/flow_control.c',
- 'src/core/ext/transport/chttp2/transport/frame_data.c',
- 'src/core/ext/transport/chttp2/transport/frame_goaway.c',
- 'src/core/ext/transport/chttp2/transport/frame_ping.c',
- 'src/core/ext/transport/chttp2/transport/frame_rst_stream.c',
- 'src/core/ext/transport/chttp2/transport/frame_settings.c',
- 'src/core/ext/transport/chttp2/transport/frame_window_update.c',
- 'src/core/ext/transport/chttp2/transport/hpack_encoder.c',
- 'src/core/ext/transport/chttp2/transport/hpack_parser.c',
- 'src/core/ext/transport/chttp2/transport/hpack_table.c',
- 'src/core/ext/transport/chttp2/transport/http2_settings.c',
- 'src/core/ext/transport/chttp2/transport/huffsyms.c',
- 'src/core/ext/transport/chttp2/transport/incoming_metadata.c',
- 'src/core/ext/transport/chttp2/transport/parsing.c',
- 'src/core/ext/transport/chttp2/transport/stream_lists.c',
- 'src/core/ext/transport/chttp2/transport/stream_map.c',
- 'src/core/ext/transport/chttp2/transport/varint.c',
- 'src/core/ext/transport/chttp2/transport/writing.c',
- 'src/core/ext/transport/chttp2/alpn/alpn.c',
- 'src/core/ext/filters/http/client/http_client_filter.c',
- 'src/core/ext/filters/http/http_filters_plugin.c',
- 'src/core/ext/filters/http/message_compress/message_compress_filter.c',
- 'src/core/ext/filters/http/server/http_server_filter.c',
- 'src/core/lib/http/httpcli_security_connector.c',
- 'src/core/lib/security/context/security_context.c',
- 'src/core/lib/security/credentials/composite/composite_credentials.c',
- 'src/core/lib/security/credentials/credentials.c',
- 'src/core/lib/security/credentials/credentials_metadata.c',
- 'src/core/lib/security/credentials/fake/fake_credentials.c',
- 'src/core/lib/security/credentials/google_default/credentials_generic.c',
- 'src/core/lib/security/credentials/google_default/google_default_credentials.c',
- 'src/core/lib/security/credentials/iam/iam_credentials.c',
- 'src/core/lib/security/credentials/jwt/json_token.c',
- 'src/core/lib/security/credentials/jwt/jwt_credentials.c',
- 'src/core/lib/security/credentials/jwt/jwt_verifier.c',
- 'src/core/lib/security/credentials/oauth2/oauth2_credentials.c',
- 'src/core/lib/security/credentials/plugin/plugin_credentials.c',
- 'src/core/lib/security/credentials/ssl/ssl_credentials.c',
- 'src/core/lib/security/transport/client_auth_filter.c',
- 'src/core/lib/security/transport/lb_targets_info.c',
- 'src/core/lib/security/transport/secure_endpoint.c',
- 'src/core/lib/security/transport/security_connector.c',
- 'src/core/lib/security/transport/security_handshaker.c',
- 'src/core/lib/security/transport/server_auth_filter.c',
- 'src/core/lib/security/transport/tsi_error.c',
- 'src/core/lib/security/util/json_util.c',
- 'src/core/lib/surface/init_secure.c',
- 'src/core/tsi/fake_transport_security.c',
- 'src/core/tsi/gts_transport_security.c',
- 'src/core/tsi/ssl_transport_security.c',
- 'src/core/tsi/transport_security_grpc.c',
- 'src/core/tsi/transport_security.c',
- 'src/core/tsi/transport_security_adapter.c',
- 'src/core/ext/transport/chttp2/server/chttp2_server.c',
- 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c',
- 'src/core/ext/filters/client_channel/channel_connectivity.c',
- 'src/core/ext/filters/client_channel/client_channel.c',
- 'src/core/ext/filters/client_channel/client_channel_factory.c',
- 'src/core/ext/filters/client_channel/client_channel_plugin.c',
- 'src/core/ext/filters/client_channel/connector.c',
- 'src/core/ext/filters/client_channel/http_connect_handshaker.c',
- 'src/core/ext/filters/client_channel/http_proxy.c',
- 'src/core/ext/filters/client_channel/lb_policy.c',
- 'src/core/ext/filters/client_channel/lb_policy_factory.c',
- 'src/core/ext/filters/client_channel/lb_policy_registry.c',
- 'src/core/ext/filters/client_channel/parse_address.c',
- 'src/core/ext/filters/client_channel/proxy_mapper.c',
- 'src/core/ext/filters/client_channel/proxy_mapper_registry.c',
- 'src/core/ext/filters/client_channel/resolver.c',
- 'src/core/ext/filters/client_channel/resolver_factory.c',
- 'src/core/ext/filters/client_channel/resolver_registry.c',
- 'src/core/ext/filters/client_channel/retry_throttle.c',
- 'src/core/ext/filters/client_channel/subchannel.c',
- 'src/core/ext/filters/client_channel/subchannel_index.c',
- 'src/core/ext/filters/client_channel/uri_parser.c',
- 'src/core/ext/filters/deadline/deadline_filter.c',
- 'src/core/ext/transport/chttp2/client/chttp2_connector.c',
- 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c',
- 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c',
- 'src/core/ext/transport/chttp2/client/insecure/channel_create.c',
- 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c',
- 'src/core/ext/transport/inproc/inproc_plugin.c',
- 'src/core/ext/transport/inproc/inproc_transport.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c',
- 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c',
+ 'src/core/lib/surface/metadata_array.cc',
+ 'src/core/lib/surface/server.cc',
+ 'src/core/lib/surface/validate_metadata.cc',
+ 'src/core/lib/surface/version.cc',
+ 'src/core/lib/transport/bdp_estimator.cc',
+ 'src/core/lib/transport/byte_stream.cc',
+ 'src/core/lib/transport/connectivity_state.cc',
+ 'src/core/lib/transport/error_utils.cc',
+ 'src/core/lib/transport/metadata.cc',
+ 'src/core/lib/transport/metadata_batch.cc',
+ 'src/core/lib/transport/pid_controller.cc',
+ 'src/core/lib/transport/service_config.cc',
+ 'src/core/lib/transport/static_metadata.cc',
+ 'src/core/lib/transport/status_conversion.cc',
+ 'src/core/lib/transport/timeout_encoding.cc',
+ 'src/core/lib/transport/transport.cc',
+ 'src/core/lib/transport/transport_op_string.cc',
+ 'src/core/lib/debug/trace.cc',
+ 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc',
+ 'src/core/ext/transport/chttp2/transport/bin_decoder.cc',
+ 'src/core/ext/transport/chttp2/transport/bin_encoder.cc',
+ 'src/core/ext/transport/chttp2/transport/chttp2_plugin.cc',
+ 'src/core/ext/transport/chttp2/transport/chttp2_transport.cc',
+ 'src/core/ext/transport/chttp2/transport/flow_control.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_data.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_goaway.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_ping.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_rst_stream.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_settings.cc',
+ 'src/core/ext/transport/chttp2/transport/frame_window_update.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_encoder.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_parser.cc',
+ 'src/core/ext/transport/chttp2/transport/hpack_table.cc',
+ 'src/core/ext/transport/chttp2/transport/http2_settings.cc',
+ 'src/core/ext/transport/chttp2/transport/huffsyms.cc',
+ 'src/core/ext/transport/chttp2/transport/incoming_metadata.cc',
+ 'src/core/ext/transport/chttp2/transport/parsing.cc',
+ 'src/core/ext/transport/chttp2/transport/stream_lists.cc',
+ 'src/core/ext/transport/chttp2/transport/stream_map.cc',
+ 'src/core/ext/transport/chttp2/transport/varint.cc',
+ 'src/core/ext/transport/chttp2/transport/writing.cc',
+ 'src/core/ext/transport/chttp2/alpn/alpn.cc',
+ 'src/core/ext/filters/http/client/http_client_filter.cc',
+ 'src/core/ext/filters/http/http_filters_plugin.cc',
+ 'src/core/ext/filters/http/message_compress/message_compress_filter.cc',
+ 'src/core/ext/filters/http/server/http_server_filter.cc',
+ 'src/core/lib/http/httpcli_security_connector.cc',
+ 'src/core/lib/security/context/security_context.cc',
+ 'src/core/lib/security/credentials/composite/composite_credentials.cc',
+ 'src/core/lib/security/credentials/credentials.cc',
+ 'src/core/lib/security/credentials/credentials_metadata.cc',
+ 'src/core/lib/security/credentials/fake/fake_credentials.cc',
+ 'src/core/lib/security/credentials/google_default/credentials_generic.cc',
+ 'src/core/lib/security/credentials/google_default/google_default_credentials.cc',
+ 'src/core/lib/security/credentials/iam/iam_credentials.cc',
+ 'src/core/lib/security/credentials/jwt/json_token.cc',
+ 'src/core/lib/security/credentials/jwt/jwt_credentials.cc',
+ 'src/core/lib/security/credentials/jwt/jwt_verifier.cc',
+ 'src/core/lib/security/credentials/oauth2/oauth2_credentials.cc',
+ 'src/core/lib/security/credentials/plugin/plugin_credentials.cc',
+ 'src/core/lib/security/credentials/ssl/ssl_credentials.cc',
+ 'src/core/lib/security/transport/client_auth_filter.cc',
+ 'src/core/lib/security/transport/lb_targets_info.cc',
+ 'src/core/lib/security/transport/secure_endpoint.cc',
+ 'src/core/lib/security/transport/security_connector.cc',
+ 'src/core/lib/security/transport/security_handshaker.cc',
+ 'src/core/lib/security/transport/server_auth_filter.cc',
+ '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/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',
+ 'src/core/tsi/transport_security_adapter.cc',
+ 'src/core/ext/transport/chttp2/server/chttp2_server.cc',
+ 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc',
+ 'src/core/ext/filters/client_channel/channel_connectivity.cc',
+ 'src/core/ext/filters/client_channel/client_channel.cc',
+ 'src/core/ext/filters/client_channel/client_channel_factory.cc',
+ 'src/core/ext/filters/client_channel/client_channel_plugin.cc',
+ 'src/core/ext/filters/client_channel/connector.cc',
+ 'src/core/ext/filters/client_channel/http_connect_handshaker.cc',
+ 'src/core/ext/filters/client_channel/http_proxy.cc',
+ 'src/core/ext/filters/client_channel/lb_policy.cc',
+ 'src/core/ext/filters/client_channel/lb_policy_factory.cc',
+ 'src/core/ext/filters/client_channel/lb_policy_registry.cc',
+ 'src/core/ext/filters/client_channel/parse_address.cc',
+ 'src/core/ext/filters/client_channel/proxy_mapper.cc',
+ 'src/core/ext/filters/client_channel/proxy_mapper_registry.cc',
+ 'src/core/ext/filters/client_channel/resolver.cc',
+ 'src/core/ext/filters/client_channel/resolver_factory.cc',
+ 'src/core/ext/filters/client_channel/resolver_registry.cc',
+ 'src/core/ext/filters/client_channel/retry_throttle.cc',
+ 'src/core/ext/filters/client_channel/subchannel.cc',
+ 'src/core/ext/filters/client_channel/subchannel_index.cc',
+ 'src/core/ext/filters/client_channel/uri_parser.cc',
+ 'src/core/ext/filters/deadline/deadline_filter.cc',
+ 'src/core/ext/transport/chttp2/client/chttp2_connector.cc',
+ 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc',
+ 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc',
+ 'src/core/ext/transport/chttp2/client/insecure/channel_create.cc',
+ 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc',
+ 'src/core/ext/transport/inproc/inproc_plugin.cc',
+ 'src/core/ext/transport/inproc/inproc_transport.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc',
'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c',
'third_party/nanopb/pb_common.c',
'third_party/nanopb/pb_decode.c',
'third_party/nanopb/pb_encode.c',
- 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c',
- 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c',
- 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c',
- 'src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c',
- 'src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c',
- 'src/core/ext/filters/load_reporting/server_load_reporting_filter.c',
- 'src/core/ext/filters/load_reporting/server_load_reporting_plugin.c',
- 'src/core/ext/census/base_resources.c',
- 'src/core/ext/census/context.c',
+ 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc',
+ 'src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc',
+ 'src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc',
+ 'src/core/ext/filters/load_reporting/server_load_reporting_filter.cc',
+ 'src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc',
+ 'src/core/ext/census/base_resources.cc',
+ 'src/core/ext/census/context.cc',
'src/core/ext/census/gen/census.pb.c',
'src/core/ext/census/gen/trace_context.pb.c',
- 'src/core/ext/census/grpc_context.c',
- 'src/core/ext/census/grpc_filter.c',
- 'src/core/ext/census/grpc_plugin.c',
- 'src/core/ext/census/initialize.c',
- 'src/core/ext/census/intrusive_hash_map.c',
- 'src/core/ext/census/mlog.c',
- 'src/core/ext/census/operation.c',
- 'src/core/ext/census/placeholders.c',
- 'src/core/ext/census/resource.c',
- 'src/core/ext/census/trace_context.c',
- 'src/core/ext/census/tracing.c',
- 'src/core/ext/filters/max_age/max_age_filter.c',
- 'src/core/ext/filters/message_size/message_size_filter.c',
- 'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c',
- 'src/core/ext/filters/workarounds/workaround_utils.c',
- 'src/core/plugin_registry/grpc_plugin_registry.c',
+ 'src/core/ext/census/grpc_context.cc',
+ 'src/core/ext/census/grpc_filter.cc',
+ 'src/core/ext/census/grpc_plugin.cc',
+ 'src/core/ext/census/initialize.cc',
+ 'src/core/ext/census/intrusive_hash_map.cc',
+ 'src/core/ext/census/mlog.cc',
+ 'src/core/ext/census/operation.cc',
+ 'src/core/ext/census/placeholders.cc',
+ 'src/core/ext/census/resource.cc',
+ 'src/core/ext/census/trace_context.cc',
+ 'src/core/ext/census/tracing.cc',
+ 'src/core/ext/filters/max_age/max_age_filter.cc',
+ 'src/core/ext/filters/message_size/message_size_filter.cc',
+ 'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc',
+ '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',
diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py
index 3194a893d7..61c4157375 100644
--- a/src/python/grpcio/grpc_version.py
+++ b/src/python/grpcio/grpc_version.py
@@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!!
-VERSION='1.7.0.dev0'
+VERSION='1.8.0.dev0'
diff --git a/src/python/grpcio/support.py b/src/python/grpcio/support.py
index 510bf422a0..f2395eb26c 100644
--- a/src/python/grpcio/support.py
+++ b/src/python/grpcio/support.py
@@ -94,7 +94,7 @@ def diagnose_attribute_error(build_ext, error):
_ERROR_DIAGNOSES = {
errors.CompileError: diagnose_compile_error,
- AttributeError: diagnose_attribute_error
+ AttributeError: diagnose_attribute_error,
}
@@ -102,8 +102,10 @@ def diagnose_build_ext_error(build_ext, error, formatted):
diagnostic = _ERROR_DIAGNOSES.get(type(error))
if diagnostic is None:
raise commands.CommandError(
- "\n\nWe could not diagnose your build failure. Please file an issue at "
- "http://www.github.com/grpc/grpc with `[Python install]` in the title."
- "\n\n{}".format(formatted))
+ "\n\nWe could not diagnose your build failure. If you are unable to "
+ "proceed, please file an issue at http://www.github.com/grpc/grpc "
+ "with `[Python install]` in the title; please attach the whole log "
+ "(including everything that may have appeared above the Python "
+ "backtrace).\n\n{}".format(formatted))
else:
diagnostic(build_ext, error)
diff --git a/src/python/grpcio_health_checking/grpc_version.py b/src/python/grpcio_health_checking/grpc_version.py
index ef68bad17a..889297f020 100644
--- a/src/python/grpcio_health_checking/grpc_version.py
+++ b/src/python/grpcio_health_checking/grpc_version.py
@@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_health_checking/grpc_version.py.template`!!!
-VERSION='1.7.0.dev0'
+VERSION='1.8.0.dev0'
diff --git a/src/python/grpcio_reflection/grpc_version.py b/src/python/grpcio_reflection/grpc_version.py
index 55ab959cc5..192f4cc217 100644
--- a/src/python/grpcio_reflection/grpc_version.py
+++ b/src/python/grpcio_reflection/grpc_version.py
@@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_reflection/grpc_version.py.template`!!!
-VERSION='1.7.0.dev0'
+VERSION='1.8.0.dev0'
diff --git a/src/python/grpcio_testing/grpc_version.py b/src/python/grpcio_testing/grpc_version.py
index 592d08efc3..83470c2825 100644
--- a/src/python/grpcio_testing/grpc_version.py
+++ b/src/python/grpcio_testing/grpc_version.py
@@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_testing/grpc_version.py.template`!!!
-VERSION='1.7.0.dev0'
+VERSION='1.8.0.dev0'
diff --git a/src/python/grpcio_tests/grpc_version.py b/src/python/grpcio_tests/grpc_version.py
index 9e54dc9f75..7065edd3bf 100644
--- a/src/python/grpcio_tests/grpc_version.py
+++ b/src/python/grpcio_tests/grpc_version.py
@@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_tests/grpc_version.py.template`!!!
-VERSION='1.7.0.dev0'
+VERSION='1.8.0.dev0'
diff --git a/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py b/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py
index 9f72b1fcb5..6faab94be6 100644
--- a/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py
+++ b/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py
@@ -29,7 +29,7 @@ _SERIALIZED_RESPONSE = b'\x49\x50\x51'
_REQUEST_SERIALIZER = lambda unused_request: _SERIALIZED_REQUEST
_REQUEST_DESERIALIZER = lambda unused_serialized_request: object()
_RESPONSE_SERIALIZER = lambda unused_response: _SERIALIZED_RESPONSE
-_RESPONSE_DESERIALIZER = lambda unused_serialized_resopnse: object()
+_RESPONSE_DESERIALIZER = lambda unused_serialized_response: object()
_SERVICE = 'test.TestService'
_UNARY_UNARY = 'UnaryUnary'
diff --git a/src/ruby/end2end/load_grpc_with_gc_stress_driver.rb b/src/ruby/end2end/load_grpc_with_gc_stress_driver.rb
new file mode 100755
index 0000000000..3668b95a05
--- /dev/null
+++ b/src/ruby/end2end/load_grpc_with_gc_stress_driver.rb
@@ -0,0 +1,32 @@
+#!/usr/bin/env ruby
+#
+# Copyright 2016 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.
+
+this_dir = File.expand_path(File.dirname(__FILE__))
+protos_lib_dir = File.join(this_dir, 'lib')
+grpc_lib_dir = File.join(File.dirname(this_dir), 'lib')
+$LOAD_PATH.unshift(grpc_lib_dir) unless $LOAD_PATH.include?(grpc_lib_dir)
+$LOAD_PATH.unshift(protos_lib_dir) unless $LOAD_PATH.include?(protos_lib_dir)
+$LOAD_PATH.unshift(this_dir) unless $LOAD_PATH.include?(this_dir)
+
+GC.stress = 0x04
+
+require 'grpc'
+
+GRPC::Core::Channel.new('dummy_host', nil, :this_channel_is_insecure)
+GRPC::Core::Server.new({})
+GRPC::Core::ChannelCredentials.new
+GRPC::Core::CallCredentials.new(proc { |noop| noop })
+GRPC::Core::CompressionOptions.new
diff --git a/src/ruby/ext/grpc/rb_call.c b/src/ruby/ext/grpc/rb_call.c
index 5550bb7d5f..29c4a94816 100644
--- a/src/ruby/ext/grpc/rb_call.c
+++ b/src/ruby/ext/grpc/rb_call.c
@@ -101,6 +101,7 @@ static void grpc_rb_call_destroy(void *p) {
return;
}
destroy_call((grpc_rb_call *)p);
+ xfree(p);
}
static size_t md_ary_datasize(const void *p) {
diff --git a/src/ruby/ext/grpc/rb_call_credentials.c b/src/ruby/ext/grpc/rb_call_credentials.c
index 049a869bdc..4214a0811b 100644
--- a/src/ruby/ext/grpc/rb_call_credentials.c
+++ b/src/ruby/ext/grpc/rb_call_credentials.c
@@ -112,9 +112,12 @@ static void grpc_rb_call_credentials_callback_with_gil(void *param) {
gpr_free(params);
}
-static void grpc_rb_call_credentials_plugin_get_metadata(
+static int grpc_rb_call_credentials_plugin_get_metadata(
void *state, grpc_auth_metadata_context context,
- grpc_credentials_plugin_metadata_cb cb, void *user_data) {
+ grpc_credentials_plugin_metadata_cb cb, void *user_data,
+ grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
+ size_t *num_creds_md, grpc_status_code *status,
+ const char **error_details) {
callback_params *params = gpr_malloc(sizeof(callback_params));
params->get_metadata = (VALUE)state;
params->context = context;
@@ -123,6 +126,7 @@ static void grpc_rb_call_credentials_plugin_get_metadata(
grpc_rb_event_queue_enqueue(grpc_rb_call_credentials_callback_with_gil,
(void *)(params));
+ return 0; // Async return.
}
static void grpc_rb_call_credentials_plugin_destroy(void *state) {
diff --git a/src/ruby/ext/grpc/rb_grpc.c b/src/ruby/ext/grpc/rb_grpc.c
index 933a3ac152..b53f09edec 100644
--- a/src/ruby/ext/grpc/rb_grpc.c
+++ b/src/ruby/ext/grpc/rb_grpc.c
@@ -315,8 +315,8 @@ void Init_grpc_c() {
return;
}
- bg_thread_init_rb_mu = rb_mutex_new();
rb_global_variable(&bg_thread_init_rb_mu);
+ bg_thread_init_rb_mu = rb_mutex_new();
grpc_rb_mGRPC = rb_define_module("GRPC");
grpc_rb_mGrpcCore = rb_define_module_under(grpc_rb_mGRPC, "Core");
diff --git a/src/ruby/lib/grpc/google_rpc_status_utils.rb b/src/ruby/lib/grpc/google_rpc_status_utils.rb
index fdadd6b76e..f253b082b6 100644
--- a/src/ruby/lib/grpc/google_rpc_status_utils.rb
+++ b/src/ruby/lib/grpc/google_rpc_status_utils.rb
@@ -19,10 +19,17 @@ require 'google/rpc/status_pb'
module GRPC
# GoogleRpcStatusUtils provides utilities to convert between a
# GRPC::Core::Status and a deserialized Google::Rpc::Status proto
+ # Returns nil if the grpc-status-details-bin trailer could not be
+ # converted to a GoogleRpcStatus due to the server not providing
+ # the necessary trailers.
+ # Raises an error if the server did provide the necessary trailers
+ # but they fail to deseriliaze into a GoogleRpcStatus protobuf.
class GoogleRpcStatusUtils
def self.extract_google_rpc_status(status)
fail ArgumentError, 'bad type' unless status.is_a? Struct::Status
- Google::Rpc::Status.decode(status.metadata['grpc-status-details-bin'])
+ grpc_status_details_bin_trailer = 'grpc-status-details-bin'
+ return nil if status.metadata[grpc_status_details_bin_trailer].nil?
+ Google::Rpc::Status.decode(status.metadata[grpc_status_details_bin_trailer])
end
end
end
diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb
index 228c01a92c..3001579ce7 100644
--- a/src/ruby/lib/grpc/version.rb
+++ b/src/ruby/lib/grpc/version.rb
@@ -14,5 +14,5 @@
# GRPC contains the General RPC module.
module GRPC
- VERSION = '1.7.0.dev'
+ VERSION = '1.8.0.dev'
end
diff --git a/src/ruby/qps/proxy-worker.rb b/src/ruby/qps/proxy-worker.rb
index 488610ae74..ae7006e7d6 100755
--- a/src/ruby/qps/proxy-worker.rb
+++ b/src/ruby/qps/proxy-worker.rb
@@ -31,8 +31,9 @@ require 'src/proto/grpc/testing/services_services_pb'
require 'src/proto/grpc/testing/proxy-service_services_pb'
class ProxyBenchmarkClientServiceImpl < Grpc::Testing::ProxyClientService::Service
- def initialize(port)
+ def initialize(port, c_ext)
@mytarget = "localhost:" + port.to_s
+ @use_c_ext = c_ext
end
def setup(config)
@config = config
@@ -41,7 +42,13 @@ class ProxyBenchmarkClientServiceImpl < Grpc::Testing::ProxyClientService::Servi
@histogram = Histogram.new(@histres, @histmax)
@start_time = Time.now
# TODO(vjpai): Support multiple client channels by spawning off a PHP client per channel
- command = "php -d extension=" + File.expand_path(File.dirname(__FILE__)) + "/../../php/ext/grpc/modules/grpc.so " + File.expand_path(File.dirname(__FILE__)) + "/../../php/tests/qps/client.php " + @mytarget
+ if @use_c_ext
+ puts "Use protobuf c extension"
+ command = "php -d extension=" + File.expand_path(File.dirname(__FILE__)) + "/../../php/tests/qps/vendor/google/protobuf/php/ext/google/protobuf/modules/protobuf.so " + "-d extension=" + File.expand_path(File.dirname(__FILE__)) + "/../../php/ext/grpc/modules/grpc.so " + File.expand_path(File.dirname(__FILE__)) + "/../../php/tests/qps/client.php " + @mytarget
+ else
+ puts "Use protobuf php extension"
+ command = "php -d extension=" + File.expand_path(File.dirname(__FILE__)) + "/../../php/ext/grpc/modules/grpc.so " + File.expand_path(File.dirname(__FILE__)) + "/../../php/tests/qps/client.php " + @mytarget
+ end
puts "Starting command: " + command
@php_pid = spawn(command)
end
@@ -128,6 +135,9 @@ def proxymain
opts.on('--driver_port PORT', '<port>') do |v|
options['driver_port'] = v
end
+ opts.on("-c", "--[no-]c_proto_ext", "Use protobuf C-extention") do |c|
+ options[:c_ext] = c
+ end
end.parse!
# Configure any errors with client or server child threads to surface
@@ -136,7 +146,7 @@ def proxymain
s = GRPC::RpcServer.new
port = s.add_http2_port("0.0.0.0:" + options['driver_port'].to_s,
:this_port_is_insecure)
- bmc = ProxyBenchmarkClientServiceImpl.new(port)
+ bmc = ProxyBenchmarkClientServiceImpl.new(port, options[:c_ext])
s.handle(bmc)
s.handle(ProxyWorkerServiceImpl.new(s, bmc))
s.run
diff --git a/src/ruby/spec/google_rpc_status_utils_spec.rb b/src/ruby/spec/google_rpc_status_utils_spec.rb
index fe221c30dd..6f2a06b1d9 100644
--- a/src/ruby/spec/google_rpc_status_utils_spec.rb
+++ b/src/ruby/spec/google_rpc_status_utils_spec.rb
@@ -31,12 +31,11 @@ describe 'conversion from a status struct to a google protobuf status' do
expect(exception.message.include?('bad type')).to be true
end
- it 'fails with some error if the header key is missing' do
+ it 'returns nil if the header key is missing' do
status = Struct::Status.new(1, 'details', key: 'val')
expect(status.metadata.nil?).to be false
- expect do
- GRPC::GoogleRpcStatusUtils.extract_google_rpc_status(status)
- end.to raise_error(StandardError)
+ expect(GRPC::GoogleRpcStatusUtils.extract_google_rpc_status(
+ status)).to be(nil)
end
it 'fails with some error if the header key fails to deserialize' do
@@ -221,3 +220,73 @@ describe 'receving a google rpc status from a remote endpoint' do
status_from_exception)).to eq(rpc_status)
end
end
+
+# A test service that fails without explicitly setting the
+# grpc-status-details-bin trailer. Tests assumptions about value
+# of grpc-status-details-bin on the client side when the trailer wasn't
+# set explicitly.
+class NoStatusDetailsBinTestService
+ include GRPC::GenericService
+ rpc :an_rpc, EchoMsg, EchoMsg
+
+ def an_rpc(_, _)
+ fail GRPC::Unknown
+ end
+end
+
+NoStatusDetailsBinTestServiceStub = NoStatusDetailsBinTestService.rpc_stub_class
+
+describe 'when the endpoint doesnt send grpc-status-details-bin' do
+ def start_server
+ @srv = GRPC::RpcServer.new(pool_size: 1)
+ @server_port = @srv.add_http2_port('localhost:0',
+ :this_port_is_insecure)
+ @srv.handle(NoStatusDetailsBinTestService)
+ @server_thd = Thread.new { @srv.run }
+ @srv.wait_till_running
+ end
+
+ def stop_server
+ expect(@srv.stopped?).to be(false)
+ @srv.stop
+ @server_thd.join
+ expect(@srv.stopped?).to be(true)
+ end
+
+ before(:each) do
+ start_server
+ end
+
+ after(:each) do
+ stop_server
+ end
+
+ it 'should receive nil when we extract try to extract a google '\
+ 'rpc status from a BadStatus exception that didnt have it' do
+ stub = NoStatusDetailsBinTestServiceStub.new("localhost:#{@server_port}",
+ :this_channel_is_insecure)
+ begin
+ stub.an_rpc(EchoMsg.new)
+ rescue GRPC::Unknown => e
+ rpc_status = GRPC::GoogleRpcStatusUtils.extract_google_rpc_status(
+ e.to_status)
+ end
+ expect(rpc_status).to be(nil)
+ end
+
+ it 'should receive nil when we extract try to extract a google '\
+ 'rpc status from an op views status object that didnt have it' do
+ stub = NoStatusDetailsBinTestServiceStub.new("localhost:#{@server_port}",
+ :this_channel_is_insecure)
+ op = stub.an_rpc(EchoMsg.new, return_op: true)
+ begin
+ op.execute
+ rescue GRPC::Unknown => e
+ status_from_exception = e.to_status
+ end
+ expect(GRPC::GoogleRpcStatusUtils.extract_google_rpc_status(
+ status_from_exception)).to be(nil)
+ expect(GRPC::GoogleRpcStatusUtils.extract_google_rpc_status(
+ op.status)).to be nil
+ end
+end
diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb
index ea0c4ae56c..c584a7cf59 100644
--- a/src/ruby/tools/version.rb
+++ b/src/ruby/tools/version.rb
@@ -14,6 +14,6 @@
module GRPC
module Tools
- VERSION = '1.7.0.dev'
+ VERSION = '1.8.0.dev'
end
end
diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template
index 6077f8098d..f3ac30c08d 100644
--- a/templates/gRPC-Core.podspec.template
+++ b/templates/gRPC-Core.podspec.template
@@ -31,11 +31,19 @@
return [f for f in out if not f.startswith("third_party/nanopb/")]
def grpc_public_headers(libs):
+ excluded_files = ["include/grpc/support/atm_gcc_sync.h",
+ "include/grpc/support/atm_windows.h",
+ "include/grpc/support/sync_windows.h",
+ "include/grpc/support/tls_gcc.h",
+ "include/grpc/support/tls_msvc.h",
+ "include/grpc/impl/codegen/atm_gcc_sync.h",
+ "include/grpc/impl/codegen/atm_windows.h",
+ "include/grpc/impl/codegen/sync_windows.h"]
out = []
for lib in libs:
if lib.name in ("grpc", "gpr"):
out += lib.get('public_headers', [])
- return out
+ return [f for f in out if not f in excluded_files]
def grpc_private_headers(libs):
out = []
@@ -111,6 +119,7 @@
# build.
'USE_HEADERMAP' => 'NO',
'ALWAYS_SEARCH_USER_PATHS' => 'NO',
+ 'GCC_PREPROCESSOR_DEFINITIONS' => '"$(inherited)" "COCOAPODS=1" "PB_NO_PACKED_STRUCTS=1"',
}
s.default_subspecs = 'Interface', 'Implementation'
@@ -156,8 +165,8 @@
ss.dependency "#{s.name}/Implementation", version
ss.dependency "#{s.name}/Cronet-Interface", version
- ss.source_files = 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.c',
- 'src/core/ext/transport/cronet/transport/cronet_transport.{c,h}',
+ ss.source_files = 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc',
+ 'src/core/ext/transport/cronet/transport/cronet_transport.{cc,h}',
'third_party/objective_c/Cronet/bidirectional_stream_c.h'
end
diff --git a/templates/include/grpc/module.modulemap.template b/templates/include/grpc/module.modulemap.template
new file mode 100644
index 0000000000..8edc4b56ac
--- /dev/null
+++ b/templates/include/grpc/module.modulemap.template
@@ -0,0 +1,32 @@
+%YAML 1.2
+--- |
+ <%!
+ def grpc_public_headers_no_dir(libs):
+ excluded_files = ["include/grpc/support/atm_gcc_sync.h",
+ "include/grpc/support/atm_windows.h",
+ "include/grpc/support/sync_windows.h",
+ "include/grpc/support/tls_gcc.h",
+ "include/grpc/support/tls_msvc.h",
+ "include/grpc/impl/codegen/atm_gcc_sync.h",
+ "include/grpc/impl/codegen/atm_windows.h",
+ "include/grpc/impl/codegen/sync_windows.h"]
+ out = []
+ for lib in libs:
+ if lib.name in ("grpc", "gpr"):
+ out += lib.get('public_headers', [])
+ out = [f for f in out if f not in excluded_files]
+ out = [hdr.split('/', 2)[2] for hdr in out]
+ return out
+
+ def header_lines(files):
+ return ('\n ').join('header "%s"' % f for f in files)
+ %>
+ framework module grpc {
+ umbrella header "grpc.h"
+
+ ${header_lines(grpc_public_headers_no_dir(libs))}
+
+ export *
+ module * { export * }
+ }
+
diff --git a/templates/src/core/lib/surface/version.c.template b/templates/src/core/lib/surface/version.cc.template
index d2efa565e5..d2efa565e5 100644
--- a/templates/src/core/lib/surface/version.c.template
+++ b/templates/src/core/lib/surface/version.cc.template
diff --git a/templates/src/core/plugin_registry.template b/templates/src/core/plugin_registry.template
index cf0f4f523e..8d7617129f 100644
--- a/templates/src/core/plugin_registry.template
+++ b/templates/src/core/plugin_registry.template
@@ -2,7 +2,7 @@
---
foreach: libs
cond: selected.get('generate_plugin_registry', False)
-output_name: ${selected.name}_plugin_registry.c
+output_name: ${selected.name}_plugin_registry.cc
template: |
/*
*
@@ -25,8 +25,8 @@ template: |
#include <grpc/grpc.h>
%for plugin in selected.plugins:
- extern void ${plugin}_init(void);
- extern void ${plugin}_shutdown(void);
+ extern "C" void ${plugin}_init(void);
+ extern "C" void ${plugin}_shutdown(void);
%endfor
void grpc_register_built_in_plugins(void) {
diff --git a/templates/test/cpp/naming/create_private_dns_zone.sh.template b/templates/test/cpp/naming/create_private_dns_zone.sh.template
new file mode 100644
index 0000000000..14324b098c
--- /dev/null
+++ b/templates/test/cpp/naming/create_private_dns_zone.sh.template
@@ -0,0 +1,4 @@
+%YAML 1.2
+--- |
+ <%namespace file="create_private_dns_zone_defs.include" import="*"/>\
+ ${create_private_dns_zone(resolver_gce_integration_tests_zone_id, resolver_tests_common_zone_name)}
diff --git a/templates/test/cpp/naming/create_private_dns_zone_defs.include b/templates/test/cpp/naming/create_private_dns_zone_defs.include
new file mode 100644
index 0000000000..465dd6394b
--- /dev/null
+++ b/templates/test/cpp/naming/create_private_dns_zone_defs.include
@@ -0,0 +1,32 @@
+<%def name="create_private_dns_zone(resolver_gce_integration_tests_zone_id, resolver_tests_common_zone_name)">#!/bin/bash
+# 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.
+
+# This file is auto-generated
+
+set -ex
+
+cd $(dirname $0)/../../..
+
+gcloud alpha dns managed-zones create \\
+
+ ${resolver_gce_integration_tests_zone_id} \\
+
+ --dns-name=${resolver_tests_common_zone_name} \\
+
+ --description="GCE-DNS-private-zone-for-GRPC-testing" \\
+
+ --visibility=private \\
+
+ --networks=default</%def>
diff --git a/templates/test/cpp/naming/private_dns_zone_init.sh.template b/templates/test/cpp/naming/private_dns_zone_init.sh.template
new file mode 100644
index 0000000000..d5ffd04add
--- /dev/null
+++ b/templates/test/cpp/naming/private_dns_zone_init.sh.template
@@ -0,0 +1,4 @@
+%YAML 1.2
+--- |
+ <%namespace file="private_dns_zone_init_defs.include" import="*"/>\
+ ${private_dns_zone_init(all_integration_test_records, resolver_gce_integration_tests_zone_id, resolver_tests_common_zone_name)}
diff --git a/templates/test/cpp/naming/private_dns_zone_init_defs.include b/templates/test/cpp/naming/private_dns_zone_init_defs.include
new file mode 100644
index 0000000000..06bc8adb94
--- /dev/null
+++ b/templates/test/cpp/naming/private_dns_zone_init_defs.include
@@ -0,0 +1,40 @@
+<%def name="private_dns_zone_init(records,resolver_gce_integration_tests_zone_id,resolver_tests_common_zone_name)">#!/bin/bash
+# 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.
+
+# This file is auto-generated
+
+set -ex
+
+cd $(dirname $0)/../../..
+
+gcloud dns record-sets transaction start -z=${resolver_gce_integration_tests_zone_id}
+
+% for r in records:
+gcloud dns record-sets transaction add \\
+
+ -z=${resolver_gce_integration_tests_zone_id} \\
+
+ --name=${r['name']}.${resolver_tests_common_zone_name} \\
+
+ --type=${r['type']} \\
+
+ --ttl=${r['ttl']} \\
+
+ ${r['data']}
+
+% endfor
+gcloud dns record-sets transaction describe -z=${resolver_gce_integration_tests_zone_id}
+gcloud dns record-sets transaction execute -z=${resolver_gce_integration_tests_zone_id}
+gcloud dns record-sets list -z=${resolver_gce_integration_tests_zone_id}</%def>
diff --git a/templates/test/cpp/naming/resolver_gce_integration_tests_defs.include b/templates/test/cpp/naming/resolver_gce_integration_tests_defs.include
new file mode 100644
index 0000000000..2413ec57d0
--- /dev/null
+++ b/templates/test/cpp/naming/resolver_gce_integration_tests_defs.include
@@ -0,0 +1,64 @@
+<%def name="resolver_gce_integration_tests(tests, records, resolver_tests_common_zone_name)">#!/bin/bash
+# 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.
+
+# This file is auto-generated
+
+set -ex
+
+if [[ "$GRPC_DNS_RESOLVER" == "" ]]; then
+ export GRPC_DNS_RESOLVER=ares
+elif [[ "$GRPC_DNS_RESOLVER" != ares ]]; then
+ echo "Unexpected: GRPC_DNS_RESOLVER=$GRPC_DNS_RESOLVER. This test only works with c-ares resolver"
+ exit 1
+fi
+
+cd $(dirname $0)/../../..
+
+if [[ "$CONFIG" == "" ]]; then
+ export CONFIG=opt
+fi
+make resolver_component_test
+echo "Sanity check DNS records are resolveable with dig:"
+EXIT_CODE=0
+
+% for r in records:
+ONE_FAILED=0
+dig ${r['type']} ${r['name']}.${resolver_tests_common_zone_name} | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig ${r['type']} ${r['name']}.${resolver_tests_common_zone_name} FAILED"
+ exit 1
+fi
+
+% endfor
+echo "Sanity check PASSED. Run resolver tests:"
+
+% for test in tests:
+ONE_FAILED=0
+bins/$CONFIG/resolver_component_test \\
+
+ --target_name='${test['target_name']}' \\
+
+ --expected_addrs='${test['expected_addrs']}' \\
+
+ --expected_chosen_service_config='${test['expected_chosen_service_config']}' \\
+
+ --expected_lb_policy='${test['expected_lb_policy']}' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Test based on target record: ${test['target_name']} FAILED"
+ EXIT_CODE=1
+fi
+
+% endfor
+exit $EXIT_CODE</%def>
diff --git a/templates/test/cpp/naming/resolver_gce_integration_tests_runner.sh.template b/templates/test/cpp/naming/resolver_gce_integration_tests_runner.sh.template
new file mode 100644
index 0000000000..c728784d29
--- /dev/null
+++ b/templates/test/cpp/naming/resolver_gce_integration_tests_runner.sh.template
@@ -0,0 +1,4 @@
+%YAML 1.2
+--- |
+ <%namespace file="resolver_gce_integration_tests_defs.include" import="*"/>\
+ ${resolver_gce_integration_tests(resolver_gce_integration_test_cases, all_integration_test_records, resolver_tests_common_zone_name)}
diff --git a/templates/tools/dockerfile/python_deps.include b/templates/tools/dockerfile/python_deps.include
index 94b854ad21..bf1f57f267 100644
--- a/templates/tools/dockerfile/python_deps.include
+++ b/templates/tools/dockerfile/python_deps.include
@@ -9,6 +9,6 @@ RUN apt-get update && apt-get install -y ${'\\'}
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/templates/tools/dockerfile/test/multilang_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/multilang_jessie_x64/Dockerfile.template
index 6cad474a20..0d47aa91f3 100644
--- a/templates/tools/dockerfile/test/multilang_jessie_x64/Dockerfile.template
+++ b/templates/tools/dockerfile/test/multilang_jessie_x64/Dockerfile.template
@@ -19,6 +19,7 @@
<%include file="../../apt_get_basic.include"/>
<%include file="../../gcp_api_libraries.include"/>
<%include file="../../csharp_deps.include"/>
+ <%include file="../../csharp_dotnetcli_deps.include"/>
<%include file="../../cxx_deps.include"/>
<%include file="../../node_deps.include"/>
<%include file="../../php_deps.include"/>
diff --git a/templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template
index aa34a694fb..af85a54235 100644
--- a/templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template
+++ b/templates/tools/dockerfile/test/node_jessie_x64/Dockerfile.template
@@ -32,5 +32,8 @@
<%include file="../../python_deps.include"/>
<%include file="../../node_deps.include"/>
<%include file="../../run_tests_addons.include"/>
+ # Install Mako to generate files in grpc/grpc-node
+ RUN pip install Mako
+
# Define the default command.
CMD ["bash"]
diff --git a/test/core/backoff/BUILD b/test/core/backoff/BUILD
new file mode 100644
index 0000000000..4ae762007c
--- /dev/null
+++ b/test/core/backoff/BUILD
@@ -0,0 +1,36 @@
+# Copyright 2016 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.
+
+load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary")
+
+licenses(["notice"]) # Apache v2
+
+package(
+ features = [
+ "-layering_check",
+ "-parse_headers",
+ ],
+)
+
+grpc_cc_test(
+ name = "backoff_test",
+ srcs = ["backoff_test.c"],
+ language = "C",
+ deps = [
+ "//:grpc",
+ "//test/core/util:grpc_test_util",
+ "//:gpr",
+ "//test/core/util:gpr_test_util",
+ ],
+)
diff --git a/test/core/backoff/backoff_test.c b/test/core/backoff/backoff_test.c
new file mode 100644
index 0000000000..3848b2a54d
--- /dev/null
+++ b/test/core/backoff/backoff_test.c
@@ -0,0 +1,149 @@
+/*
+ *
+ * Copyright 2016 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include "src/core/lib/backoff/backoff.h"
+
+#include <grpc/support/log.h>
+
+#include "test/core/util/test_config.h"
+
+static void test_constant_backoff(void) {
+ grpc_backoff backoff;
+ grpc_backoff_init(&backoff, 200 /* initial timeout */, 1.0 /* multiplier */,
+ 0.0 /* jitter */, 100 /* min timeout */,
+ 1000 /* max timeout */);
+
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_millis next = grpc_backoff_begin(&exec_ctx, &backoff);
+ GPR_ASSERT(next - grpc_exec_ctx_now(&exec_ctx) == 200);
+ for (int i = 0; i < 10000; i++) {
+ next = grpc_backoff_step(&exec_ctx, &backoff);
+ GPR_ASSERT(next - grpc_exec_ctx_now(&exec_ctx) == 200);
+ exec_ctx.now = next;
+ }
+ grpc_exec_ctx_finish(&exec_ctx);
+}
+
+static void test_min_connect(void) {
+ grpc_backoff backoff;
+ grpc_backoff_init(&backoff, 100 /* initial timeout */, 1.0 /* multiplier */,
+ 0.0 /* jitter */, 200 /* min timeout */,
+ 1000 /* max timeout */);
+
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_millis next = grpc_backoff_begin(&exec_ctx, &backoff);
+ GPR_ASSERT(next - grpc_exec_ctx_now(&exec_ctx) == 200);
+ grpc_exec_ctx_finish(&exec_ctx);
+}
+
+static void test_no_jitter_backoff(void) {
+ grpc_backoff backoff;
+ grpc_backoff_init(&backoff, 2 /* initial timeout */, 2.0 /* multiplier */,
+ 0.0 /* jitter */, 1 /* min timeout */,
+ 513 /* max timeout */);
+ // x_1 = 2
+ // x_n = 2**i + x_{i-1} ( = 2**(n+1) - 2 )
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ exec_ctx.now = 0;
+ exec_ctx.now_is_valid = true;
+ grpc_millis next = grpc_backoff_begin(&exec_ctx, &backoff);
+ GPR_ASSERT(next == 2);
+ exec_ctx.now = next;
+ next = grpc_backoff_step(&exec_ctx, &backoff);
+ GPR_ASSERT(next == 6);
+ exec_ctx.now = next;
+ next = grpc_backoff_step(&exec_ctx, &backoff);
+ GPR_ASSERT(next == 14);
+ exec_ctx.now = next;
+ next = grpc_backoff_step(&exec_ctx, &backoff);
+ GPR_ASSERT(next == 30);
+ exec_ctx.now = next;
+ next = grpc_backoff_step(&exec_ctx, &backoff);
+ GPR_ASSERT(next == 62);
+ exec_ctx.now = next;
+ next = grpc_backoff_step(&exec_ctx, &backoff);
+ GPR_ASSERT(next == 126);
+ exec_ctx.now = next;
+ next = grpc_backoff_step(&exec_ctx, &backoff);
+ GPR_ASSERT(next == 254);
+ exec_ctx.now = next;
+ next = grpc_backoff_step(&exec_ctx, &backoff);
+ GPR_ASSERT(next == 510);
+ exec_ctx.now = next;
+ next = grpc_backoff_step(&exec_ctx, &backoff);
+ GPR_ASSERT(next == 1022);
+ exec_ctx.now = next;
+ next = grpc_backoff_step(&exec_ctx, &backoff);
+ // Hit the maximum timeout. From this point onwards, retries will increase
+ // only by max timeout.
+ GPR_ASSERT(next == 1535);
+ exec_ctx.now = next;
+ next = grpc_backoff_step(&exec_ctx, &backoff);
+ GPR_ASSERT(next == 2048);
+ exec_ctx.now = next;
+ next = grpc_backoff_step(&exec_ctx, &backoff);
+ GPR_ASSERT(next == 2561);
+ grpc_exec_ctx_finish(&exec_ctx);
+}
+
+static void test_jitter_backoff(void) {
+ const int64_t initial_timeout = 500;
+ const double jitter = 0.1;
+ grpc_backoff backoff;
+ grpc_backoff_init(&backoff, initial_timeout, 1.0 /* multiplier */, jitter,
+ 100 /* min timeout */, 1000 /* max timeout */);
+
+ backoff.rng_state = 0; // force consistent PRNG
+
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_millis next = grpc_backoff_begin(&exec_ctx, &backoff);
+ GPR_ASSERT(next - grpc_exec_ctx_now(&exec_ctx) == 500);
+
+ int64_t expected_next_lower_bound =
+ (int64_t)((double)initial_timeout * (1 - jitter));
+ int64_t expected_next_upper_bound =
+ (int64_t)((double)initial_timeout * (1 + jitter));
+
+ for (int i = 0; i < 10000; i++) {
+ next = grpc_backoff_step(&exec_ctx, &backoff);
+
+ // next-now must be within (jitter*100)% of the previous timeout.
+ const int64_t timeout_millis = next - grpc_exec_ctx_now(&exec_ctx);
+ GPR_ASSERT(timeout_millis >= expected_next_lower_bound);
+ GPR_ASSERT(timeout_millis <= expected_next_upper_bound);
+
+ expected_next_lower_bound =
+ (int64_t)((double)timeout_millis * (1 - jitter));
+ expected_next_upper_bound =
+ (int64_t)((double)timeout_millis * (1 + jitter));
+ exec_ctx.now = next;
+ }
+ grpc_exec_ctx_finish(&exec_ctx);
+}
+
+int main(int argc, char **argv) {
+ grpc_test_init(argc, argv);
+ gpr_time_init();
+
+ test_constant_backoff();
+ test_min_connect();
+ test_no_jitter_backoff();
+ test_jitter_backoff();
+
+ return 0;
+}
diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c
index 383d1240cb..b7b28a9ac4 100644
--- a/test/core/bad_client/bad_client.c
+++ b/test/core/bad_client/bad_client.c
@@ -84,13 +84,18 @@ void grpc_run_bad_client_test(
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_completion_queue *shutdown_cq;
- hex = gpr_dump(client_payload, client_payload_length,
- GPR_DUMP_HEX | GPR_DUMP_ASCII);
+ if (client_payload_length < 4 * 1024) {
+ hex = gpr_dump(client_payload, client_payload_length,
+ GPR_DUMP_HEX | GPR_DUMP_ASCII);
- /* Add a debug log */
- gpr_log(GPR_INFO, "TEST: %s", hex);
+ /* Add a debug log */
+ gpr_log(GPR_INFO, "TEST: %s", hex);
- gpr_free(hex);
+ gpr_free(hex);
+ } else {
+ gpr_log(GPR_INFO, "TEST: (%" PRIdPTR " byte long string)",
+ client_payload_length);
+ }
/* Init grpc */
grpc_init();
@@ -134,9 +139,12 @@ void grpc_run_bad_client_test(
grpc_endpoint_write(&exec_ctx, sfd.client, &outgoing, &done_write_closure);
grpc_exec_ctx_finish(&exec_ctx);
- /* Await completion */
- GPR_ASSERT(
- gpr_event_wait(&a.done_write, grpc_timeout_seconds_to_deadline(5)));
+ /* Await completion, unless the request is large and write may not finish
+ * before the peer shuts down. */
+ if (!(flags & GRPC_BAD_CLIENT_LARGE_REQUEST)) {
+ GPR_ASSERT(
+ gpr_event_wait(&a.done_write, grpc_timeout_seconds_to_deadline(5)));
+ }
if (flags & GRPC_BAD_CLIENT_DISCONNECT) {
grpc_endpoint_shutdown(
@@ -186,6 +194,8 @@ void grpc_run_bad_client_test(
grpc_exec_ctx_finish(&exec_ctx);
}
+ GPR_ASSERT(
+ gpr_event_wait(&a.done_write, grpc_timeout_seconds_to_deadline(1)));
shutdown_cq = grpc_completion_queue_create_for_pluck(NULL);
grpc_server_shutdown_and_notify(a.server, shutdown_cq, NULL);
GPR_ASSERT(grpc_completion_queue_pluck(
diff --git a/test/core/bad_client/bad_client.h b/test/core/bad_client/bad_client.h
index 22f1a3abc7..a5b01f7f2c 100644
--- a/test/core/bad_client/bad_client.h
+++ b/test/core/bad_client/bad_client.h
@@ -37,6 +37,7 @@ typedef bool (*grpc_bad_client_client_stream_validator)(
grpc_slice_buffer *incoming);
#define GRPC_BAD_CLIENT_DISCONNECT 1
+#define GRPC_BAD_CLIENT_LARGE_REQUEST 2
/* Test runner.
diff --git a/test/core/bad_client/tests/window_overflow.c b/test/core/bad_client/tests/window_overflow.c
index 1f29bd32fb..e4b5f9711b 100644
--- a/test/core/bad_client/tests/window_overflow.c
+++ b/test/core/bad_client/tests/window_overflow.c
@@ -69,7 +69,7 @@ int main(int argc, char **argv) {
#define MAX_FRAME_SIZE 16384
#define MESSAGES_PER_FRAME (MAX_FRAME_SIZE / 5)
#define FRAME_SIZE (MESSAGES_PER_FRAME * 5)
-#define SEND_SIZE (100 * 1024)
+#define SEND_SIZE (6 * 1024 * 1024)
#define NUM_FRAMES (SEND_SIZE / FRAME_SIZE + 1)
grpc_test_init(argc, argv);
@@ -90,7 +90,8 @@ int main(int argc, char **argv) {
addbuf(message, sizeof(message));
}
}
- grpc_run_bad_client_test(verifier, NULL, g_buffer, g_count, 0);
+ grpc_run_bad_client_test(verifier, NULL, g_buffer, g_count,
+ GRPC_BAD_CLIENT_LARGE_REQUEST);
gpr_free(g_buffer);
return 0;
diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c
index 7c3614b4a2..a07ef89ba8 100644
--- a/test/core/channel/channel_stack_test.c
+++ b/test/core/channel/channel_stack_test.c
@@ -125,7 +125,7 @@ static void test_create_channel_stack(void) {
.context = NULL,
.path = path,
.start_time = gpr_now(GPR_CLOCK_MONOTONIC),
- .deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC),
+ .deadline = GRPC_MILLIS_INF_FUTURE,
.arena = NULL};
grpc_error *error = grpc_call_stack_init(&exec_ctx, channel_stack, 1,
free_call, call_stack, &args);
diff --git a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.c b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.c
index 364e180963..4597285063 100644
--- a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.c
+++ b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.c
@@ -106,7 +106,7 @@ static bool wait_loop(int deadline_seconds, gpr_event *ev) {
deadline_seconds--;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- grpc_timer_check(&exec_ctx, gpr_now(GPR_CLOCK_MONOTONIC), NULL);
+ grpc_timer_check(&exec_ctx, NULL);
grpc_exec_ctx_finish(&exec_ctx);
}
return false;
diff --git a/test/core/end2end/fixtures/h2_ssl_cert.c b/test/core/end2end/fixtures/h2_ssl_cert.c
index 9b1ddadfe4..f0a2ee5430 100644
--- a/test/core/end2end/fixtures/h2_ssl_cert.c
+++ b/test/core/end2end/fixtures/h2_ssl_cert.c
@@ -319,7 +319,7 @@ static void simple_request_body(grpc_end2end_test_fixture f,
op = ops;
op->op = GRPC_OP_SEND_INITIAL_METADATA;
op->data.send_initial_metadata.count = 0;
- op->flags = 0;
+ op->flags = GRPC_INITIAL_METADATA_WAIT_FOR_READY;
op->reserved = NULL;
op++;
error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL);
diff --git a/test/core/end2end/fixtures/http_proxy_fixture.c b/test/core/end2end/fixtures/http_proxy_fixture.c
index a4cfc77bcb..d29401fdc3 100644
--- a/test/core/end2end/fixtures/http_proxy_fixture.c
+++ b/test/core/end2end/fixtures/http_proxy_fixture.c
@@ -412,8 +412,8 @@ static void on_read_request_done(grpc_exec_ctx* exec_ctx, void* arg,
GPR_ASSERT(resolved_addresses->naddrs >= 1);
// Connect to requested address.
// The connection callback inherits our reference to conn.
- const gpr_timespec deadline = gpr_time_add(
- gpr_now(GPR_CLOCK_MONOTONIC), gpr_time_from_seconds(10, GPR_TIMESPAN));
+ const grpc_millis deadline =
+ grpc_exec_ctx_now(exec_ctx) + 10 * GPR_MS_PER_SEC;
grpc_tcp_client_connect(exec_ctx, &conn->on_server_connect_done,
&conn->server_endpoint, conn->pollset_set, NULL,
&resolved_addresses->addrs[0], deadline);
@@ -469,14 +469,12 @@ static void thread_main(void* arg) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
do {
gpr_ref(&proxy->users);
- const gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
- const gpr_timespec deadline =
- gpr_time_add(now, gpr_time_from_seconds(1, GPR_TIMESPAN));
grpc_pollset_worker* worker = NULL;
gpr_mu_lock(proxy->mu);
GRPC_LOG_IF_ERROR(
"grpc_pollset_work",
- grpc_pollset_work(&exec_ctx, proxy->pollset, &worker, now, deadline));
+ grpc_pollset_work(&exec_ctx, proxy->pollset, &worker,
+ grpc_exec_ctx_now(&exec_ctx) + GPR_MS_PER_SEC));
gpr_mu_unlock(proxy->mu);
grpc_exec_ctx_flush(&exec_ctx);
} while (!gpr_unref(&proxy->users));
diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c
index 1228c9fe9a..0a787bbf30 100644
--- a/test/core/end2end/fuzzers/api_fuzzer.c
+++ b/test/core/end2end/fuzzers/api_fuzzer.c
@@ -60,7 +60,9 @@ extern gpr_timespec (*gpr_now_impl)(gpr_clock_type clock_type);
static gpr_timespec now_impl(gpr_clock_type clock_type) {
GPR_ASSERT(clock_type != GPR_TIMESPAN);
- return g_now;
+ gpr_timespec ts = g_now;
+ ts.clock_type = clock_type;
+ return ts;
}
////////////////////////////////////////////////////////////////////////////////
@@ -407,10 +409,8 @@ void my_resolve_address(grpc_exec_ctx *exec_ctx, const char *addr,
r->addrs = addresses;
r->lb_addrs = NULL;
grpc_timer_init(
- exec_ctx, &r->timer, gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC),
- gpr_time_from_seconds(1, GPR_TIMESPAN)),
- GRPC_CLOSURE_CREATE(finish_resolve, r, grpc_schedule_on_exec_ctx),
- gpr_now(GPR_CLOCK_MONOTONIC));
+ exec_ctx, &r->timer, GPR_MS_PER_SEC + grpc_exec_ctx_now(exec_ctx),
+ GRPC_CLOSURE_CREATE(finish_resolve, r, grpc_schedule_on_exec_ctx));
}
grpc_ares_request *my_dns_lookup_ares(
@@ -424,10 +424,8 @@ grpc_ares_request *my_dns_lookup_ares(
r->addrs = NULL;
r->lb_addrs = lb_addrs;
grpc_timer_init(
- exec_ctx, &r->timer, gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC),
- gpr_time_from_seconds(1, GPR_TIMESPAN)),
- GRPC_CLOSURE_CREATE(finish_resolve, r, grpc_schedule_on_exec_ctx),
- gpr_now(GPR_CLOCK_MONOTONIC));
+ exec_ctx, &r->timer, GPR_MS_PER_SEC + grpc_exec_ctx_now(exec_ctx),
+ GRPC_CLOSURE_CREATE(finish_resolve, r, grpc_schedule_on_exec_ctx));
return NULL;
}
@@ -487,10 +485,8 @@ static void sched_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
fc->ep = ep;
fc->deadline = deadline;
grpc_timer_init(
- exec_ctx, &fc->timer, gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC),
- gpr_time_from_millis(1, GPR_TIMESPAN)),
- GRPC_CLOSURE_CREATE(do_connect, fc, grpc_schedule_on_exec_ctx),
- gpr_now(GPR_CLOCK_MONOTONIC));
+ exec_ctx, &fc->timer, GPR_MS_PER_SEC + grpc_exec_ctx_now(exec_ctx),
+ GRPC_CLOSURE_CREATE(do_connect, fc, grpc_schedule_on_exec_ctx));
}
static void my_tcp_client_connect(grpc_exec_ctx *exec_ctx,
diff --git a/test/core/end2end/invalid_call_argument_test.c b/test/core/end2end/invalid_call_argument_test.c
index bf0d08adec..e3fd5a8fbe 100644
--- a/test/core/end2end/invalid_call_argument_test.c
+++ b/test/core/end2end/invalid_call_argument_test.c
@@ -92,7 +92,7 @@ static void prepare_test(int is_client) {
op = g_state.ops;
op->op = GRPC_OP_SEND_INITIAL_METADATA;
op->data.send_initial_metadata.count = 0;
- op->flags = 0;
+ op->flags = GRPC_INITIAL_METADATA_WAIT_FOR_READY;
op->reserved = NULL;
op++;
GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(g_state.call, g_state.ops,
diff --git a/test/core/end2end/tests/bad_ping.c b/test/core/end2end/tests/bad_ping.c
index c97d11b306..d442f12480 100644
--- a/test/core/end2end/tests/bad_ping.c
+++ b/test/core/end2end/tests/bad_ping.c
@@ -155,14 +155,16 @@ static void test_bad_ping(grpc_end2end_test_config config) {
cq_verify(cqv);
// Send too many pings to the server to trigger the punishment:
- // The first ping is sent after data frames, it won't trigger a ping strike.
- // Each of the following pings will trigger a ping strike, and we need at
- // least (MAX_PING_STRIKES + 1) strikes to trigger the punishment. So
- // (MAX_PING_STRIKES + 2) pings are needed here.
+ // Each ping will trigger a ping strike, and we need at least MAX_PING_STRIKES
+ // strikes to trigger the punishment. So (MAX_PING_STRIKES + 1) pings are
+ // needed here.
int i;
- for (i = 200; i < 202 + MAX_PING_STRIKES; i++) {
- grpc_channel_ping(f.client, f.cq, tag(i), NULL);
- CQ_EXPECT_COMPLETION(cqv, tag(i), 1);
+ for (i = 1; i <= MAX_PING_STRIKES + 1; i++) {
+ grpc_channel_ping(f.client, f.cq, tag(200 + i), NULL);
+ CQ_EXPECT_COMPLETION(cqv, tag(200 + i), 1);
+ if (i == MAX_PING_STRIKES + 1) {
+ CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
+ }
cq_verify(cqv);
}
@@ -190,7 +192,6 @@ static void test_bad_ping(grpc_end2end_test_config config) {
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
- CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
grpc_server_shutdown_and_notify(f.server, f.cq, tag(0xdead));
diff --git a/test/core/end2end/tests/compressed_payload.c b/test/core/end2end/tests/compressed_payload.c
index 58f46a606c..4263eb1363 100644
--- a/test/core/end2end/tests/compressed_payload.c
+++ b/test/core/end2end/tests/compressed_payload.c
@@ -193,6 +193,7 @@ static void request_for_disabled_algorithm(
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(101), true);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), true);
cq_verify(cqv);
op = ops;
@@ -221,7 +222,6 @@ static void request_for_disabled_algorithm(
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(103), true);
- CQ_EXPECT_COMPLETION(cqv, tag(1), true);
cq_verify(cqv);
/* call was cancelled (closed) ... */
diff --git a/test/core/end2end/tests/keepalive_timeout.c b/test/core/end2end/tests/keepalive_timeout.c
index 8d01f23c00..c4280149c7 100644
--- a/test/core/end2end/tests/keepalive_timeout.c
+++ b/test/core/end2end/tests/keepalive_timeout.c
@@ -98,21 +98,21 @@ static void test_keepalive_timeout(grpc_end2end_test_config config) {
grpc_byte_buffer *response_payload =
grpc_raw_byte_buffer_create(&response_payload_slice, 1);
- grpc_arg keepalive_args[] = {{.type = GRPC_ARG_INTEGER,
- .key = GRPC_ARG_KEEPALIVE_TIME_MS,
- .value.integer = 1500},
- {.type = GRPC_ARG_INTEGER,
- .key = GRPC_ARG_KEEPALIVE_TIMEOUT_MS,
- .value.integer = 0},
- {.type = GRPC_ARG_INTEGER,
- .key = GRPC_ARG_HTTP2_BDP_PROBE,
- .value.integer = 0}};
-
- grpc_channel_args client_args = {.num_args = GPR_ARRAY_SIZE(keepalive_args),
- .args = keepalive_args};
+ grpc_arg keepalive_arg_elems[] = {{.type = GRPC_ARG_INTEGER,
+ .key = GRPC_ARG_KEEPALIVE_TIME_MS,
+ .value.integer = 1500},
+ {.type = GRPC_ARG_INTEGER,
+ .key = GRPC_ARG_KEEPALIVE_TIMEOUT_MS,
+ .value.integer = 0},
+ {.type = GRPC_ARG_INTEGER,
+ .key = GRPC_ARG_HTTP2_BDP_PROBE,
+ .value.integer = 0}};
+ grpc_channel_args keepalive_args = {
+ .num_args = GPR_ARRAY_SIZE(keepalive_arg_elems),
+ .args = keepalive_arg_elems};
grpc_end2end_test_fixture f =
- begin_test(config, "keepalive_timeout", &client_args, NULL);
+ begin_test(config, "keepalive_timeout", &keepalive_args, NULL);
cq_verifier *cqv = cq_verifier_create(f.cq);
grpc_op ops[6];
grpc_op *op;
diff --git a/test/core/end2end/tests/stream_compression_compressed_payload.c b/test/core/end2end/tests/stream_compression_compressed_payload.c
index c4cf97e416..eb31a80302 100644
--- a/test/core/end2end/tests/stream_compression_compressed_payload.c
+++ b/test/core/end2end/tests/stream_compression_compressed_payload.c
@@ -193,6 +193,7 @@ static void request_for_disabled_algorithm(
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(101), true);
+ CQ_EXPECT_COMPLETION(cqv, tag(1), true);
cq_verify(cqv);
op = ops;
@@ -221,7 +222,6 @@ static void request_for_disabled_algorithm(
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(103), true);
- CQ_EXPECT_COMPLETION(cqv, tag(1), true);
cq_verify(cqv);
/* call was cancelled (closed) ... */
diff --git a/test/core/http/httpcli_test.c b/test/core/http/httpcli_test.c
index 8a53903763..cc1c16d695 100644
--- a/test/core/http/httpcli_test.c
+++ b/test/core/http/httpcli_test.c
@@ -35,8 +35,9 @@ static grpc_httpcli_context g_context;
static gpr_mu *g_mu;
static grpc_polling_entity g_pops;
-static gpr_timespec n_seconds_time(int seconds) {
- return grpc_timeout_seconds_to_deadline(seconds);
+static grpc_millis n_seconds_time(int seconds) {
+ return grpc_timespec_to_millis_round_up(
+ grpc_timeout_seconds_to_deadline(seconds));
}
static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
@@ -86,8 +87,7 @@ static void test_get(int port) {
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&g_pops),
- &worker, gpr_now(GPR_CLOCK_MONOTONIC),
- n_seconds_time(1))));
+ &worker, n_seconds_time(1))));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
gpr_mu_lock(g_mu);
@@ -128,8 +128,7 @@ static void test_post(int port) {
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&g_pops),
- &worker, gpr_now(GPR_CLOCK_MONOTONIC),
- n_seconds_time(1))));
+ &worker, n_seconds_time(1))));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
gpr_mu_lock(g_mu);
diff --git a/test/core/http/httpscli_test.c b/test/core/http/httpscli_test.c
index c7455bd8df..f8a3cfdd76 100644
--- a/test/core/http/httpscli_test.c
+++ b/test/core/http/httpscli_test.c
@@ -35,8 +35,9 @@ static grpc_httpcli_context g_context;
static gpr_mu *g_mu;
static grpc_polling_entity g_pops;
-static gpr_timespec n_seconds_time(int seconds) {
- return grpc_timeout_seconds_to_deadline(seconds);
+static grpc_millis n_seconds_time(int seconds) {
+ return grpc_timespec_to_millis_round_up(
+ grpc_timeout_seconds_to_deadline(seconds));
}
static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
@@ -87,8 +88,7 @@ static void test_get(int port) {
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&g_pops),
- &worker, gpr_now(GPR_CLOCK_MONOTONIC),
- n_seconds_time(1))));
+ &worker, n_seconds_time(1))));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
gpr_mu_lock(g_mu);
@@ -130,8 +130,7 @@ static void test_post(int port) {
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&g_pops),
- &worker, gpr_now(GPR_CLOCK_MONOTONIC),
- n_seconds_time(1))));
+ &worker, n_seconds_time(1))));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
gpr_mu_lock(g_mu);
diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c
index f8570edde7..61e901f645 100644
--- a/test/core/iomgr/endpoint_tests.c
+++ b/test/core/iomgr/endpoint_tests.c
@@ -176,10 +176,11 @@ static void read_and_write_test(grpc_endpoint_test_config config,
size_t num_bytes, size_t write_size,
size_t slice_size, bool shutdown) {
struct read_and_write_test_state state;
- gpr_timespec deadline = grpc_timeout_seconds_to_deadline(20);
grpc_endpoint_test_fixture f =
begin_test(config, "read_and_write_test", slice_size);
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_millis deadline =
+ grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(20));
gpr_log(GPR_DEBUG, "num_bytes=%" PRIuPTR " write_size=%" PRIuPTR
" slice_size=%" PRIuPTR " shutdown=%d",
num_bytes, write_size, slice_size, shutdown);
@@ -235,11 +236,10 @@ static void read_and_write_test(grpc_endpoint_test_config config,
gpr_mu_lock(g_mu);
while (!state.read_done || !state.write_done) {
grpc_pollset_worker *worker = NULL;
- GPR_ASSERT(gpr_time_cmp(gpr_now(GPR_CLOCK_MONOTONIC), deadline) < 0);
+ GPR_ASSERT(grpc_exec_ctx_now(&exec_ctx) < deadline);
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
- grpc_pollset_work(&exec_ctx, g_pollset, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC), deadline)));
+ grpc_pollset_work(&exec_ctx, g_pollset, &worker, deadline)));
}
gpr_mu_unlock(g_mu);
grpc_exec_ctx_flush(&exec_ctx);
@@ -265,14 +265,14 @@ static void wait_for_fail_count(grpc_exec_ctx *exec_ctx, int *fail_count,
int want_fail_count) {
grpc_exec_ctx_flush(exec_ctx);
gpr_mu_lock(g_mu);
- gpr_timespec deadline = grpc_timeout_seconds_to_deadline(10);
- while (gpr_time_cmp(gpr_now(deadline.clock_type), deadline) < 0 &&
+ grpc_millis deadline =
+ grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(10));
+ while (grpc_exec_ctx_now(exec_ctx) < deadline &&
*fail_count < want_fail_count) {
grpc_pollset_worker *worker = NULL;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
- grpc_pollset_work(exec_ctx, g_pollset, &worker,
- gpr_now(deadline.clock_type), deadline)));
+ grpc_pollset_work(exec_ctx, g_pollset, &worker, deadline)));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_flush(exec_ctx);
gpr_mu_lock(g_mu);
diff --git a/test/core/iomgr/ev_epollsig_linux_test.c b/test/core/iomgr/ev_epollsig_linux_test.c
index cca07bf002..37aadacd49 100644
--- a/test/core/iomgr/ev_epollsig_linux_test.c
+++ b/test/core/iomgr/ev_epollsig_linux_test.c
@@ -238,10 +238,8 @@ static void test_threading_loop(void *arg) {
grpc_pollset_worker *worker;
gpr_mu_lock(shared->mu);
GPR_ASSERT(GRPC_LOG_IF_ERROR(
- "pollset_work",
- grpc_pollset_work(&exec_ctx, shared->pollset, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC),
- gpr_inf_future(GPR_CLOCK_MONOTONIC))));
+ "pollset_work", grpc_pollset_work(&exec_ctx, shared->pollset, &worker,
+ GRPC_MILLIS_INF_FUTURE)));
gpr_mu_unlock(shared->mu);
grpc_exec_ctx_finish(&exec_ctx);
}
diff --git a/test/core/iomgr/fd_posix_test.c b/test/core/iomgr/fd_posix_test.c
index 881277a8d6..1c62f34d3e 100644
--- a/test/core/iomgr/fd_posix_test.c
+++ b/test/core/iomgr/fd_posix_test.c
@@ -252,10 +252,8 @@ static void server_wait_and_shutdown(server *sv) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_pollset_worker *worker = NULL;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
- "pollset_work",
- grpc_pollset_work(&exec_ctx, g_pollset, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC),
- gpr_inf_future(GPR_CLOCK_MONOTONIC))));
+ "pollset_work", grpc_pollset_work(&exec_ctx, g_pollset, &worker,
+ GRPC_MILLIS_INF_FUTURE)));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
gpr_mu_lock(g_mu);
@@ -371,10 +369,8 @@ static void client_wait_and_shutdown(client *cl) {
grpc_pollset_worker *worker = NULL;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
- "pollset_work",
- grpc_pollset_work(&exec_ctx, g_pollset, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC),
- gpr_inf_future(GPR_CLOCK_MONOTONIC))));
+ "pollset_work", grpc_pollset_work(&exec_ctx, g_pollset, &worker,
+ GRPC_MILLIS_INF_FUTURE)));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
gpr_mu_lock(g_mu);
@@ -477,10 +473,8 @@ static void test_grpc_fd_change(void) {
while (a.cb_that_ran == NULL) {
grpc_pollset_worker *worker = NULL;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
- "pollset_work",
- grpc_pollset_work(&exec_ctx, g_pollset, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC),
- gpr_inf_future(GPR_CLOCK_MONOTONIC))));
+ "pollset_work", grpc_pollset_work(&exec_ctx, g_pollset, &worker,
+ GRPC_MILLIS_INF_FUTURE)));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
gpr_mu_lock(g_mu);
@@ -503,10 +497,8 @@ static void test_grpc_fd_change(void) {
while (b.cb_that_ran == NULL) {
grpc_pollset_worker *worker = NULL;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
- "pollset_work",
- grpc_pollset_work(&exec_ctx, g_pollset, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC),
- gpr_inf_future(GPR_CLOCK_MONOTONIC))));
+ "pollset_work", grpc_pollset_work(&exec_ctx, g_pollset, &worker,
+ GRPC_MILLIS_INF_FUTURE)));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
gpr_mu_lock(g_mu);
diff --git a/test/core/iomgr/pollset_set_test.c b/test/core/iomgr/pollset_set_test.c
index 70efca8b16..3dd4bc887c 100644
--- a/test/core/iomgr/pollset_set_test.c
+++ b/test/core/iomgr/pollset_set_test.c
@@ -24,7 +24,6 @@
#include <string.h>
#include <unistd.h>
-#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/useful.h>
@@ -204,7 +203,7 @@ static void pollset_set_test_basic() {
*/
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_pollset_worker *worker;
- gpr_timespec deadline;
+ grpc_millis deadline;
test_fd tfds[10];
test_pollset pollsets[3];
@@ -257,10 +256,10 @@ static void pollset_set_test_basic() {
make_test_fds_readable(tfds, num_fds);
gpr_mu_lock(pollsets[i].mu);
- deadline = grpc_timeout_milliseconds_to_deadline(2);
+ deadline = grpc_timespec_to_millis_round_up(
+ grpc_timeout_milliseconds_to_deadline(2));
GPR_ASSERT(GRPC_ERROR_NONE ==
- grpc_pollset_work(&exec_ctx, pollsets[i].ps, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC), deadline));
+ grpc_pollset_work(&exec_ctx, pollsets[i].ps, &worker, deadline));
gpr_mu_unlock(pollsets[i].mu);
grpc_exec_ctx_flush(&exec_ctx);
@@ -309,7 +308,7 @@ void pollset_set_test_dup_fds() {
*/
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_pollset_worker *worker;
- gpr_timespec deadline;
+ grpc_millis deadline;
test_fd tfds[3];
test_pollset pollset;
@@ -339,10 +338,10 @@ void pollset_set_test_dup_fds() {
make_test_fds_readable(tfds, num_fds);
gpr_mu_lock(pollset.mu);
- deadline = grpc_timeout_milliseconds_to_deadline(2);
+ deadline = grpc_timespec_to_millis_round_up(
+ grpc_timeout_milliseconds_to_deadline(2));
GPR_ASSERT(GRPC_ERROR_NONE ==
- grpc_pollset_work(&exec_ctx, pollset.ps, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC), deadline));
+ grpc_pollset_work(&exec_ctx, pollset.ps, &worker, deadline));
gpr_mu_unlock(pollset.mu);
grpc_exec_ctx_flush(&exec_ctx);
@@ -382,7 +381,7 @@ void pollset_set_test_empty_pollset() {
*/
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_pollset_worker *worker;
- gpr_timespec deadline;
+ grpc_millis deadline;
test_fd tfds[3];
test_pollset pollsets[2];
@@ -408,10 +407,10 @@ void pollset_set_test_empty_pollset() {
make_test_fds_readable(tfds, num_fds);
gpr_mu_lock(pollsets[0].mu);
- deadline = grpc_timeout_milliseconds_to_deadline(2);
+ deadline = grpc_timespec_to_millis_round_up(
+ grpc_timeout_milliseconds_to_deadline(2));
GPR_ASSERT(GRPC_ERROR_NONE ==
- grpc_pollset_work(&exec_ctx, pollsets[0].ps, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC), deadline));
+ grpc_pollset_work(&exec_ctx, pollsets[0].ps, &worker, deadline));
gpr_mu_unlock(pollsets[0].mu);
grpc_exec_ctx_flush(&exec_ctx);
@@ -434,7 +433,8 @@ int main(int argc, char **argv) {
const char *poll_strategy = grpc_get_poll_strategy_name();
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_test_init(argc, argv);
- grpc_init();
+ grpc_iomgr_init(&exec_ctx);
+ grpc_iomgr_start(&exec_ctx);
if (poll_strategy != NULL &&
(strcmp(poll_strategy, "epoll") == 0 ||
@@ -449,8 +449,8 @@ int main(int argc, char **argv) {
poll_strategy);
}
+ grpc_iomgr_shutdown(&exec_ctx);
grpc_exec_ctx_finish(&exec_ctx);
- grpc_shutdown();
return 0;
}
#else /* defined(GRPC_LINUX_EPOLL) */
diff --git a/test/core/iomgr/resolve_address_posix_test.c b/test/core/iomgr/resolve_address_posix_test.c
index e4be99f03c..cb9d6080fb 100644
--- a/test/core/iomgr/resolve_address_posix_test.c
+++ b/test/core/iomgr/resolve_address_posix_test.c
@@ -72,35 +72,33 @@ void args_finish(grpc_exec_ctx *exec_ctx, args_struct *args) {
gpr_free(args->pollset);
}
-static gpr_timespec n_sec_deadline(int seconds) {
- return gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
- gpr_time_from_seconds(seconds, GPR_TIMESPAN));
+static grpc_millis n_sec_deadline(int seconds) {
+ return grpc_timespec_to_millis_round_up(
+ grpc_timeout_seconds_to_deadline(seconds));
}
static void actually_poll(void *argsp) {
args_struct *args = argsp;
- gpr_timespec deadline = n_sec_deadline(10);
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_millis deadline = n_sec_deadline(10);
while (true) {
bool done = gpr_atm_acq_load(&args->done_atm) != 0;
if (done) {
break;
}
- gpr_timespec time_left =
- gpr_time_sub(deadline, gpr_now(GPR_CLOCK_REALTIME));
- gpr_log(GPR_DEBUG, "done=%d, time_left=%" PRId64 ".%09d", done,
- time_left.tv_sec, time_left.tv_nsec);
- GPR_ASSERT(gpr_time_cmp(time_left, gpr_time_0(GPR_TIMESPAN)) >= 0);
+ grpc_millis time_left = deadline - grpc_exec_ctx_now(&exec_ctx);
+ gpr_log(GPR_DEBUG, "done=%d, time_left=%" PRIdPTR, done, time_left);
+ GPR_ASSERT(time_left >= 0);
grpc_pollset_worker *worker = NULL;
- grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
gpr_mu_lock(args->mu);
- GRPC_LOG_IF_ERROR(
- "pollset_work",
- grpc_pollset_work(&exec_ctx, args->pollset, &worker,
- gpr_now(GPR_CLOCK_REALTIME), n_sec_deadline(1)));
+ GRPC_LOG_IF_ERROR("pollset_work",
+ grpc_pollset_work(&exec_ctx, args->pollset, &worker,
+ n_sec_deadline(1)));
gpr_mu_unlock(args->mu);
- grpc_exec_ctx_finish(&exec_ctx);
+ grpc_exec_ctx_flush(&exec_ctx);
}
gpr_event_set(&args->ev, (void *)1);
+ grpc_exec_ctx_finish(&exec_ctx);
}
static void poll_pollset_until_request_done(args_struct *args) {
diff --git a/test/core/iomgr/resolve_address_test.c b/test/core/iomgr/resolve_address_test.c
index 1110c04b6e..178bbbb95f 100644
--- a/test/core/iomgr/resolve_address_test.c
+++ b/test/core/iomgr/resolve_address_test.c
@@ -68,34 +68,32 @@ void args_finish(grpc_exec_ctx *exec_ctx, args_struct *args) {
gpr_free(args->pollset);
}
-static gpr_timespec n_sec_deadline(int seconds) {
- return gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
- gpr_time_from_seconds(seconds, GPR_TIMESPAN));
+static grpc_millis n_sec_deadline(int seconds) {
+ return grpc_timespec_to_millis_round_up(
+ grpc_timeout_seconds_to_deadline(seconds));
}
static void poll_pollset_until_request_done(args_struct *args) {
- gpr_timespec deadline = n_sec_deadline(10);
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_millis deadline = n_sec_deadline(10);
while (true) {
bool done = gpr_atm_acq_load(&args->done_atm) != 0;
if (done) {
break;
}
- gpr_timespec time_left =
- gpr_time_sub(deadline, gpr_now(GPR_CLOCK_REALTIME));
- gpr_log(GPR_DEBUG, "done=%d, time_left=%" PRId64 ".%09d", done,
- time_left.tv_sec, time_left.tv_nsec);
- GPR_ASSERT(gpr_time_cmp(time_left, gpr_time_0(GPR_TIMESPAN)) >= 0);
+ grpc_millis time_left = deadline - grpc_exec_ctx_now(&exec_ctx);
+ gpr_log(GPR_DEBUG, "done=%d, time_left=%" PRIdPTR, done, time_left);
+ GPR_ASSERT(time_left >= 0);
grpc_pollset_worker *worker = NULL;
- grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
gpr_mu_lock(args->mu);
- GRPC_LOG_IF_ERROR(
- "pollset_work",
- grpc_pollset_work(&exec_ctx, args->pollset, &worker,
- gpr_now(GPR_CLOCK_REALTIME), n_sec_deadline(1)));
+ GRPC_LOG_IF_ERROR("pollset_work",
+ grpc_pollset_work(&exec_ctx, args->pollset, &worker,
+ n_sec_deadline(1)));
gpr_mu_unlock(args->mu);
- grpc_exec_ctx_finish(&exec_ctx);
+ grpc_exec_ctx_flush(&exec_ctx);
}
gpr_event_set(&args->ev, (void *)1);
+ grpc_exec_ctx_finish(&exec_ctx);
}
static void must_succeed(grpc_exec_ctx *exec_ctx, void *argsp,
diff --git a/test/core/iomgr/tcp_client_posix_test.c b/test/core/iomgr/tcp_client_posix_test.c
index 1032da942b..b8b76d1c42 100644
--- a/test/core/iomgr/tcp_client_posix_test.c
+++ b/test/core/iomgr/tcp_client_posix_test.c
@@ -46,8 +46,8 @@ static grpc_pollset *g_pollset;
static int g_connections_complete = 0;
static grpc_endpoint *g_connecting = NULL;
-static gpr_timespec test_deadline(void) {
- return grpc_timeout_seconds_to_deadline(10);
+static grpc_millis test_deadline(void) {
+ return grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(10));
}
static void finish_connection() {
@@ -109,7 +109,7 @@ void test_succeeds(void) {
(socklen_t *)&resolved_addr.len) == 0);
GRPC_CLOSURE_INIT(&done, must_succeed, NULL, grpc_schedule_on_exec_ctx);
grpc_tcp_client_connect(&exec_ctx, &done, &g_connecting, g_pollset_set, NULL,
- &resolved_addr, gpr_inf_future(GPR_CLOCK_REALTIME));
+ &resolved_addr, GRPC_MILLIS_INF_FUTURE);
/* await the connection */
do {
@@ -127,8 +127,8 @@ void test_succeeds(void) {
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
grpc_pollset_work(&exec_ctx, g_pollset, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC),
- grpc_timeout_seconds_to_deadline(5))));
+ grpc_timespec_to_millis_round_up(
+ grpc_timeout_seconds_to_deadline(5)))));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_flush(&exec_ctx);
gpr_mu_lock(g_mu);
@@ -159,25 +159,24 @@ void test_fails(void) {
/* connect to a broken address */
GRPC_CLOSURE_INIT(&done, must_fail, NULL, grpc_schedule_on_exec_ctx);
grpc_tcp_client_connect(&exec_ctx, &done, &g_connecting, g_pollset_set, NULL,
- &resolved_addr, gpr_inf_future(GPR_CLOCK_REALTIME));
+ &resolved_addr, GRPC_MILLIS_INF_FUTURE);
gpr_mu_lock(g_mu);
/* wait for the connection callback to finish */
while (g_connections_complete == connections_complete_before) {
grpc_pollset_worker *worker = NULL;
- gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
- gpr_timespec polling_deadline = test_deadline();
- switch (grpc_timer_check(&exec_ctx, now, &polling_deadline)) {
+ grpc_millis polling_deadline = test_deadline();
+ switch (grpc_timer_check(&exec_ctx, &polling_deadline)) {
case GRPC_TIMERS_FIRED:
break;
case GRPC_TIMERS_NOT_CHECKED:
- polling_deadline = now;
+ polling_deadline = 0;
/* fall through */
case GRPC_TIMERS_CHECKED_AND_EMPTY:
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work", grpc_pollset_work(&exec_ctx, g_pollset, &worker,
- now, polling_deadline)));
+ polling_deadline)));
break;
}
gpr_mu_unlock(g_mu);
diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c
index cfb3cf897c..6501160c6f 100644
--- a/test/core/iomgr/tcp_posix_test.c
+++ b/test/core/iomgr/tcp_posix_test.c
@@ -162,7 +162,8 @@ static void read_test(size_t num_bytes, size_t slice_size) {
grpc_endpoint *ep;
struct read_socket_state state;
size_t written_bytes;
- gpr_timespec deadline = grpc_timeout_seconds_to_deadline(20);
+ grpc_millis deadline =
+ grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(20));
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
gpr_log(GPR_INFO, "Read test of size %" PRIuPTR ", slice size %" PRIuPTR,
@@ -194,8 +195,7 @@ static void read_test(size_t num_bytes, size_t slice_size) {
grpc_pollset_worker *worker = NULL;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
- grpc_pollset_work(&exec_ctx, g_pollset, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC), deadline)));
+ grpc_pollset_work(&exec_ctx, g_pollset, &worker, deadline)));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
gpr_mu_lock(g_mu);
@@ -215,7 +215,8 @@ static void large_read_test(size_t slice_size) {
grpc_endpoint *ep;
struct read_socket_state state;
ssize_t written_bytes;
- gpr_timespec deadline = grpc_timeout_seconds_to_deadline(20);
+ grpc_millis deadline =
+ grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(20));
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
gpr_log(GPR_INFO, "Start large read test, slice size %" PRIuPTR, slice_size);
@@ -246,8 +247,7 @@ static void large_read_test(size_t slice_size) {
grpc_pollset_worker *worker = NULL;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
- grpc_pollset_work(&exec_ctx, g_pollset, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC), deadline)));
+ grpc_pollset_work(&exec_ctx, g_pollset, &worker, deadline)));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
gpr_mu_lock(g_mu);
@@ -319,8 +319,8 @@ void drain_socket_blocking(int fd, size_t num_bytes, size_t read_size) {
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
grpc_pollset_work(&exec_ctx, g_pollset, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC),
- grpc_timeout_milliseconds_to_deadline(10))));
+ grpc_timespec_to_millis_round_up(
+ grpc_timeout_milliseconds_to_deadline(10)))));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
do {
@@ -353,7 +353,8 @@ static void write_test(size_t num_bytes, size_t slice_size) {
uint8_t current_data = 0;
grpc_slice_buffer outgoing;
grpc_closure write_done_closure;
- gpr_timespec deadline = grpc_timeout_seconds_to_deadline(20);
+ grpc_millis deadline =
+ grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(20));
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
gpr_log(GPR_INFO,
@@ -390,8 +391,7 @@ static void write_test(size_t num_bytes, size_t slice_size) {
}
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
- grpc_pollset_work(&exec_ctx, g_pollset, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC), deadline)));
+ grpc_pollset_work(&exec_ctx, g_pollset, &worker, deadline)));
gpr_mu_unlock(g_mu);
grpc_exec_ctx_finish(&exec_ctx);
gpr_mu_lock(g_mu);
@@ -419,7 +419,8 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) {
struct read_socket_state state;
size_t written_bytes;
int fd;
- gpr_timespec deadline = grpc_timeout_seconds_to_deadline(20);
+ grpc_millis deadline =
+ grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(20));
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_closure fd_released_cb;
int fd_released_done = 0;
@@ -457,8 +458,7 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) {
grpc_pollset_worker *worker = NULL;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
- grpc_pollset_work(&exec_ctx, g_pollset, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC), deadline)));
+ grpc_pollset_work(&exec_ctx, g_pollset, &worker, deadline)));
gpr_log(GPR_DEBUG, "wakeup: read=%" PRIdPTR " target=%" PRIdPTR,
state.read_bytes, state.target_read_bytes);
gpr_mu_unlock(g_mu);
@@ -476,8 +476,7 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) {
grpc_pollset_worker *worker = NULL;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
- grpc_pollset_work(&exec_ctx, g_pollset, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC), deadline)));
+ grpc_pollset_work(&exec_ctx, g_pollset, &worker, deadline)));
gpr_log(GPR_DEBUG, "wakeup: fd_released_done=%d", fd_released_done);
}
gpr_mu_unlock(g_mu);
diff --git a/test/core/iomgr/tcp_server_posix_test.c b/test/core/iomgr/tcp_server_posix_test.c
index 4d84608376..782dfb413a 100644
--- a/test/core/iomgr/tcp_server_posix_test.c
+++ b/test/core/iomgr/tcp_server_posix_test.c
@@ -230,7 +230,8 @@ static void test_no_op_with_port_and_start(void) {
static grpc_error *tcp_connect(grpc_exec_ctx *exec_ctx, const test_addr *remote,
on_connect_result *result) {
- gpr_timespec deadline = grpc_timeout_seconds_to_deadline(10);
+ grpc_millis deadline =
+ grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(10));
int clifd;
int nconnects_before;
const struct sockaddr *remote_addr =
@@ -253,11 +254,10 @@ static grpc_error *tcp_connect(grpc_exec_ctx *exec_ctx, const test_addr *remote,
}
gpr_log(GPR_DEBUG, "wait");
while (g_nconnects == nconnects_before &&
- gpr_time_cmp(deadline, gpr_now(deadline.clock_type)) > 0) {
+ deadline > grpc_exec_ctx_now(exec_ctx)) {
grpc_pollset_worker *worker = NULL;
grpc_error *err;
- if ((err = grpc_pollset_work(exec_ctx, g_pollset, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC), deadline)) !=
+ if ((err = grpc_pollset_work(exec_ctx, g_pollset, &worker, deadline)) !=
GRPC_ERROR_NONE) {
gpr_mu_unlock(g_mu);
close(clifd);
diff --git a/test/core/iomgr/timer_list_test.c b/test/core/iomgr/timer_list_test.c
index 5f8b01fdc4..c3d9f9d88d 100644
--- a/test/core/iomgr/timer_list_test.c
+++ b/test/core/iomgr/timer_list_test.c
@@ -41,51 +41,45 @@ static void cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
}
static void add_test(void) {
- gpr_timespec start = gpr_now(GPR_CLOCK_REALTIME);
int i;
grpc_timer timers[20];
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
gpr_log(GPR_INFO, "add_test");
- grpc_timer_list_init(start);
+ grpc_timer_list_init(&exec_ctx);
grpc_timer_trace.value = 1;
grpc_timer_check_trace.value = 1;
memset(cb_called, 0, sizeof(cb_called));
+ grpc_millis start = grpc_exec_ctx_now(&exec_ctx);
+
/* 10 ms timers. will expire in the current epoch */
for (i = 0; i < 10; i++) {
- grpc_timer_init(
- &exec_ctx, &timers[i],
- gpr_time_add(start, gpr_time_from_millis(10, GPR_TIMESPAN)),
- GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)i, grpc_schedule_on_exec_ctx),
- start);
+ grpc_timer_init(&exec_ctx, &timers[i], start + 10,
+ GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)i,
+ grpc_schedule_on_exec_ctx));
}
/* 1010 ms timers. will expire in the next epoch */
for (i = 10; i < 20; i++) {
- grpc_timer_init(
- &exec_ctx, &timers[i],
- gpr_time_add(start, gpr_time_from_millis(1010, GPR_TIMESPAN)),
- GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)i, grpc_schedule_on_exec_ctx),
- start);
+ grpc_timer_init(&exec_ctx, &timers[i], start + 1010,
+ GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)i,
+ grpc_schedule_on_exec_ctx));
}
/* collect timers. Only the first batch should be ready. */
- GPR_ASSERT(grpc_timer_check(
- &exec_ctx,
- gpr_time_add(start, gpr_time_from_millis(500, GPR_TIMESPAN)),
- NULL) == GRPC_TIMERS_FIRED);
+ exec_ctx.now = start + 500;
+ GPR_ASSERT(grpc_timer_check(&exec_ctx, NULL) == GRPC_TIMERS_FIRED);
grpc_exec_ctx_finish(&exec_ctx);
for (i = 0; i < 20; i++) {
GPR_ASSERT(cb_called[i][1] == (i < 10));
GPR_ASSERT(cb_called[i][0] == 0);
}
- GPR_ASSERT(grpc_timer_check(
- &exec_ctx,
- gpr_time_add(start, gpr_time_from_millis(600, GPR_TIMESPAN)),
- NULL) == GRPC_TIMERS_CHECKED_AND_EMPTY);
+ exec_ctx.now = start + 600;
+ GPR_ASSERT(grpc_timer_check(&exec_ctx, NULL) ==
+ GRPC_TIMERS_CHECKED_AND_EMPTY);
grpc_exec_ctx_finish(&exec_ctx);
for (i = 0; i < 30; i++) {
GPR_ASSERT(cb_called[i][1] == (i < 10));
@@ -93,20 +87,17 @@ static void add_test(void) {
}
/* collect the rest of the timers */
- GPR_ASSERT(grpc_timer_check(
- &exec_ctx,
- gpr_time_add(start, gpr_time_from_millis(1500, GPR_TIMESPAN)),
- NULL) == GRPC_TIMERS_FIRED);
+ exec_ctx.now = start + 1500;
+ GPR_ASSERT(grpc_timer_check(&exec_ctx, NULL) == GRPC_TIMERS_FIRED);
grpc_exec_ctx_finish(&exec_ctx);
for (i = 0; i < 30; i++) {
GPR_ASSERT(cb_called[i][1] == (i < 20));
GPR_ASSERT(cb_called[i][0] == 0);
}
- GPR_ASSERT(grpc_timer_check(
- &exec_ctx,
- gpr_time_add(start, gpr_time_from_millis(1600, GPR_TIMESPAN)),
- NULL) == GRPC_TIMERS_CHECKED_AND_EMPTY);
+ exec_ctx.now = start + 1600;
+ GPR_ASSERT(grpc_timer_check(&exec_ctx, NULL) ==
+ GRPC_TIMERS_CHECKED_AND_EMPTY);
for (i = 0; i < 30; i++) {
GPR_ASSERT(cb_called[i][1] == (i < 20));
GPR_ASSERT(cb_called[i][0] == 0);
@@ -116,10 +107,6 @@ static void add_test(void) {
grpc_exec_ctx_finish(&exec_ctx);
}
-static gpr_timespec tfm(int m) {
- return gpr_time_from_millis(m, GPR_CLOCK_REALTIME);
-}
-
/* Cleaning up a list with pending timers. */
void destruction_test(void) {
grpc_timer timers[5];
@@ -127,32 +114,30 @@ void destruction_test(void) {
gpr_log(GPR_INFO, "destruction_test");
- grpc_timer_list_init(gpr_time_0(GPR_CLOCK_REALTIME));
+ exec_ctx.now_is_valid = true;
+ exec_ctx.now = 0;
+ grpc_timer_list_init(&exec_ctx);
grpc_timer_trace.value = 1;
grpc_timer_check_trace.value = 1;
memset(cb_called, 0, sizeof(cb_called));
grpc_timer_init(
- &exec_ctx, &timers[0], tfm(100),
- GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)0, grpc_schedule_on_exec_ctx),
- gpr_time_0(GPR_CLOCK_REALTIME));
+ &exec_ctx, &timers[0], 100,
+ GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)0, grpc_schedule_on_exec_ctx));
grpc_timer_init(
- &exec_ctx, &timers[1], tfm(3),
- GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)1, grpc_schedule_on_exec_ctx),
- gpr_time_0(GPR_CLOCK_REALTIME));
+ &exec_ctx, &timers[1], 3,
+ GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)1, grpc_schedule_on_exec_ctx));
grpc_timer_init(
- &exec_ctx, &timers[2], tfm(100),
- GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)2, grpc_schedule_on_exec_ctx),
- gpr_time_0(GPR_CLOCK_REALTIME));
+ &exec_ctx, &timers[2], 100,
+ GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)2, grpc_schedule_on_exec_ctx));
grpc_timer_init(
- &exec_ctx, &timers[3], tfm(3),
- GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)3, grpc_schedule_on_exec_ctx),
- gpr_time_0(GPR_CLOCK_REALTIME));
+ &exec_ctx, &timers[3], 3,
+ GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)3, grpc_schedule_on_exec_ctx));
grpc_timer_init(
- &exec_ctx, &timers[4], tfm(1),
- GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)4, grpc_schedule_on_exec_ctx),
- gpr_time_0(GPR_CLOCK_REALTIME));
- GPR_ASSERT(grpc_timer_check(&exec_ctx, tfm(2), NULL) == GRPC_TIMERS_FIRED);
+ &exec_ctx, &timers[4], 1,
+ GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)4, grpc_schedule_on_exec_ctx));
+ exec_ctx.now = 2;
+ GPR_ASSERT(grpc_timer_check(&exec_ctx, NULL) == GRPC_TIMERS_FIRED);
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(1 == cb_called[4][1]);
grpc_timer_cancel(&exec_ctx, &timers[0]);
diff --git a/test/core/iomgr/udp_server_test.c b/test/core/iomgr/udp_server_test.c
index 1d051bea62..2e44d0abc8 100644
--- a/test/core/iomgr/udp_server_test.c
+++ b/test/core/iomgr/udp_server_test.c
@@ -226,7 +226,7 @@ static void test_receive(int number_of_clients) {
grpc_udp_server *s = grpc_udp_server_create(NULL);
int i;
int number_of_reads_before;
- gpr_timespec deadline;
+ grpc_millis deadline;
grpc_pollset *pollsets[1];
LOG_TEST("test_receive");
gpr_log(GPR_INFO, "clients=%d", number_of_clients);
@@ -252,7 +252,8 @@ static void test_receive(int number_of_clients) {
gpr_mu_lock(g_mu);
for (i = 0; i < number_of_clients; i++) {
- deadline = grpc_timeout_seconds_to_deadline(10);
+ deadline =
+ grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(10));
number_of_reads_before = g_number_of_reads;
/* Create a socket, send a packet to the UDP server. */
@@ -262,14 +263,13 @@ static void test_receive(int number_of_clients) {
(socklen_t)resolved_addr.len) == 0);
GPR_ASSERT(5 == write(clifd, "hello", 5));
while (g_number_of_reads == number_of_reads_before &&
- gpr_time_cmp(deadline, gpr_now(deadline.clock_type)) > 0) {
+ deadline > grpc_exec_ctx_now(&exec_ctx)) {
grpc_pollset_worker *worker = NULL;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
- grpc_pollset_work(&exec_ctx, g_pollset, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC), deadline)));
+ grpc_pollset_work(&exec_ctx, g_pollset, &worker, deadline)));
gpr_mu_unlock(g_mu);
- grpc_exec_ctx_finish(&exec_ctx);
+ grpc_exec_ctx_flush(&exec_ctx);
gpr_mu_lock(g_mu);
}
GPR_ASSERT(g_number_of_reads == number_of_reads_before + 1);
diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c
index 441c431135..34f310142c 100644
--- a/test/core/security/credentials_test.c
+++ b/test/core/security/credentials_test.c
@@ -194,14 +194,13 @@ static void test_add_abunch_to_md_array(void) {
static void test_oauth2_token_fetcher_creds_parsing_ok(void) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_mdelem token_md = GRPC_MDNULL;
- gpr_timespec token_lifetime;
+ grpc_millis token_lifetime;
grpc_httpcli_response response =
http_response(200, valid_oauth2_json_response);
GPR_ASSERT(grpc_oauth2_token_fetcher_credentials_parse_server_response(
&exec_ctx, &response, &token_md, &token_lifetime) ==
GRPC_CREDENTIALS_OK);
- GPR_ASSERT(token_lifetime.tv_sec == 3599);
- GPR_ASSERT(token_lifetime.tv_nsec == 0);
+ GPR_ASSERT(token_lifetime == 3599 * GPR_MS_PER_SEC);
GPR_ASSERT(grpc_slice_str_cmp(GRPC_MDKEY(token_md), "authorization") == 0);
GPR_ASSERT(grpc_slice_str_cmp(GRPC_MDVALUE(token_md),
"Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") ==
@@ -214,7 +213,7 @@ static void test_oauth2_token_fetcher_creds_parsing_ok(void) {
static void test_oauth2_token_fetcher_creds_parsing_bad_http_status(void) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_mdelem token_md = GRPC_MDNULL;
- gpr_timespec token_lifetime;
+ grpc_millis token_lifetime;
grpc_httpcli_response response =
http_response(401, valid_oauth2_json_response);
GPR_ASSERT(grpc_oauth2_token_fetcher_credentials_parse_server_response(
@@ -227,7 +226,7 @@ static void test_oauth2_token_fetcher_creds_parsing_bad_http_status(void) {
static void test_oauth2_token_fetcher_creds_parsing_empty_http_body(void) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_mdelem token_md = GRPC_MDNULL;
- gpr_timespec token_lifetime;
+ grpc_millis token_lifetime;
grpc_httpcli_response response = http_response(200, "");
GPR_ASSERT(grpc_oauth2_token_fetcher_credentials_parse_server_response(
&exec_ctx, &response, &token_md, &token_lifetime) ==
@@ -239,7 +238,7 @@ static void test_oauth2_token_fetcher_creds_parsing_empty_http_body(void) {
static void test_oauth2_token_fetcher_creds_parsing_invalid_json(void) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_mdelem token_md = GRPC_MDNULL;
- gpr_timespec token_lifetime;
+ grpc_millis token_lifetime;
grpc_httpcli_response response =
http_response(200,
"{\"access_token\":\"ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_\","
@@ -255,7 +254,7 @@ static void test_oauth2_token_fetcher_creds_parsing_invalid_json(void) {
static void test_oauth2_token_fetcher_creds_parsing_missing_token(void) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_mdelem token_md = GRPC_MDNULL;
- gpr_timespec token_lifetime;
+ grpc_millis token_lifetime;
grpc_httpcli_response response = http_response(200,
"{"
" \"expires_in\":3599, "
@@ -270,7 +269,7 @@ static void test_oauth2_token_fetcher_creds_parsing_missing_token(void) {
static void test_oauth2_token_fetcher_creds_parsing_missing_token_type(void) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_mdelem token_md = GRPC_MDNULL;
- gpr_timespec token_lifetime;
+ grpc_millis token_lifetime;
grpc_httpcli_response response =
http_response(200,
"{\"access_token\":\"ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_\","
@@ -287,7 +286,7 @@ static void test_oauth2_token_fetcher_creds_parsing_missing_token_lifetime(
void) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_mdelem token_md = GRPC_MDNULL;
- gpr_timespec token_lifetime;
+ grpc_millis token_lifetime;
grpc_httpcli_response response =
http_response(200,
"{\"access_token\":\"ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_\","
@@ -555,7 +554,7 @@ static void validate_compute_engine_http_request(
static int compute_engine_httpcli_get_success_override(
grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request,
- gpr_timespec deadline, grpc_closure *on_done,
+ grpc_millis deadline, grpc_closure *on_done,
grpc_httpcli_response *response) {
validate_compute_engine_http_request(request);
*response = http_response(200, valid_oauth2_json_response);
@@ -565,7 +564,7 @@ static int compute_engine_httpcli_get_success_override(
static int compute_engine_httpcli_get_failure_override(
grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request,
- gpr_timespec deadline, grpc_closure *on_done,
+ grpc_millis deadline, grpc_closure *on_done,
grpc_httpcli_response *response) {
validate_compute_engine_http_request(request);
*response = http_response(403, "Not Authorized.");
@@ -575,7 +574,7 @@ static int compute_engine_httpcli_get_failure_override(
static int httpcli_post_should_not_be_called(
grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request,
- const char *body_bytes, size_t body_size, gpr_timespec deadline,
+ const char *body_bytes, size_t body_size, grpc_millis deadline,
grpc_closure *on_done, grpc_httpcli_response *response) {
GPR_ASSERT("HTTP POST should not be called" == NULL);
return 1;
@@ -583,7 +582,7 @@ static int httpcli_post_should_not_be_called(
static int httpcli_get_should_not_be_called(grpc_exec_ctx *exec_ctx,
const grpc_httpcli_request *request,
- gpr_timespec deadline,
+ grpc_millis deadline,
grpc_closure *on_done,
grpc_httpcli_response *response) {
GPR_ASSERT("HTTP GET should not be called" == NULL);
@@ -663,7 +662,7 @@ static void validate_refresh_token_http_request(
static int refresh_token_httpcli_post_success(
grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request,
- const char *body, size_t body_size, gpr_timespec deadline,
+ const char *body, size_t body_size, grpc_millis deadline,
grpc_closure *on_done, grpc_httpcli_response *response) {
validate_refresh_token_http_request(request, body, body_size);
*response = http_response(200, valid_oauth2_json_response);
@@ -673,7 +672,7 @@ static int refresh_token_httpcli_post_success(
static int refresh_token_httpcli_post_failure(
grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request,
- const char *body, size_t body_size, gpr_timespec deadline,
+ const char *body, size_t body_size, grpc_millis deadline,
grpc_closure *on_done, grpc_httpcli_response *response) {
validate_refresh_token_http_request(request, body, body_size);
*response = http_response(403, "Not Authorized.");
@@ -932,7 +931,7 @@ static void test_google_default_creds_refresh_token(void) {
static int default_creds_gce_detection_httpcli_get_success_override(
grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request,
- gpr_timespec deadline, grpc_closure *on_done,
+ grpc_millis deadline, grpc_closure *on_done,
grpc_httpcli_response *response) {
*response = http_response(200, "");
grpc_http_header *headers = gpr_malloc(sizeof(*headers) * 1);
@@ -996,7 +995,7 @@ static void test_google_default_creds_gce(void) {
static int default_creds_gce_detection_httpcli_get_failure_override(
grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request,
- gpr_timespec deadline, grpc_closure *on_done,
+ grpc_millis deadline, grpc_closure *on_done,
grpc_httpcli_response *response) {
/* No magic header. */
GPR_ASSERT(strcmp(request->http.path, "/") == 0);
@@ -1036,39 +1035,46 @@ typedef enum {
static const expected_md plugin_md[] = {{"foo", "bar"}, {"hi", "there"}};
-static void plugin_get_metadata_success(void *state,
- grpc_auth_metadata_context context,
- grpc_credentials_plugin_metadata_cb cb,
- void *user_data) {
- size_t i;
- grpc_metadata md[GPR_ARRAY_SIZE(plugin_md)];
- plugin_state *s = (plugin_state *)state;
+static int plugin_get_metadata_success(
+ void *state, grpc_auth_metadata_context context,
+ grpc_credentials_plugin_metadata_cb cb, void *user_data,
+ grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
+ size_t *num_creds_md, grpc_status_code *status,
+ const char **error_details) {
GPR_ASSERT(strcmp(context.service_url, test_service_url) == 0);
GPR_ASSERT(strcmp(context.method_name, test_method) == 0);
GPR_ASSERT(context.channel_auth_context == NULL);
GPR_ASSERT(context.reserved == NULL);
+ GPR_ASSERT(GPR_ARRAY_SIZE(plugin_md) <
+ GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX);
+ plugin_state *s = (plugin_state *)state;
*s = PLUGIN_GET_METADATA_CALLED_STATE;
- for (i = 0; i < GPR_ARRAY_SIZE(plugin_md); i++) {
- memset(&md[i], 0, sizeof(grpc_metadata));
- md[i].key = grpc_slice_from_copied_string(plugin_md[i].key);
- md[i].value = grpc_slice_from_copied_string(plugin_md[i].value);
+ for (size_t i = 0; i < GPR_ARRAY_SIZE(plugin_md); ++i) {
+ memset(&creds_md[i], 0, sizeof(grpc_metadata));
+ creds_md[i].key = grpc_slice_from_copied_string(plugin_md[i].key);
+ creds_md[i].value = grpc_slice_from_copied_string(plugin_md[i].value);
}
- cb(user_data, md, GPR_ARRAY_SIZE(md), GRPC_STATUS_OK, NULL);
+ *num_creds_md = GPR_ARRAY_SIZE(plugin_md);
+ return true; // Synchronous return.
}
static const char *plugin_error_details = "Could not get metadata for plugin.";
-static void plugin_get_metadata_failure(void *state,
- grpc_auth_metadata_context context,
- grpc_credentials_plugin_metadata_cb cb,
- void *user_data) {
- plugin_state *s = (plugin_state *)state;
+static int plugin_get_metadata_failure(
+ void *state, grpc_auth_metadata_context context,
+ grpc_credentials_plugin_metadata_cb cb, void *user_data,
+ grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
+ size_t *num_creds_md, grpc_status_code *status,
+ const char **error_details) {
GPR_ASSERT(strcmp(context.service_url, test_service_url) == 0);
GPR_ASSERT(strcmp(context.method_name, test_method) == 0);
GPR_ASSERT(context.channel_auth_context == NULL);
GPR_ASSERT(context.reserved == NULL);
+ plugin_state *s = (plugin_state *)state;
*s = PLUGIN_GET_METADATA_CALLED_STATE;
- cb(user_data, NULL, 0, GRPC_STATUS_UNAUTHENTICATED, plugin_error_details);
+ *status = GRPC_STATUS_UNAUTHENTICATED;
+ *error_details = gpr_strdup(plugin_error_details);
+ return true; // Synchronous return.
}
static void plugin_destroy(void *state) {
diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c
index 9b17fb516d..a4bfe0130e 100644
--- a/test/core/security/jwt_verifier_test.c
+++ b/test/core/security/jwt_verifier_test.c
@@ -324,7 +324,7 @@ static grpc_httpcli_response http_response(int status, char *body) {
static int httpcli_post_should_not_be_called(
grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request,
- const char *body_bytes, size_t body_size, gpr_timespec deadline,
+ const char *body_bytes, size_t body_size, grpc_millis deadline,
grpc_closure *on_done, grpc_httpcli_response *response) {
GPR_ASSERT("HTTP POST should not be called" == NULL);
return 1;
@@ -332,7 +332,7 @@ static int httpcli_post_should_not_be_called(
static int httpcli_get_google_keys_for_email(
grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request,
- gpr_timespec deadline, grpc_closure *on_done,
+ grpc_millis deadline, grpc_closure *on_done,
grpc_httpcli_response *response) {
*response = http_response(200, good_google_email_keys());
GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl);
@@ -379,7 +379,7 @@ static void test_jwt_verifier_google_email_issuer_success(void) {
static int httpcli_get_custom_keys_for_email(
grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request,
- gpr_timespec deadline, grpc_closure *on_done,
+ grpc_millis deadline, grpc_closure *on_done,
grpc_httpcli_response *response) {
*response = http_response(200, gpr_strdup(good_jwk_set));
GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl);
@@ -413,7 +413,7 @@ static void test_jwt_verifier_custom_email_issuer_success(void) {
static int httpcli_get_jwk_set(grpc_exec_ctx *exec_ctx,
const grpc_httpcli_request *request,
- gpr_timespec deadline, grpc_closure *on_done,
+ grpc_millis deadline, grpc_closure *on_done,
grpc_httpcli_response *response) {
*response = http_response(200, gpr_strdup(good_jwk_set));
GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl);
@@ -425,7 +425,7 @@ static int httpcli_get_jwk_set(grpc_exec_ctx *exec_ctx,
static int httpcli_get_openid_config(grpc_exec_ctx *exec_ctx,
const grpc_httpcli_request *request,
- gpr_timespec deadline,
+ grpc_millis deadline,
grpc_closure *on_done,
grpc_httpcli_response *response) {
*response = http_response(200, gpr_strdup(good_openid_config));
@@ -471,7 +471,7 @@ static void on_verification_key_retrieval_error(grpc_exec_ctx *exec_ctx,
static int httpcli_get_bad_json(grpc_exec_ctx *exec_ctx,
const grpc_httpcli_request *request,
- gpr_timespec deadline, grpc_closure *on_done,
+ grpc_millis deadline, grpc_closure *on_done,
grpc_httpcli_response *response) {
*response = http_response(200, gpr_strdup("{\"bad\": \"stuff\"}"));
GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl);
@@ -581,7 +581,7 @@ static void test_jwt_verifier_bad_signature(void) {
static int httpcli_get_should_not_be_called(grpc_exec_ctx *exec_ctx,
const grpc_httpcli_request *request,
- gpr_timespec deadline,
+ grpc_millis deadline,
grpc_closure *on_done,
grpc_httpcli_response *response) {
GPR_ASSERT(0);
diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c
index d240403a29..73d6c5bc7d 100644
--- a/test/core/security/oauth2_utils.c
+++ b/test/core/security/oauth2_utils.c
@@ -104,8 +104,7 @@ char *grpc_test_fetch_oauth2_token_with_credentials(
"pollset_work",
grpc_pollset_work(&exec_ctx,
grpc_polling_entity_pollset(&request.pops),
- &worker, gpr_now(GPR_CLOCK_MONOTONIC),
- gpr_inf_future(GPR_CLOCK_MONOTONIC)))) {
+ &worker, GRPC_MILLIS_INF_FUTURE))) {
request.is_done = true;
}
}
diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c
index 3144717a85..29c38dfdf8 100644
--- a/test/core/security/print_google_default_creds_token.c
+++ b/test/core/security/print_google_default_creds_token.c
@@ -110,8 +110,7 @@ int main(int argc, char **argv) {
"pollset_work",
grpc_pollset_work(&exec_ctx,
grpc_polling_entity_pollset(&sync.pops), &worker,
- gpr_now(GPR_CLOCK_MONOTONIC),
- gpr_inf_future(GPR_CLOCK_MONOTONIC))))
+ GRPC_MILLIS_INF_FUTURE)))
sync.is_done = true;
gpr_mu_unlock(sync.mu);
grpc_exec_ctx_flush(&exec_ctx);
diff --git a/test/core/security/ssl_server_fuzzer.c b/test/core/security/ssl_server_fuzzer.c
index 9858b11c7c..f9b754b8f2 100644
--- a/test/core/security/ssl_server_fuzzer.c
+++ b/test/core/security/ssl_server_fuzzer.c
@@ -84,8 +84,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
grpc_security_status status =
grpc_server_credentials_create_security_connector(&exec_ctx, creds, &sc);
GPR_ASSERT(status == GRPC_SECURITY_OK);
- gpr_timespec deadline = gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC),
- gpr_time_from_seconds(1, GPR_TIMESPAN));
+ grpc_millis deadline = GPR_MS_PER_SEC + grpc_exec_ctx_now(&exec_ctx);
struct handshake_state state;
state.done_callback_called = false;
diff --git a/test/core/security/verify_jwt.c b/test/core/security/verify_jwt.c
index 5faa6352a8..cec6fb94b4 100644
--- a/test/core/security/verify_jwt.c
+++ b/test/core/security/verify_jwt.c
@@ -102,11 +102,9 @@ int main(int argc, char **argv) {
gpr_mu_lock(sync.mu);
while (!sync.is_done) {
grpc_pollset_worker *worker = NULL;
- if (!GRPC_LOG_IF_ERROR(
- "pollset_work",
- grpc_pollset_work(&exec_ctx, sync.pollset, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC),
- gpr_inf_future(GPR_CLOCK_MONOTONIC))))
+ if (!GRPC_LOG_IF_ERROR("pollset_work",
+ grpc_pollset_work(&exec_ctx, sync.pollset, &worker,
+ GRPC_MILLIS_INF_FUTURE)))
sync.is_done = true;
gpr_mu_unlock(sync.mu);
grpc_exec_ctx_flush(&exec_ctx);
diff --git a/test/core/slice/BUILD b/test/core/slice/BUILD
index f86a3a6082..ad2308a4d6 100644
--- a/test/core/slice/BUILD
+++ b/test/core/slice/BUILD
@@ -21,10 +21,22 @@ licenses(["notice"]) # Apache v2
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
grpc_fuzzer(
+ name = "percent_encode_fuzzer",
+ srcs = ["percent_encode_fuzzer.c"],
+ language = "C",
+ corpus = "percent_encode_corpus",
+ deps = [
+ "//:gpr",
+ "//:grpc",
+ "//test/core/util:grpc_test_util",
+ ],
+)
+
+grpc_fuzzer(
name = "percent_decode_fuzzer",
srcs = ["percent_decode_fuzzer.c"],
language = "C",
- corpus = "response_corpus",
+ corpus = "percent_decode_corpus",
deps = [
"//:gpr",
"//:grpc",
diff --git a/test/core/support/BUILD b/test/core/support/BUILD
index 096576e13c..407c3eff7b 100644
--- a/test/core/support/BUILD
+++ b/test/core/support/BUILD
@@ -39,16 +39,6 @@ grpc_cc_test(
)
grpc_cc_test(
- name = "backoff_test",
- srcs = ["backoff_test.c"],
- language = "C",
- deps = [
- "//:gpr",
- "//test/core/util:gpr_test_util",
- ],
-)
-
-grpc_cc_test(
name = "cmdline_test",
srcs = ["cmdline_test.c"],
language = "C",
diff --git a/test/core/support/backoff_test.c b/test/core/support/backoff_test.c
deleted file mode 100644
index 23e3005af0..0000000000
--- a/test/core/support/backoff_test.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- *
- * Copyright 2016 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "src/core/lib/support/backoff.h"
-
-#include <grpc/support/log.h>
-
-#include "test/core/util/test_config.h"
-
-static void test_constant_backoff(void) {
- gpr_backoff backoff;
- gpr_backoff_init(&backoff, 200 /* initial timeout */, 1.0 /* multiplier */,
- 0.0 /* jitter */, 100 /* min timeout */,
- 1000 /* max timeout */);
-
- gpr_timespec now = gpr_time_0(GPR_TIMESPAN);
- gpr_timespec next = gpr_backoff_begin(&backoff, now);
- GPR_ASSERT(gpr_time_to_millis(gpr_time_sub(next, now)) == 200);
- for (int i = 0; i < 10000; i++) {
- next = gpr_backoff_step(&backoff, now);
- GPR_ASSERT(gpr_time_to_millis(gpr_time_sub(next, now)) == 200);
- now = next;
- }
-}
-
-static void test_min_connect(void) {
- gpr_backoff backoff;
- gpr_backoff_init(&backoff, 100 /* initial timeout */, 1.0 /* multiplier */,
- 0.0 /* jitter */, 200 /* min timeout */,
- 1000 /* max timeout */);
-
- gpr_timespec now = gpr_time_0(GPR_TIMESPAN);
- gpr_timespec next = gpr_backoff_begin(&backoff, now);
- GPR_ASSERT(gpr_time_to_millis(gpr_time_sub(next, now)) == 200);
-}
-
-static void test_no_jitter_backoff(void) {
- gpr_backoff backoff;
- gpr_backoff_init(&backoff, 2 /* initial timeout */, 2.0 /* multiplier */,
- 0.0 /* jitter */, 1 /* min timeout */,
- 513 /* max timeout */);
- // x_1 = 2
- // x_n = 2**i + x_{i-1} ( = 2**(n+1) - 2 )
- gpr_timespec now = gpr_time_0(GPR_TIMESPAN);
- gpr_timespec next = gpr_backoff_begin(&backoff, now);
- GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(2, GPR_TIMESPAN), next) == 0);
- now = next;
- next = gpr_backoff_step(&backoff, now);
- GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(6, GPR_TIMESPAN), next) == 0);
- now = next;
- next = gpr_backoff_step(&backoff, now);
- GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(14, GPR_TIMESPAN), next) == 0);
- now = next;
- next = gpr_backoff_step(&backoff, now);
- GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(30, GPR_TIMESPAN), next) == 0);
- now = next;
- next = gpr_backoff_step(&backoff, now);
- GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(62, GPR_TIMESPAN), next) == 0);
- now = next;
- next = gpr_backoff_step(&backoff, now);
- GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(126, GPR_TIMESPAN), next) == 0);
- now = next;
- next = gpr_backoff_step(&backoff, now);
- GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(254, GPR_TIMESPAN), next) == 0);
- now = next;
- next = gpr_backoff_step(&backoff, now);
- GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(510, GPR_TIMESPAN), next) == 0);
- now = next;
- next = gpr_backoff_step(&backoff, now);
- GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(1022, GPR_TIMESPAN), next) == 0);
- now = next;
- next = gpr_backoff_step(&backoff, now);
- // Hit the maximum timeout. From this point onwards, retries will increase
- // only by max timeout.
- GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(1535, GPR_TIMESPAN), next) == 0);
- now = next;
- next = gpr_backoff_step(&backoff, now);
- GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(2048, GPR_TIMESPAN), next) == 0);
- now = next;
- next = gpr_backoff_step(&backoff, now);
- GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(2561, GPR_TIMESPAN), next) == 0);
-}
-
-static void test_jitter_backoff(void) {
- const int64_t initial_timeout = 500;
- const double jitter = 0.1;
- gpr_backoff backoff;
- gpr_backoff_init(&backoff, initial_timeout, 1.0 /* multiplier */, jitter,
- 100 /* min timeout */, 1000 /* max timeout */);
-
- backoff.rng_state = 0; // force consistent PRNG
-
- gpr_timespec now = gpr_time_0(GPR_TIMESPAN);
- gpr_timespec next = gpr_backoff_begin(&backoff, now);
- GPR_ASSERT(gpr_time_to_millis(gpr_time_sub(next, now)) == 500);
-
- int64_t expected_next_lower_bound =
- (int64_t)((double)initial_timeout * (1 - jitter));
- int64_t expected_next_upper_bound =
- (int64_t)((double)initial_timeout * (1 + jitter));
-
- for (int i = 0; i < 10000; i++) {
- next = gpr_backoff_step(&backoff, now);
-
- // next-now must be within (jitter*100)% of the previous timeout.
- const int64_t timeout_millis = gpr_time_to_millis(gpr_time_sub(next, now));
- GPR_ASSERT(timeout_millis >= expected_next_lower_bound);
- GPR_ASSERT(timeout_millis <= expected_next_upper_bound);
-
- expected_next_lower_bound =
- (int64_t)((double)timeout_millis * (1 - jitter));
- expected_next_upper_bound =
- (int64_t)((double)timeout_millis * (1 + jitter));
- now = next;
- }
-}
-
-int main(int argc, char **argv) {
- grpc_test_init(argc, argv);
- gpr_time_init();
-
- test_constant_backoff();
- test_min_connect();
- test_no_jitter_backoff();
- test_jitter_backoff();
-
- return 0;
-}
diff --git a/test/core/surface/concurrent_connectivity_test.c b/test/core/surface/concurrent_connectivity_test.c
index ec2cd8610b..3595885ff6 100644
--- a/test/core/surface/concurrent_connectivity_test.c
+++ b/test/core/surface/concurrent_connectivity_test.c
@@ -135,14 +135,12 @@ void bad_server_thread(void *vargs) {
gpr_mu_lock(args->mu);
while (gpr_atm_acq_load(&args->stop) == 0) {
- gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
- gpr_timespec deadline =
- gpr_time_add(now, gpr_time_from_millis(100, GPR_TIMESPAN));
+ grpc_millis deadline = grpc_exec_ctx_now(&exec_ctx) + 100;
grpc_pollset_worker *worker = NULL;
- if (!GRPC_LOG_IF_ERROR("pollset_work",
- grpc_pollset_work(&exec_ctx, args->pollset, &worker,
- now, deadline))) {
+ if (!GRPC_LOG_IF_ERROR(
+ "pollset_work",
+ grpc_pollset_work(&exec_ctx, args->pollset, &worker, deadline))) {
gpr_atm_rel_store(&args->stop, 1);
}
gpr_mu_unlock(args->mu);
diff --git a/test/core/surface/invalid_channel_args_test.c b/test/core/surface/invalid_channel_args_test.c
index 84d7627d29..9c84c30f03 100644
--- a/test/core/surface/invalid_channel_args_test.c
+++ b/test/core/surface/invalid_channel_args_test.c
@@ -25,7 +25,7 @@
#include "test/core/util/test_config.h"
static char *g_last_log_error_message = NULL;
-static const char *g_file_name = "channel.c";
+static const char *g_file_name = "channel.cc";
static int ends_with(const char *src, const char *suffix) {
size_t src_len = strlen(src);
diff --git a/test/core/transport/bdp_estimator_test.c b/test/core/transport/bdp_estimator_test.c
index dda48f45b1..4912ad5887 100644
--- a/test/core/transport/bdp_estimator_test.c
+++ b/test/core/transport/bdp_estimator_test.c
@@ -24,9 +24,22 @@
#include <grpc/support/string_util.h>
#include <grpc/support/useful.h>
#include <limits.h>
+#include "src/core/lib/iomgr/timer_manager.h"
#include "src/core/lib/support/string.h"
#include "test/core/util/test_config.h"
+extern gpr_timespec (*gpr_now_impl)(gpr_clock_type clock_type);
+
+static int g_clock = 0;
+
+static gpr_timespec fake_gpr_now(gpr_clock_type clock_type) {
+ return (gpr_timespec){
+ .tv_sec = g_clock, .tv_nsec = 0, .clock_type = clock_type,
+ };
+}
+
+static void inc_time(void) { g_clock += 30; }
+
static void test_noop(void) {
gpr_log(GPR_INFO, "test_noop");
grpc_bdp_estimator est;
@@ -44,16 +57,19 @@ static void test_get_estimate_no_samples(void) {
static void add_samples(grpc_bdp_estimator *estimator, int64_t *samples,
size_t n) {
grpc_bdp_estimator_add_incoming_bytes(estimator, 1234567);
- GPR_ASSERT(grpc_bdp_estimator_need_ping(estimator) == true);
+ inc_time();
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ GPR_ASSERT(grpc_bdp_estimator_need_ping(&exec_ctx, estimator) == true);
grpc_bdp_estimator_schedule_ping(estimator);
grpc_bdp_estimator_start_ping(estimator);
for (size_t i = 0; i < n; i++) {
grpc_bdp_estimator_add_incoming_bytes(estimator, samples[i]);
- GPR_ASSERT(grpc_bdp_estimator_need_ping(estimator) == false);
+ GPR_ASSERT(grpc_bdp_estimator_need_ping(&exec_ctx, estimator) == false);
}
gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
gpr_time_from_millis(1, GPR_TIMESPAN)));
- grpc_bdp_estimator_complete_ping(estimator);
+ grpc_bdp_estimator_complete_ping(&exec_ctx, estimator);
+ grpc_exec_ctx_finish(&exec_ctx);
}
static void add_sample(grpc_bdp_estimator *estimator, int64_t sample) {
@@ -130,7 +146,9 @@ static void test_get_estimate_random_values(size_t n) {
int main(int argc, char **argv) {
grpc_test_init(argc, argv);
+ gpr_now_impl = fake_gpr_now;
grpc_init();
+ grpc_timer_manager_set_threading(false);
test_noop();
test_get_estimate_no_samples();
test_get_estimate_1_sample();
diff --git a/test/core/transport/status_conversion_test.c b/test/core/transport/status_conversion_test.c
index 89558964c1..de8fa4458a 100644
--- a/test/core/transport/status_conversion_test.c
+++ b/test/core/transport/status_conversion_test.c
@@ -22,8 +22,13 @@
#define GRPC_STATUS_TO_HTTP2_ERROR(a, b) \
GPR_ASSERT(grpc_status_to_http2_error(a) == (b))
-#define HTTP2_ERROR_TO_GRPC_STATUS(a, deadline, b) \
- GPR_ASSERT(grpc_http2_error_to_grpc_status(a, deadline) == (b))
+#define HTTP2_ERROR_TO_GRPC_STATUS(a, deadline, b) \
+ do { \
+ grpc_exec_ctx my_exec_ctx = GRPC_EXEC_CTX_INIT; \
+ GPR_ASSERT(grpc_http2_error_to_grpc_status(&my_exec_ctx, a, deadline) == \
+ (b)); \
+ grpc_exec_ctx_finish(&my_exec_ctx); \
+ } while (0)
#define GRPC_STATUS_TO_HTTP2_STATUS(a, b) \
GPR_ASSERT(grpc_status_to_http2_status(a) == (b))
#define HTTP2_STATUS_TO_GRPC_STATUS(a, b) \
@@ -79,7 +84,7 @@ int main(int argc, char **argv) {
GRPC_STATUS_TO_HTTP2_STATUS(GRPC_STATUS_UNAVAILABLE, 200);
GRPC_STATUS_TO_HTTP2_STATUS(GRPC_STATUS_DATA_LOSS, 200);
- const gpr_timespec before_deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
+ const grpc_millis before_deadline = GRPC_MILLIS_INF_FUTURE;
HTTP2_ERROR_TO_GRPC_STATUS(GRPC_HTTP2_NO_ERROR, before_deadline,
GRPC_STATUS_INTERNAL);
HTTP2_ERROR_TO_GRPC_STATUS(GRPC_HTTP2_PROTOCOL_ERROR, before_deadline,
@@ -107,7 +112,7 @@ int main(int argc, char **argv) {
HTTP2_ERROR_TO_GRPC_STATUS(GRPC_HTTP2_INADEQUATE_SECURITY, before_deadline,
GRPC_STATUS_PERMISSION_DENIED);
- const gpr_timespec after_deadline = gpr_inf_past(GPR_CLOCK_MONOTONIC);
+ const grpc_millis after_deadline = 0;
HTTP2_ERROR_TO_GRPC_STATUS(GRPC_HTTP2_NO_ERROR, after_deadline,
GRPC_STATUS_INTERNAL);
HTTP2_ERROR_TO_GRPC_STATUS(GRPC_HTTP2_PROTOCOL_ERROR, after_deadline,
diff --git a/test/core/transport/timeout_encoding_test.c b/test/core/transport/timeout_encoding_test.c
index 6388ffbcec..3010c6d057 100644
--- a/test/core/transport/timeout_encoding_test.c
+++ b/test/core/transport/timeout_encoding_test.c
@@ -25,12 +25,13 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/useful.h>
+#include "src/core/lib/support/murmur_hash.h"
#include "src/core/lib/support/string.h"
#include "test/core/util/test_config.h"
#define LOG_TEST(x) gpr_log(GPR_INFO, "%s", x)
-static void assert_encodes_as(gpr_timespec ts, const char *s) {
+static void assert_encodes_as(grpc_millis ts, const char *s) {
char buffer[GRPC_HTTP2_TIMEOUT_ENCODE_MIN_BUFSIZE];
grpc_http2_encode_timeout(ts, buffer);
gpr_log(GPR_INFO, "check '%s' == '%s'", buffer, s);
@@ -39,47 +40,43 @@ static void assert_encodes_as(gpr_timespec ts, const char *s) {
void test_encoding(void) {
LOG_TEST("test_encoding");
- assert_encodes_as(gpr_time_from_micros(-1, GPR_TIMESPAN), "1n");
- assert_encodes_as(gpr_time_from_seconds(-10, GPR_TIMESPAN), "1n");
- assert_encodes_as(gpr_time_from_nanos(10, GPR_TIMESPAN), "10n");
- assert_encodes_as(gpr_time_from_nanos(999999999, GPR_TIMESPAN), "1S");
- assert_encodes_as(gpr_time_from_micros(1, GPR_TIMESPAN), "1u");
- assert_encodes_as(gpr_time_from_micros(10, GPR_TIMESPAN), "10u");
- assert_encodes_as(gpr_time_from_micros(100, GPR_TIMESPAN), "100u");
- assert_encodes_as(gpr_time_from_micros(890, GPR_TIMESPAN), "890u");
- assert_encodes_as(gpr_time_from_micros(900, GPR_TIMESPAN), "900u");
- assert_encodes_as(gpr_time_from_micros(901, GPR_TIMESPAN), "901u");
- assert_encodes_as(gpr_time_from_millis(1, GPR_TIMESPAN), "1m");
- assert_encodes_as(gpr_time_from_millis(2, GPR_TIMESPAN), "2m");
- assert_encodes_as(gpr_time_from_micros(10001, GPR_TIMESPAN), "10100u");
- assert_encodes_as(gpr_time_from_micros(999999, GPR_TIMESPAN), "1S");
- assert_encodes_as(gpr_time_from_millis(1000, GPR_TIMESPAN), "1S");
- assert_encodes_as(gpr_time_from_millis(2000, GPR_TIMESPAN), "2S");
- assert_encodes_as(gpr_time_from_millis(2500, GPR_TIMESPAN), "2500m");
- assert_encodes_as(gpr_time_from_millis(59900, GPR_TIMESPAN), "59900m");
- assert_encodes_as(gpr_time_from_seconds(50, GPR_TIMESPAN), "50S");
- assert_encodes_as(gpr_time_from_seconds(59, GPR_TIMESPAN), "59S");
- assert_encodes_as(gpr_time_from_seconds(60, GPR_TIMESPAN), "1M");
- assert_encodes_as(gpr_time_from_seconds(80, GPR_TIMESPAN), "80S");
- assert_encodes_as(gpr_time_from_seconds(90, GPR_TIMESPAN), "90S");
- assert_encodes_as(gpr_time_from_minutes(2, GPR_TIMESPAN), "2M");
- assert_encodes_as(gpr_time_from_minutes(20, GPR_TIMESPAN), "20M");
- assert_encodes_as(gpr_time_from_hours(1, GPR_TIMESPAN), "1H");
- assert_encodes_as(gpr_time_from_hours(10, GPR_TIMESPAN), "10H");
- assert_encodes_as(gpr_time_from_seconds(1000000000, GPR_TIMESPAN),
- "1000000000S");
+ assert_encodes_as(-1, "1n");
+ assert_encodes_as(-10, "1n");
+ assert_encodes_as(1, "1m");
+ assert_encodes_as(10, "10m");
+ assert_encodes_as(100, "100m");
+ assert_encodes_as(890, "890m");
+ assert_encodes_as(900, "900m");
+ assert_encodes_as(901, "901m");
+ assert_encodes_as(1000, "1S");
+ assert_encodes_as(2000, "2S");
+ assert_encodes_as(2500, "2500m");
+ assert_encodes_as(59900, "59900m");
+ assert_encodes_as(50000, "50S");
+ assert_encodes_as(59000, "59S");
+ assert_encodes_as(60000, "1M");
+ assert_encodes_as(80000, "80S");
+ assert_encodes_as(90000, "90S");
+ assert_encodes_as(120000, "2M");
+ assert_encodes_as(20 * 60 * GPR_MS_PER_SEC, "20M");
+ assert_encodes_as(60 * 60 * GPR_MS_PER_SEC, "1H");
+ assert_encodes_as(10 * 60 * 60 * GPR_MS_PER_SEC, "10H");
}
-static void assert_decodes_as(const char *buffer, gpr_timespec expected) {
- gpr_timespec got;
- gpr_log(GPR_INFO, "check decoding '%s'", buffer);
+static void assert_decodes_as(const char *buffer, grpc_millis expected) {
+ grpc_millis got;
+ uint32_t hash = gpr_murmur_hash3(buffer, strlen(buffer), 0);
+ gpr_log(GPR_INFO, "check decoding '%s' (hash=0x%x)", buffer, hash);
GPR_ASSERT(1 == grpc_http2_decode_timeout(
grpc_slice_from_static_string(buffer), &got));
- GPR_ASSERT(0 == gpr_time_cmp(got, expected));
+ if (got != expected) {
+ gpr_log(GPR_ERROR, "got:'%" PRIdPTR "' != expected:'%" PRIdPTR "'", got,
+ expected);
+ abort();
+ }
}
-void decode_suite(char ext,
- gpr_timespec (*answer)(int64_t x, gpr_clock_type clock)) {
+void decode_suite(char ext, grpc_millis (*answer)(int64_t x)) {
long test_vals[] = {1, 12, 123, 1234, 12345, 123456,
1234567, 12345678, 123456789, 98765432, 9876543, 987654,
98765, 9876, 987, 98, 9};
@@ -87,41 +84,55 @@ void decode_suite(char ext,
char *input;
for (i = 0; i < GPR_ARRAY_SIZE(test_vals); i++) {
gpr_asprintf(&input, "%ld%c", test_vals[i], ext);
- assert_decodes_as(input, answer(test_vals[i], GPR_TIMESPAN));
+ assert_decodes_as(input, answer(test_vals[i]));
gpr_free(input);
gpr_asprintf(&input, " %ld%c", test_vals[i], ext);
- assert_decodes_as(input, answer(test_vals[i], GPR_TIMESPAN));
+ assert_decodes_as(input, answer(test_vals[i]));
gpr_free(input);
gpr_asprintf(&input, "%ld %c", test_vals[i], ext);
- assert_decodes_as(input, answer(test_vals[i], GPR_TIMESPAN));
+ assert_decodes_as(input, answer(test_vals[i]));
gpr_free(input);
gpr_asprintf(&input, "%ld %c ", test_vals[i], ext);
- assert_decodes_as(input, answer(test_vals[i], GPR_TIMESPAN));
+ assert_decodes_as(input, answer(test_vals[i]));
gpr_free(input);
}
}
+static grpc_millis millis_from_nanos(int64_t x) {
+ return x / GPR_NS_PER_MS + (x % GPR_NS_PER_MS != 0);
+}
+static grpc_millis millis_from_micros(int64_t x) {
+ return x / GPR_US_PER_MS + (x % GPR_US_PER_MS != 0);
+}
+static grpc_millis millis_from_millis(int64_t x) { return x; }
+static grpc_millis millis_from_seconds(int64_t x) { return x * GPR_MS_PER_SEC; }
+static grpc_millis millis_from_minutes(int64_t x) {
+ return x * 60 * GPR_MS_PER_SEC;
+}
+static grpc_millis millis_from_hours(int64_t x) {
+ return x * 3600 * GPR_MS_PER_SEC;
+}
+
void test_decoding(void) {
LOG_TEST("test_decoding");
- decode_suite('n', gpr_time_from_nanos);
- decode_suite('u', gpr_time_from_micros);
- decode_suite('m', gpr_time_from_millis);
- decode_suite('S', gpr_time_from_seconds);
- decode_suite('M', gpr_time_from_minutes);
- decode_suite('H', gpr_time_from_hours);
- assert_decodes_as("1000000000S",
- gpr_time_from_seconds(1000 * 1000 * 1000, GPR_TIMESPAN));
- assert_decodes_as("1000000000000000000000u", gpr_inf_future(GPR_TIMESPAN));
- assert_decodes_as("1000000001S", gpr_inf_future(GPR_TIMESPAN));
- assert_decodes_as("2000000001S", gpr_inf_future(GPR_TIMESPAN));
- assert_decodes_as("9999999999S", gpr_inf_future(GPR_TIMESPAN));
+ decode_suite('n', millis_from_nanos);
+ decode_suite('u', millis_from_micros);
+ decode_suite('m', millis_from_millis);
+ decode_suite('S', millis_from_seconds);
+ decode_suite('M', millis_from_minutes);
+ decode_suite('H', millis_from_hours);
+ assert_decodes_as("1000000000S", millis_from_seconds(1000 * 1000 * 1000));
+ assert_decodes_as("1000000000000000000000u", GRPC_MILLIS_INF_FUTURE);
+ assert_decodes_as("1000000001S", GRPC_MILLIS_INF_FUTURE);
+ assert_decodes_as("2000000001S", GRPC_MILLIS_INF_FUTURE);
+ assert_decodes_as("9999999999S", GRPC_MILLIS_INF_FUTURE);
}
static void assert_decoding_fails(const char *s) {
- gpr_timespec x;
+ grpc_millis x;
GPR_ASSERT(0 ==
grpc_http2_decode_timeout(grpc_slice_from_static_string(s), &x));
}
diff --git a/test/core/tsi/transport_security_test_lib.c b/test/core/tsi/transport_security_test_lib.c
index 7d66e110f2..329b2371bf 100644
--- a/test/core/tsi/transport_security_test_lib.c
+++ b/test/core/tsi/transport_security_test_lib.c
@@ -23,9 +23,26 @@
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include <grpc/support/thd.h>
#include "src/core/lib/security/transport/tsi_error.h"
#include "test/core/tsi/transport_security_test_lib.h"
+static void notification_signal(tsi_test_fixture *fixture) {
+ gpr_mu_lock(&fixture->mu);
+ fixture->notified = true;
+ gpr_cv_signal(&fixture->cv);
+ gpr_mu_unlock(&fixture->mu);
+}
+
+static void notification_wait(tsi_test_fixture *fixture) {
+ gpr_mu_lock(&fixture->mu);
+ while (!fixture->notified) {
+ gpr_cv_wait(&fixture->cv, &fixture->mu, gpr_inf_future(GPR_CLOCK_REALTIME));
+ }
+ fixture->notified = false;
+ gpr_mu_unlock(&fixture->mu);
+}
+
typedef struct handshaker_args {
tsi_test_fixture *fixture;
unsigned char *handshake_buffer;
@@ -273,9 +290,11 @@ grpc_error *on_handshake_next_done(tsi_result result, void *user_data,
/* Read more data if we need to. */
if (result == TSI_INCOMPLETE_DATA) {
GPR_ASSERT(bytes_to_send_size == 0);
+ notification_signal(fixture);
return error;
}
if (result != TSI_OK) {
+ notification_signal(fixture);
return grpc_set_tsi_error_result(
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Handshake failed"), result);
}
@@ -295,6 +314,7 @@ grpc_error *on_handshake_next_done(tsi_result result, void *user_data,
if (handshaker_result != NULL) {
maybe_append_unused_bytes(args);
}
+ notification_signal(fixture);
return error;
}
@@ -345,7 +365,11 @@ static void do_handshaker_next(handshaker_args *args) {
if (result != TSI_ASYNC) {
args->error = on_handshake_next_done(result, args, bytes_to_send,
bytes_to_send_size, handshaker_result);
+ if (args->error != GRPC_ERROR_NONE) {
+ return;
+ }
}
+ notification_wait(fixture);
}
void tsi_test_do_handshake(tsi_test_fixture *fixture) {
@@ -532,6 +556,9 @@ void tsi_test_fixture_init(tsi_test_fixture *fixture) {
fixture->bytes_read_from_server_channel = 0;
fixture->test_unused_bytes = true;
fixture->has_client_finished_first = false;
+ gpr_mu_init(&fixture->mu);
+ gpr_cv_init(&fixture->cv);
+ fixture->notified = false;
}
void tsi_test_fixture_destroy(tsi_test_fixture *fixture) {
@@ -546,5 +573,7 @@ void tsi_test_fixture_destroy(tsi_test_fixture *fixture) {
GPR_ASSERT(fixture->vtable != NULL);
GPR_ASSERT(fixture->vtable->destruct != NULL);
fixture->vtable->destruct(fixture);
+ gpr_mu_destroy(&fixture->mu);
+ gpr_cv_destroy(&fixture->cv);
gpr_free(fixture);
}
diff --git a/test/core/tsi/transport_security_test_lib.h b/test/core/tsi/transport_security_test_lib.h
index 8ae2024ee4..ed8ff856df 100644
--- a/test/core/tsi/transport_security_test_lib.h
+++ b/test/core/tsi/transport_security_test_lib.h
@@ -21,6 +21,10 @@
#include "src/core/tsi/transport_security_interface.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define TSI_TEST_TINY_HANDSHAKE_BUFFER_SIZE 32
#define TSI_TEST_SMALL_HANDSHAKE_BUFFER_SIZE 128
#define TSI_TEST_SMALL_READ_BUFFER_ALLOCATED_SIZE 41
@@ -56,10 +60,10 @@ typedef struct tsi_test_fixture_vtable {
void (*setup_handshakers)(tsi_test_fixture *fixture);
void (*check_handshaker_peers)(tsi_test_fixture *fixture);
void (*destruct)(tsi_test_fixture *fixture);
-} tranport_security_test_vtable;
+} tsi_test_fixture_vtable;
struct tsi_test_fixture {
- const struct tsi_test_fixture_vtable *vtable;
+ const tsi_test_fixture_vtable *vtable;
/* client/server TSI handshaker used to perform TSI handshakes, and will get
instantiated during the call to setup_handshakers. */
tsi_handshaker *client_handshaker;
@@ -95,6 +99,13 @@ struct tsi_test_fixture {
(https://github.com/grpc/grpc/issues/12164).
*/
bool test_unused_bytes;
+ /* These objects will be used coordinate client/server handshakers with TSI
+ thread to perform TSI handshakes in an asynchronous manner (for GTS TSI
+ implementations).
+ */
+ gpr_cv cv;
+ gpr_mu mu;
+ bool notified;
};
struct tsi_test_frame_protector_config {
@@ -162,4 +173,8 @@ void tsi_test_do_handshake(tsi_test_fixture *fixture);
the client and server switching its role. */
void tsi_test_do_round_trip(tsi_test_fixture *fixture);
+#ifdef __cplusplus
+}
+#endif
+
#endif // GRPC_TEST_CORE_TSI_TRANSPORT_SECURITY_TEST_LIB_H_
diff --git a/test/core/util/BUILD b/test/core/util/BUILD
index 10eefe159a..abb50a0c99 100644
--- a/test/core/util/BUILD
+++ b/test/core/util/BUILD
@@ -89,12 +89,16 @@ grpc_cc_library(
)
grpc_cc_library(
- name = "one_corpus_entry_fuzzer",
- srcs = ["one_corpus_entry_fuzzer.c"],
+ name = "fuzzer_corpus_test",
+ srcs = ["fuzzer_corpus_test.cc"],
deps = [
":gpr_test_util",
"//:grpc",
],
+ external_deps = [
+ "gtest",
+ "gflags",
+ ],
)
sh_library(
diff --git a/test/core/util/fuzzer_corpus_test.cc b/test/core/util/fuzzer_corpus_test.cc
new file mode 100644
index 0000000000..a5e99a1bac
--- /dev/null
+++ b/test/core/util/fuzzer_corpus_test.cc
@@ -0,0 +1,136 @@
+/*
+ *
+ * Copyright 2016 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 <stdbool.h>
+
+#include <dirent.h>
+#include <gflags/gflags.h>
+#include <grpc/support/log.h>
+#include <gtest/gtest.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#include "src/core/lib/iomgr/load_file.h"
+#include "test/core/util/test_config.h"
+
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
+extern "C" bool squelch;
+extern "C" bool leak_check;
+
+DEFINE_string(file, "", "Use this file as test data");
+DEFINE_string(directory, "", "Use this directory as test data");
+
+class FuzzerCorpusTest : public ::testing::TestWithParam<std::string> {};
+
+TEST_P(FuzzerCorpusTest, RunOneExample) {
+ gpr_log(GPR_DEBUG, "Example file: %s", GetParam().c_str());
+ grpc_slice buffer;
+ squelch = false;
+ leak_check = false;
+ GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file",
+ grpc_load_file(GetParam().c_str(), 0, &buffer)));
+ LLVMFuzzerTestOneInput(GRPC_SLICE_START_PTR(buffer),
+ GRPC_SLICE_LENGTH(buffer));
+ grpc_slice_unref(buffer);
+}
+
+class ExampleGenerator
+ : public ::testing::internal::ParamGeneratorInterface<std::string> {
+ public:
+ virtual ::testing::internal::ParamIteratorInterface<std::string>* Begin()
+ const;
+ virtual ::testing::internal::ParamIteratorInterface<std::string>* End() const;
+
+ private:
+ void Materialize() const {
+ if (examples_.empty()) {
+ if (!FLAGS_file.empty()) examples_.push_back(FLAGS_file);
+ if (!FLAGS_directory.empty()) {
+ DIR* dp;
+ struct dirent* ep;
+ dp = opendir(FLAGS_directory.c_str());
+
+ if (dp != NULL) {
+ while ((ep = readdir(dp)) != nullptr) {
+ if (ep->d_type == DT_REG) {
+ examples_.push_back(FLAGS_directory + "/" + ep->d_name);
+ }
+ }
+
+ (void)closedir(dp);
+ } else {
+ perror("Couldn't open the directory");
+ abort();
+ }
+ }
+ }
+ }
+
+ mutable std::vector<std::string> examples_;
+};
+
+class ExampleIterator
+ : public ::testing::internal::ParamIteratorInterface<std::string> {
+ public:
+ ExampleIterator(const ExampleGenerator& base_,
+ std::vector<std::string>::const_iterator begin)
+ : base_(base_), begin_(begin), current_(begin) {}
+
+ virtual const ExampleGenerator* BaseGenerator() const { return &base_; }
+
+ virtual void Advance() { current_++; }
+ virtual ExampleIterator* Clone() const { return new ExampleIterator(*this); }
+ virtual const std::string* Current() const { return &*current_; }
+
+ virtual bool Equals(const ParamIteratorInterface<std::string>& other) const {
+ return &base_ == other.BaseGenerator() &&
+ current_ == dynamic_cast<const ExampleIterator*>(&other)->current_;
+ }
+
+ private:
+ ExampleIterator(const ExampleIterator& other)
+ : base_(other.base_), begin_(other.begin_), current_(other.current_) {}
+
+ const ExampleGenerator& base_;
+ const std::vector<std::string>::const_iterator begin_;
+ std::vector<std::string>::const_iterator current_;
+};
+
+::testing::internal::ParamIteratorInterface<std::string>*
+ExampleGenerator::Begin() const {
+ Materialize();
+ return new ExampleIterator(*this, examples_.begin());
+}
+
+::testing::internal::ParamIteratorInterface<std::string>*
+ExampleGenerator::End() const {
+ Materialize();
+ return new ExampleIterator(*this, examples_.end());
+}
+
+INSTANTIATE_TEST_CASE_P(
+ CorpusExamples, FuzzerCorpusTest,
+ ::testing::internal::ParamGenerator<std::string>(new ExampleGenerator));
+
+int main(int argc, char** argv) {
+ grpc_test_init(argc, argv);
+ ::gflags::ParseCommandLineFlags(&argc, &argv, true);
+ ::testing::InitGoogleTest(&argc, argv);
+
+ return RUN_ALL_TESTS();
+}
diff --git a/test/core/util/grpc_fuzzer.bzl b/test/core/util/grpc_fuzzer.bzl
index 41f6cdc8ba..55b6f1c1a5 100644
--- a/test/core/util/grpc_fuzzer.bzl
+++ b/test/core/util/grpc_fuzzer.bzl
@@ -12,19 +12,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-load("//bazel:grpc_build_system.bzl", "grpc_cc_binary")
+load("//bazel:grpc_build_system.bzl", "grpc_cc_test")
def grpc_fuzzer(name, corpus, srcs = [], deps = [], **kwargs):
- grpc_cc_binary(
- name = '%s/one_entry.bin' % name,
+ grpc_cc_test(
+ name = name,
srcs = srcs,
- deps = deps + ["//test/core/util:one_corpus_entry_fuzzer"],
+ deps = deps + ["//test/core/util:fuzzer_corpus_test"],
+ data = [corpus],
+ args = ['--directory', '$(location %s)' % corpus],
+ external_deps = [
+ 'gtest',
+ ],
**kwargs
)
- for entry in native.glob(['%s/*' % corpus]):
- native.sh_test(
- name = '%s/one_entry/%s' % (name, entry),
- data = [':%s/one_entry.bin' % name, entry],
- srcs = ['//test/core/util:fuzzer_one_entry_runner'],
- args = ['$(location :%s/one_entry.bin)' % name, '$(location %s)' % entry]
- )
diff --git a/test/core/util/port_server_client.c b/test/core/util/port_server_client.c
index ba4028dbee..7b94ac4ada 100644
--- a/test/core/util/port_server_client.c
+++ b/test/core/util/port_server_client.c
@@ -88,7 +88,7 @@ void grpc_free_port_using_server(int port) {
grpc_resource_quota *resource_quota =
grpc_resource_quota_create("port_server_client/free");
grpc_httpcli_get(&exec_ctx, &context, &pr.pops, resource_quota, &req,
- grpc_timeout_seconds_to_deadline(30),
+ grpc_exec_ctx_now(&exec_ctx) + 30 * GPR_MS_PER_SEC,
GRPC_CLOSURE_CREATE(freed_port_from_server, &pr,
grpc_schedule_on_exec_ctx),
&rsp);
@@ -100,8 +100,8 @@ void grpc_free_port_using_server(int port) {
if (!GRPC_LOG_IF_ERROR(
"pollset_work",
grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&pr.pops),
- &worker, gpr_now(GPR_CLOCK_MONOTONIC),
- grpc_timeout_seconds_to_deadline(1)))) {
+ &worker,
+ grpc_exec_ctx_now(&exec_ctx) + GPR_MS_PER_SEC))) {
pr.done = 1;
}
}
@@ -173,7 +173,7 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg,
grpc_resource_quota *resource_quota =
grpc_resource_quota_create("port_server_client/pick_retry");
grpc_httpcli_get(exec_ctx, pr->ctx, &pr->pops, resource_quota, &req,
- grpc_timeout_seconds_to_deadline(10),
+ grpc_exec_ctx_now(exec_ctx) + 30 * GPR_MS_PER_SEC,
GRPC_CLOSURE_CREATE(got_port_from_server, pr,
grpc_schedule_on_exec_ctx),
&pr->response);
@@ -224,7 +224,7 @@ int grpc_pick_port_using_server(void) {
grpc_resource_quota_create("port_server_client/pick");
grpc_httpcli_get(
&exec_ctx, &context, &pr.pops, resource_quota, &req,
- grpc_timeout_seconds_to_deadline(30),
+ grpc_exec_ctx_now(&exec_ctx) + 30 * GPR_MS_PER_SEC,
GRPC_CLOSURE_CREATE(got_port_from_server, &pr, grpc_schedule_on_exec_ctx),
&pr.response);
grpc_resource_quota_unref_internal(&exec_ctx, resource_quota);
@@ -235,8 +235,8 @@ int grpc_pick_port_using_server(void) {
if (!GRPC_LOG_IF_ERROR(
"pollset_work",
grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&pr.pops),
- &worker, gpr_now(GPR_CLOCK_MONOTONIC),
- grpc_timeout_seconds_to_deadline(1)))) {
+ &worker,
+ grpc_exec_ctx_now(&exec_ctx) + GPR_MS_PER_SEC))) {
pr.port = 0;
}
}
diff --git a/test/core/util/test_tcp_server.c b/test/core/util/test_tcp_server.c
index d3a1de8a3b..611ecb330c 100644
--- a/test/core/util/test_tcp_server.c
+++ b/test/core/util/test_tcp_server.c
@@ -31,6 +31,7 @@
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/iomgr/tcp_server.h"
#include "test/core/util/port.h"
+#include "test/core/util/test_config.h"
static void on_server_destroyed(grpc_exec_ctx *exec_ctx, void *data,
grpc_error *error) {
@@ -78,14 +79,13 @@ void test_tcp_server_start(test_tcp_server *server, int port) {
void test_tcp_server_poll(test_tcp_server *server, int seconds) {
grpc_pollset_worker *worker = NULL;
- gpr_timespec deadline =
- gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC),
- gpr_time_from_seconds(seconds, GPR_TIMESPAN));
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ grpc_millis deadline = grpc_timespec_to_millis_round_up(
+ grpc_timeout_seconds_to_deadline(seconds));
gpr_mu_lock(server->mu);
- GRPC_LOG_IF_ERROR("pollset_work",
- grpc_pollset_work(&exec_ctx, server->pollset, &worker,
- gpr_now(GPR_CLOCK_MONOTONIC), deadline));
+ GRPC_LOG_IF_ERROR(
+ "pollset_work",
+ grpc_pollset_work(&exec_ctx, server->pollset, &worker, deadline));
gpr_mu_unlock(server->mu);
grpc_exec_ctx_finish(&exec_ctx);
}
diff --git a/test/cpp/common/alarm_cpp_test.cc b/test/cpp/common/alarm_cpp_test.cc
index 212972d25d..7adc3102f4 100644
--- a/test/cpp/common/alarm_cpp_test.cc
+++ b/test/cpp/common/alarm_cpp_test.cc
@@ -142,7 +142,7 @@ TEST(AlarmTest, ZeroExpiry) {
void* output_tag;
bool ok;
const CompletionQueue::NextStatus status = cq.AsyncNext(
- (void**)&output_tag, &ok, grpc_timeout_seconds_to_deadline(0));
+ (void**)&output_tag, &ok, grpc_timeout_seconds_to_deadline(1));
EXPECT_EQ(status, CompletionQueue::GOT_EVENT);
EXPECT_TRUE(ok);
@@ -158,7 +158,7 @@ TEST(AlarmTest, NegativeExpiry) {
void* output_tag;
bool ok;
const CompletionQueue::NextStatus status = cq.AsyncNext(
- (void**)&output_tag, &ok, grpc_timeout_seconds_to_deadline(0));
+ (void**)&output_tag, &ok, grpc_timeout_seconds_to_deadline(1));
EXPECT_EQ(status, CompletionQueue::GOT_EVENT);
EXPECT_TRUE(ok);
diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc
index 41090d161a..f938aea40e 100644
--- a/test/cpp/end2end/async_end2end_test.cc
+++ b/test/cpp/end2end/async_end2end_test.cc
@@ -105,6 +105,13 @@ class Verifier {
expectations_[tag(i)] = expect_ok;
return *this;
}
+ // AcceptOnce sets the expected ok value for a specific tag, but does not
+ // require it to appear
+ // If it does, sets *seen to true
+ Verifier& AcceptOnce(int i, bool expect_ok, bool* seen) {
+ maybe_expectations_[tag(i)] = MaybeExpect{expect_ok, seen};
+ return *this;
+ }
// Next waits for 1 async tag to complete, checks its
// expectations, and returns the tag
@@ -122,12 +129,7 @@ class Verifier {
} else {
EXPECT_TRUE(cq->Next(&got_tag, &ok));
}
- auto it = expectations_.find(got_tag);
- EXPECT_TRUE(it != expectations_.end());
- if (!ignore_ok) {
- EXPECT_EQ(it->second, ok);
- }
- expectations_.erase(it);
+ GotTag(got_tag, ok, ignore_ok);
return detag(got_tag);
}
@@ -138,7 +140,7 @@ class Verifier {
// This version of Verify allows optionally ignoring the
// outcome of the expectation
void Verify(CompletionQueue* cq, bool ignore_ok) {
- GPR_ASSERT(!expectations_.empty());
+ GPR_ASSERT(!expectations_.empty() || !maybe_expectations_.empty());
while (!expectations_.empty()) {
Next(cq, ignore_ok);
}
@@ -177,16 +179,43 @@ class Verifier {
EXPECT_EQ(cq->AsyncNext(&got_tag, &ok, deadline),
CompletionQueue::GOT_EVENT);
}
- auto it = expectations_.find(got_tag);
- EXPECT_TRUE(it != expectations_.end());
- EXPECT_EQ(it->second, ok);
- expectations_.erase(it);
+ GotTag(got_tag, ok, false);
}
}
}
private:
+ void GotTag(void* got_tag, bool ok, bool ignore_ok) {
+ auto it = expectations_.find(got_tag);
+ if (it != expectations_.end()) {
+ if (!ignore_ok) {
+ EXPECT_EQ(it->second, ok);
+ }
+ expectations_.erase(it);
+ } else {
+ auto it2 = maybe_expectations_.find(got_tag);
+ if (it2 != maybe_expectations_.end()) {
+ if (it2->second.seen != nullptr) {
+ EXPECT_FALSE(*it2->second.seen);
+ *it2->second.seen = true;
+ }
+ if (!ignore_ok) {
+ EXPECT_EQ(it2->second.ok, ok);
+ }
+ } else {
+ gpr_log(GPR_ERROR, "Unexpected tag: %p", tag);
+ abort();
+ }
+ }
+ }
+
+ struct MaybeExpect {
+ bool ok;
+ bool* seen;
+ };
+
std::map<void*, bool> expectations_;
+ std::map<void*, MaybeExpect> maybe_expectations_;
bool spin_;
};
@@ -223,11 +252,8 @@ class TestScenario {
bool disable_blocking;
bool inproc;
bool health_check_service;
- // Although the below grpc::string's are logically const, we can't declare
- // them const because of a limitation in the way old compilers (e.g., gcc-4.4)
- // manage vector insertion using a copy constructor
- grpc::string credentials_type;
- grpc::string message_content;
+ const grpc::string credentials_type;
+ const grpc::string message_content;
};
static std::ostream& operator<<(std::ostream& out,
@@ -539,31 +565,19 @@ TEST_P(AsyncEnd2endTest, SimpleClientStreamingWithCoalescingApi) {
cli_stream->Write(send_request, tag(3));
- // 65536(64KB) is the default flow control window size. Should change this
- // number when default flow control window size changes. For the write of
- // send_request larger than the flow control window size, tag:3 will not come
- // up until server read is initiated. For write of send_request smaller than
- // the flow control window size, the request can take the free ride with
- // initial metadata due to coalescing, thus write tag:3 will come up here.
- if (GetParam().message_content.length() < 65536 || GetParam().inproc) {
- Verifier(GetParam().disable_blocking)
- .Expect(2, true)
- .Expect(3, true)
- .Verify(cq_.get());
- } else {
- Verifier(GetParam().disable_blocking).Expect(2, true).Verify(cq_.get());
- }
+ bool seen3 = false;
+
+ Verifier(GetParam().disable_blocking)
+ .Expect(2, true)
+ .AcceptOnce(3, true, &seen3)
+ .Verify(cq_.get());
srv_stream.Read(&recv_request, tag(4));
- if (GetParam().message_content.length() < 65536 || GetParam().inproc) {
- Verifier(GetParam().disable_blocking).Expect(4, true).Verify(cq_.get());
- } else {
- Verifier(GetParam().disable_blocking)
- .Expect(3, true)
- .Expect(4, true)
- .Verify(cq_.get());
- }
+ Verifier(GetParam().disable_blocking)
+ .AcceptOnce(3, true, &seen3)
+ .Expect(4, true)
+ .Verify(cq_.get());
EXPECT_EQ(send_request.message(), recv_request.message());
@@ -588,6 +602,7 @@ TEST_P(AsyncEnd2endTest, SimpleClientStreamingWithCoalescingApi) {
EXPECT_EQ(send_response.message(), recv_response.message());
EXPECT_TRUE(recv_status.ok());
+ EXPECT_TRUE(seen3);
}
// One ping, two pongs.
@@ -834,31 +849,19 @@ TEST_P(AsyncEnd2endTest, SimpleBidiStreamingWithCoalescingApiWAF) {
cli_stream->WriteLast(send_request, WriteOptions(), tag(3));
- // 65536(64KB) is the default flow control window size. Should change this
- // number when default flow control window size changes. For the write of
- // send_request larger than the flow control window size, tag:3 will not come
- // up until server read is initiated. For write of send_request smaller than
- // the flow control window size, the request can take the free ride with
- // initial metadata due to coalescing, thus write tag:3 will come up here.
- if (GetParam().message_content.length() < 65536 || GetParam().inproc) {
- Verifier(GetParam().disable_blocking)
- .Expect(2, true)
- .Expect(3, true)
- .Verify(cq_.get());
- } else {
- Verifier(GetParam().disable_blocking).Expect(2, true).Verify(cq_.get());
- }
+ bool seen3 = false;
+
+ Verifier(GetParam().disable_blocking)
+ .Expect(2, true)
+ .AcceptOnce(3, true, &seen3)
+ .Verify(cq_.get());
srv_stream.Read(&recv_request, tag(4));
- if (GetParam().message_content.length() < 65536 || GetParam().inproc) {
- Verifier(GetParam().disable_blocking).Expect(4, true).Verify(cq_.get());
- } else {
- Verifier(GetParam().disable_blocking)
- .Expect(3, true)
- .Expect(4, true)
- .Verify(cq_.get());
- }
+ Verifier(GetParam().disable_blocking)
+ .AcceptOnce(3, true, &seen3)
+ .Expect(4, true)
+ .Verify(cq_.get());
EXPECT_EQ(send_request.message(), recv_request.message());
srv_stream.Read(&recv_request, tag(5));
@@ -877,6 +880,7 @@ TEST_P(AsyncEnd2endTest, SimpleBidiStreamingWithCoalescingApiWAF) {
Verifier(GetParam().disable_blocking).Expect(8, true).Verify(cq_.get());
EXPECT_TRUE(recv_status.ok());
+ EXPECT_TRUE(seen3);
}
// One ping, one pong. Using server:WriteLast api
@@ -902,31 +906,19 @@ TEST_P(AsyncEnd2endTest, SimpleBidiStreamingWithCoalescingApiWL) {
cli_stream->WriteLast(send_request, WriteOptions(), tag(3));
- // 65536(64KB) is the default flow control window size. Should change this
- // number when default flow control window size changes. For the write of
- // send_request larger than the flow control window size, tag:3 will not come
- // up until server read is initiated. For write of send_request smaller than
- // the flow control window size, the request can take the free ride with
- // initial metadata due to coalescing, thus write tag:3 will come up here.
- if (GetParam().message_content.length() < 65536 || GetParam().inproc) {
- Verifier(GetParam().disable_blocking)
- .Expect(2, true)
- .Expect(3, true)
- .Verify(cq_.get());
- } else {
- Verifier(GetParam().disable_blocking).Expect(2, true).Verify(cq_.get());
- }
+ bool seen3 = false;
+
+ Verifier(GetParam().disable_blocking)
+ .Expect(2, true)
+ .AcceptOnce(3, true, &seen3)
+ .Verify(cq_.get());
srv_stream.Read(&recv_request, tag(4));
- if (GetParam().message_content.length() < 65536 || GetParam().inproc) {
- Verifier(GetParam().disable_blocking).Expect(4, true).Verify(cq_.get());
- } else {
- Verifier(GetParam().disable_blocking)
- .Expect(3, true)
- .Expect(4, true)
- .Verify(cq_.get());
- }
+ Verifier(GetParam().disable_blocking)
+ .AcceptOnce(3, true, &seen3)
+ .Expect(4, true)
+ .Verify(cq_.get());
EXPECT_EQ(send_request.message(), recv_request.message());
srv_stream.Read(&recv_request, tag(5));
@@ -947,6 +939,7 @@ TEST_P(AsyncEnd2endTest, SimpleBidiStreamingWithCoalescingApiWL) {
Verifier(GetParam().disable_blocking).Expect(9, true).Verify(cq_.get());
EXPECT_TRUE(recv_status.ok());
+ EXPECT_TRUE(seen3);
}
// Metadata tests
@@ -1788,7 +1781,7 @@ std::vector<TestScenario> CreateTestScenarios(bool test_disable_blocking,
GPR_ASSERT(!credentials_types.empty());
messages.push_back("Hello");
- for (int sz = 1; sz < test_big_limit; sz *= 2) {
+ for (int sz = 1; sz <= test_big_limit; sz *= 32) {
grpc::string big_msg;
for (int i = 0; i < sz * 1024; i++) {
char c = 'a' + (i % 26);
diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc
index 7137a91ad9..7f5d6f9740 100644
--- a/test/cpp/end2end/end2end_test.cc
+++ b/test/cpp/end2end/end2end_test.cc
@@ -198,10 +198,7 @@ class TestScenario {
void Log() const;
bool use_proxy;
bool inproc;
- // Although the below grpc::string is logically const, we can't declare
- // them const because of a limitation in the way old compilers (e.g., gcc-4.4)
- // manage vector insertion using a copy constructor
- grpc::string credentials_type;
+ const grpc::string credentials_type;
};
static std::ostream& operator<<(std::ostream& out,
@@ -1673,6 +1670,34 @@ TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginFailure) {
kTestCredsPluginErrorMsg);
}
+TEST_P(SecureEnd2endTest, CompositeCallCreds) {
+ ResetStub();
+ EchoRequest request;
+ EchoResponse response;
+ ClientContext context;
+ const char kMetadataKey1[] = "call-creds-key1";
+ const char kMetadataKey2[] = "call-creds-key2";
+ const char kMetadataVal1[] = "call-creds-val1";
+ const char kMetadataVal2[] = "call-creds-val2";
+
+ context.set_credentials(CompositeCallCredentials(
+ MetadataCredentialsFromPlugin(std::unique_ptr<MetadataCredentialsPlugin>(
+ new TestMetadataCredentialsPlugin(kMetadataKey1, kMetadataVal1, true,
+ true))),
+ MetadataCredentialsFromPlugin(std::unique_ptr<MetadataCredentialsPlugin>(
+ new TestMetadataCredentialsPlugin(kMetadataKey2, kMetadataVal2, true,
+ true)))));
+ request.set_message("Hello");
+ request.mutable_param()->set_echo_metadata(true);
+
+ Status s = stub_->Echo(&context, request, &response);
+ EXPECT_TRUE(s.ok());
+ EXPECT_TRUE(MetadataContains(context.GetServerTrailingMetadata(),
+ kMetadataKey1, kMetadataVal1));
+ EXPECT_TRUE(MetadataContains(context.GetServerTrailingMetadata(),
+ kMetadataKey2, kMetadataVal2));
+}
+
TEST_P(SecureEnd2endTest, ClientAuthContext) {
ResetStub();
EchoRequest request;
diff --git a/test/cpp/end2end/generic_end2end_test.cc b/test/cpp/end2end/generic_end2end_test.cc
index 04502e3e7f..b37452deb5 100644
--- a/test/cpp/end2end/generic_end2end_test.cc
+++ b/test/cpp/end2end/generic_end2end_test.cc
@@ -145,7 +145,7 @@ class GenericEnd2endTest : public ::testing::Test {
if (check_deadline) {
EXPECT_TRUE(gpr_time_similar(deadline, srv_ctx.raw_deadline(),
- gpr_time_from_millis(100, GPR_TIMESPAN)));
+ gpr_time_from_millis(1000, GPR_TIMESPAN)));
}
ByteBuffer recv_buffer;
diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc
index 77ed155292..f73a9c1791 100644
--- a/test/cpp/end2end/grpclb_end2end_test.cc
+++ b/test/cpp/end2end/grpclb_end2end_test.cc
@@ -368,8 +368,9 @@ class GrpclbEnd2endTest : public ::testing::Test {
grpc_fake_resolver_response_generator_unref(response_generator_);
}
- void ResetStub() {
+ void ResetStub(int fallback_timeout = 0) {
ChannelArguments args;
+ args.SetGrpclbFallbackTimeout(fallback_timeout);
args.SetPointer(GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR,
response_generator_);
std::ostringstream uri;
@@ -470,10 +471,10 @@ class GrpclbEnd2endTest : public ::testing::Test {
grpc_exec_ctx_finish(&exec_ctx);
}
- const std::vector<int> GetBackendPorts() const {
+ const std::vector<int> GetBackendPorts(const size_t start_index = 0) const {
std::vector<int> backend_ports;
- for (const auto& bs : backend_servers_) {
- backend_ports.push_back(bs.port_);
+ for (size_t i = start_index; i < backend_servers_.size(); ++i) {
+ backend_ports.push_back(backend_servers_[i].port_);
}
return backend_ports;
}
@@ -642,6 +643,177 @@ TEST_F(SingleBalancerTest, InitiallyEmptyServerlist) {
EXPECT_EQ("grpclb", channel_->GetLoadBalancingPolicyName());
}
+TEST_F(SingleBalancerTest, Fallback) {
+ const int kFallbackTimeoutMs = 200 * grpc_test_slowdown_factor();
+ const int kServerlistDelayMs = 500 * grpc_test_slowdown_factor();
+ const size_t kNumBackendInResolution = backends_.size() / 2;
+
+ ResetStub(kFallbackTimeoutMs);
+ std::vector<AddressData> addresses;
+ addresses.emplace_back(AddressData{balancer_servers_[0].port_, true, ""});
+ for (size_t i = 0; i < kNumBackendInResolution; ++i) {
+ addresses.emplace_back(AddressData{backend_servers_[i].port_, false, ""});
+ }
+ SetNextResolution(addresses);
+
+ // Send non-empty serverlist only after kServerlistDelayMs.
+ ScheduleResponseForBalancer(
+ 0, BalancerServiceImpl::BuildResponseForBackends(
+ GetBackendPorts(kNumBackendInResolution /* start_index */), {}),
+ kServerlistDelayMs);
+
+ // Wait until all the fallback backends are reachable.
+ for (size_t i = 0; i < kNumBackendInResolution; ++i) {
+ WaitForBackend(i);
+ }
+
+ // The first request.
+ gpr_log(GPR_INFO, "========= BEFORE FIRST BATCH ==========");
+ CheckRpcSendOk(kNumBackendInResolution);
+ gpr_log(GPR_INFO, "========= DONE WITH FIRST BATCH ==========");
+
+ // Fallback is used: each backend returned by the resolver should have
+ // gotten one request.
+ for (size_t i = 0; i < kNumBackendInResolution; ++i) {
+ EXPECT_EQ(1U, backend_servers_[i].service_->request_count());
+ }
+ for (size_t i = kNumBackendInResolution; i < backends_.size(); ++i) {
+ EXPECT_EQ(0U, backend_servers_[i].service_->request_count());
+ }
+
+ // Wait until the serverlist reception has been processed and all backends
+ // in the serverlist are reachable.
+ for (size_t i = kNumBackendInResolution; i < backends_.size(); ++i) {
+ WaitForBackend(i);
+ }
+
+ // Send out the second request.
+ gpr_log(GPR_INFO, "========= BEFORE SECOND BATCH ==========");
+ CheckRpcSendOk(backends_.size() - kNumBackendInResolution);
+ gpr_log(GPR_INFO, "========= DONE WITH SECOND BATCH ==========");
+
+ // Serverlist is used: each backend returned by the balancer should
+ // have gotten one request.
+ for (size_t i = 0; i < kNumBackendInResolution; ++i) {
+ EXPECT_EQ(0U, backend_servers_[i].service_->request_count());
+ }
+ for (size_t i = kNumBackendInResolution; i < backends_.size(); ++i) {
+ EXPECT_EQ(1U, backend_servers_[i].service_->request_count());
+ }
+
+ balancers_[0]->NotifyDoneWithServerlists();
+ // The balancer got a single request.
+ EXPECT_EQ(1U, balancer_servers_[0].service_->request_count());
+ // and sent a single response.
+ EXPECT_EQ(1U, balancer_servers_[0].service_->response_count());
+}
+
+TEST_F(SingleBalancerTest, FallbackUpdate) {
+ const int kFallbackTimeoutMs = 200 * grpc_test_slowdown_factor();
+ const int kServerlistDelayMs = 500 * grpc_test_slowdown_factor();
+ const size_t kNumBackendInResolution = backends_.size() / 3;
+ const size_t kNumBackendInResolutionUpdate = backends_.size() / 3;
+
+ ResetStub(kFallbackTimeoutMs);
+ std::vector<AddressData> addresses;
+ addresses.emplace_back(AddressData{balancer_servers_[0].port_, true, ""});
+ for (size_t i = 0; i < kNumBackendInResolution; ++i) {
+ addresses.emplace_back(AddressData{backend_servers_[i].port_, false, ""});
+ }
+ SetNextResolution(addresses);
+
+ // Send non-empty serverlist only after kServerlistDelayMs.
+ ScheduleResponseForBalancer(
+ 0, BalancerServiceImpl::BuildResponseForBackends(
+ GetBackendPorts(kNumBackendInResolution +
+ kNumBackendInResolutionUpdate /* start_index */),
+ {}),
+ kServerlistDelayMs);
+
+ // Wait until all the fallback backends are reachable.
+ for (size_t i = 0; i < kNumBackendInResolution; ++i) {
+ WaitForBackend(i);
+ }
+
+ // The first request.
+ gpr_log(GPR_INFO, "========= BEFORE FIRST BATCH ==========");
+ CheckRpcSendOk(kNumBackendInResolution);
+ gpr_log(GPR_INFO, "========= DONE WITH FIRST BATCH ==========");
+
+ // Fallback is used: each backend returned by the resolver should have
+ // gotten one request.
+ for (size_t i = 0; i < kNumBackendInResolution; ++i) {
+ EXPECT_EQ(1U, backend_servers_[i].service_->request_count());
+ }
+ for (size_t i = kNumBackendInResolution; i < backends_.size(); ++i) {
+ EXPECT_EQ(0U, backend_servers_[i].service_->request_count());
+ }
+
+ addresses.clear();
+ addresses.emplace_back(AddressData{balancer_servers_[0].port_, true, ""});
+ for (size_t i = kNumBackendInResolution;
+ i < kNumBackendInResolution + kNumBackendInResolutionUpdate; ++i) {
+ addresses.emplace_back(AddressData{backend_servers_[i].port_, false, ""});
+ }
+ SetNextResolution(addresses);
+
+ // Wait until the resolution update has been processed and all the new
+ // fallback backends are reachable.
+ for (size_t i = kNumBackendInResolution;
+ i < kNumBackendInResolution + kNumBackendInResolutionUpdate; ++i) {
+ WaitForBackend(i);
+ }
+
+ // Send out the second request.
+ gpr_log(GPR_INFO, "========= BEFORE SECOND BATCH ==========");
+ CheckRpcSendOk(kNumBackendInResolutionUpdate);
+ gpr_log(GPR_INFO, "========= DONE WITH SECOND BATCH ==========");
+
+ // The resolution update is used: each backend in the resolution update should
+ // have gotten one request.
+ for (size_t i = 0; i < kNumBackendInResolution; ++i) {
+ EXPECT_EQ(0U, backend_servers_[i].service_->request_count());
+ }
+ for (size_t i = kNumBackendInResolution;
+ i < kNumBackendInResolution + kNumBackendInResolutionUpdate; ++i) {
+ EXPECT_EQ(1U, backend_servers_[i].service_->request_count());
+ }
+ for (size_t i = kNumBackendInResolution + kNumBackendInResolutionUpdate;
+ i < backends_.size(); ++i) {
+ EXPECT_EQ(0U, backend_servers_[i].service_->request_count());
+ }
+
+ // Wait until the serverlist reception has been processed and all backends
+ // in the serverlist are reachable.
+ for (size_t i = kNumBackendInResolution + kNumBackendInResolutionUpdate;
+ i < backends_.size(); ++i) {
+ WaitForBackend(i);
+ }
+
+ // Send out the third request.
+ gpr_log(GPR_INFO, "========= BEFORE THIRD BATCH ==========");
+ CheckRpcSendOk(backends_.size() - kNumBackendInResolution -
+ kNumBackendInResolutionUpdate);
+ gpr_log(GPR_INFO, "========= DONE WITH THIRD BATCH ==========");
+
+ // Serverlist is used: each backend returned by the balancer should
+ // have gotten one request.
+ for (size_t i = 0;
+ i < kNumBackendInResolution + kNumBackendInResolutionUpdate; ++i) {
+ EXPECT_EQ(0U, backend_servers_[i].service_->request_count());
+ }
+ for (size_t i = kNumBackendInResolution + kNumBackendInResolutionUpdate;
+ i < backends_.size(); ++i) {
+ EXPECT_EQ(1U, backend_servers_[i].service_->request_count());
+ }
+
+ balancers_[0]->NotifyDoneWithServerlists();
+ // The balancer got a single request.
+ EXPECT_EQ(1U, balancer_servers_[0].service_->request_count());
+ // and sent a single response.
+ EXPECT_EQ(1U, balancer_servers_[0].service_->response_count());
+}
+
TEST_F(SingleBalancerTest, BackendsRestart) {
const size_t kNumRpcsPerAddress = 100;
ScheduleResponseForBalancer(
diff --git a/test/cpp/interop/stress_test.cc b/test/cpp/interop/stress_test.cc
index 9cc5a8168b..c6d3600be8 100644
--- a/test/cpp/interop/stress_test.cc
+++ b/test/cpp/interop/stress_test.cc
@@ -257,6 +257,7 @@ int main(int argc, char** argv) {
gpr_log(GPR_INFO, "Starting test(s)..");
std::vector<std::thread> test_threads;
+ std::vector<std::unique_ptr<StressTestInteropClient>> clients;
// Create and start the test threads.
// Note that:
@@ -282,9 +283,9 @@ int main(int argc, char** argv) {
// Create stub(s) for each channel
for (int stub_idx = 0; stub_idx < FLAGS_num_stubs_per_channel;
stub_idx++) {
- StressTestInteropClient* client = new StressTestInteropClient(
+ clients.emplace_back(new StressTestInteropClient(
++thread_idx, *it, channel, test_selector, FLAGS_test_duration_secs,
- FLAGS_sleep_duration_ms, FLAGS_do_not_abort_on_transient_failures);
+ FLAGS_sleep_duration_ms, FLAGS_do_not_abort_on_transient_failures));
bool is_already_created = false;
// QpsGauge name
@@ -293,7 +294,7 @@ int main(int argc, char** argv) {
server_idx, channel_idx, stub_idx);
test_threads.emplace_back(std::thread(
- &StressTestInteropClient::MainLoop, client,
+ &StressTestInteropClient::MainLoop, clients.back().get(),
metrics_service.CreateQpsGauge(buffer, &is_already_created)));
// The QpsGauge should not have been already created
diff --git a/test/cpp/microbenchmarks/bm_call_create.cc b/test/cpp/microbenchmarks/bm_call_create.cc
index cadc9b2a11..cf9a42e8c6 100644
--- a/test/cpp/microbenchmarks/bm_call_create.cc
+++ b/test/cpp/microbenchmarks/bm_call_create.cc
@@ -554,7 +554,7 @@ static void BM_IsolatedFilter(benchmark::State &state) {
grpc_exec_ctx_flush(&exec_ctx);
grpc_call_stack *call_stack = static_cast<grpc_call_stack *>(
gpr_zalloc(channel_stack->call_stack_size));
- gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
+ grpc_millis deadline = GRPC_MILLIS_INF_FUTURE;
gpr_timespec start_time = gpr_now(GPR_CLOCK_MONOTONIC);
grpc_slice method = grpc_slice_from_static_string("/foo/bar");
grpc_call_final_info final_info;
diff --git a/test/cpp/microbenchmarks/bm_chttp2_transport.cc b/test/cpp/microbenchmarks/bm_chttp2_transport.cc
index 070034fe33..6f9dee7822 100644
--- a/test/cpp/microbenchmarks/bm_chttp2_transport.cc
+++ b/test/cpp/microbenchmarks/bm_chttp2_transport.cc
@@ -321,7 +321,7 @@ static void BM_StreamCreateSendInitialMetadataDestroy(benchmark::State &state) {
grpc_metadata_batch b;
grpc_metadata_batch_init(&b);
- b.deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
+ b.deadline = GRPC_MILLIS_INF_FUTURE;
std::vector<grpc_mdelem> elems = Metadata::GetElems(f.exec_ctx());
std::vector<grpc_linked_mdelem> storage(elems.size());
for (size_t i = 0; i < elems.size(); i++) {
@@ -410,7 +410,7 @@ static void BM_TransportStreamSend(benchmark::State &state) {
grpc_metadata_batch b;
grpc_metadata_batch_init(&b);
- b.deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
+ b.deadline = GRPC_MILLIS_INF_FUTURE;
std::vector<grpc_mdelem> elems =
RepresentativeClientInitialMetadata::GetElems(f.exec_ctx());
std::vector<grpc_linked_mdelem> storage(elems.size());
@@ -542,7 +542,7 @@ static void BM_TransportStreamRecv(benchmark::State &state) {
grpc_metadata_batch_init(&b);
grpc_metadata_batch b_recv;
grpc_metadata_batch_init(&b_recv);
- b.deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
+ b.deadline = GRPC_MILLIS_INF_FUTURE;
std::vector<grpc_mdelem> elems =
RepresentativeClientInitialMetadata::GetElems(f.exec_ctx());
std::vector<grpc_linked_mdelem> storage(elems.size());
diff --git a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc
index 5c9405f583..57a69acf01 100644
--- a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc
+++ b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc
@@ -73,9 +73,9 @@ static void cq_done_cb(grpc_exec_ctx* exec_ctx, void* done_arg,
/* Queues a completion tag if deadline is > 0.
* Does nothing if deadline is 0 (i.e gpr_time_0(GPR_CLOCK_MONOTONIC)) */
static grpc_error* pollset_work(grpc_exec_ctx* exec_ctx, grpc_pollset* ps,
- grpc_pollset_worker** worker, gpr_timespec now,
- gpr_timespec deadline) {
- if (gpr_time_cmp(deadline, gpr_time_0(GPR_CLOCK_MONOTONIC)) == 0) {
+ grpc_pollset_worker** worker,
+ grpc_millis deadline) {
+ if (deadline == 0) {
gpr_log(GPR_DEBUG, "no-op");
return GRPC_ERROR_NONE;
}
diff --git a/test/cpp/microbenchmarks/bm_error.cc b/test/cpp/microbenchmarks/bm_error.cc
index bd5f02e172..56b80dfcf6 100644
--- a/test/cpp/microbenchmarks/bm_error.cc
+++ b/test/cpp/microbenchmarks/bm_error.cc
@@ -159,39 +159,39 @@ BENCHMARK(BM_ErrorGetPresentInt);
// Fixtures for tests: generate different kinds of errors
class ErrorNone {
public:
- gpr_timespec deadline() const { return deadline_; }
+ grpc_millis deadline() const { return deadline_; }
grpc_error* error() const { return GRPC_ERROR_NONE; }
private:
- const gpr_timespec deadline_ = gpr_inf_future(GPR_CLOCK_MONOTONIC);
+ const grpc_millis deadline_ = GRPC_MILLIS_INF_FUTURE;
};
class ErrorCancelled {
public:
- gpr_timespec deadline() const { return deadline_; }
+ grpc_millis deadline() const { return deadline_; }
grpc_error* error() const { return GRPC_ERROR_CANCELLED; }
private:
- const gpr_timespec deadline_ = gpr_inf_future(GPR_CLOCK_MONOTONIC);
+ const grpc_millis deadline_ = GRPC_MILLIS_INF_FUTURE;
};
class SimpleError {
public:
- gpr_timespec deadline() const { return deadline_; }
+ grpc_millis deadline() const { return deadline_; }
grpc_error* error() const { return error_.get(); }
private:
- const gpr_timespec deadline_ = gpr_inf_future(GPR_CLOCK_MONOTONIC);
+ const grpc_millis deadline_ = GRPC_MILLIS_INF_FUTURE;
ErrorPtr error_{GRPC_ERROR_CREATE_FROM_STATIC_STRING("Error")};
};
class ErrorWithGrpcStatus {
public:
- gpr_timespec deadline() const { return deadline_; }
+ grpc_millis deadline() const { return deadline_; }
grpc_error* error() const { return error_.get(); }
private:
- const gpr_timespec deadline_ = gpr_inf_future(GPR_CLOCK_MONOTONIC);
+ const grpc_millis deadline_ = GRPC_MILLIS_INF_FUTURE;
ErrorPtr error_{grpc_error_set_int(
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Error"), GRPC_ERROR_INT_GRPC_STATUS,
GRPC_STATUS_UNIMPLEMENTED)};
@@ -199,11 +199,11 @@ class ErrorWithGrpcStatus {
class ErrorWithHttpError {
public:
- gpr_timespec deadline() const { return deadline_; }
+ grpc_millis deadline() const { return deadline_; }
grpc_error* error() const { return error_.get(); }
private:
- const gpr_timespec deadline_ = gpr_inf_future(GPR_CLOCK_MONOTONIC);
+ const grpc_millis deadline_ = GRPC_MILLIS_INF_FUTURE;
ErrorPtr error_{grpc_error_set_int(
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Error"), GRPC_ERROR_INT_HTTP2_ERROR,
GRPC_HTTP2_COMPRESSION_ERROR)};
@@ -211,11 +211,11 @@ class ErrorWithHttpError {
class ErrorWithNestedGrpcStatus {
public:
- gpr_timespec deadline() const { return deadline_; }
+ grpc_millis deadline() const { return deadline_; }
grpc_error* error() const { return error_.get(); }
private:
- const gpr_timespec deadline_ = gpr_inf_future(GPR_CLOCK_MONOTONIC);
+ const grpc_millis deadline_ = GRPC_MILLIS_INF_FUTURE;
ErrorPtr nested_error_{grpc_error_set_int(
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Error"), GRPC_ERROR_INT_GRPC_STATUS,
GRPC_STATUS_UNIMPLEMENTED)};
@@ -248,12 +248,14 @@ template <class Fixture>
static void BM_ErrorGetStatus(benchmark::State& state) {
TrackCounters track_counters;
Fixture fixture;
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
while (state.KeepRunning()) {
grpc_status_code status;
grpc_slice slice;
- grpc_error_get_status(fixture.error(), fixture.deadline(), &status, &slice,
- NULL);
+ grpc_error_get_status(&exec_ctx, fixture.error(), fixture.deadline(),
+ &status, &slice, NULL);
}
+ grpc_exec_ctx_finish(&exec_ctx);
track_counters.Finish(state);
}
@@ -261,11 +263,13 @@ template <class Fixture>
static void BM_ErrorGetStatusCode(benchmark::State& state) {
TrackCounters track_counters;
Fixture fixture;
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
while (state.KeepRunning()) {
grpc_status_code status;
- grpc_error_get_status(fixture.error(), fixture.deadline(), &status, NULL,
- NULL);
+ grpc_error_get_status(&exec_ctx, fixture.error(), fixture.deadline(),
+ &status, NULL, NULL);
}
+ grpc_exec_ctx_finish(&exec_ctx);
track_counters.Finish(state);
}
@@ -273,11 +277,13 @@ template <class Fixture>
static void BM_ErrorHttpError(benchmark::State& state) {
TrackCounters track_counters;
Fixture fixture;
+ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
while (state.KeepRunning()) {
grpc_http2_error_code error;
- grpc_error_get_status(fixture.error(), fixture.deadline(), NULL, NULL,
- &error);
+ grpc_error_get_status(&exec_ctx, fixture.error(), fixture.deadline(), NULL,
+ NULL, &error);
}
+ grpc_exec_ctx_finish(&exec_ctx);
track_counters.Finish(state);
}
diff --git a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc
index 2656566a50..adb5e6657f 100644
--- a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc
+++ b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc
@@ -29,6 +29,7 @@
extern "C" {
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/ext/transport/chttp2/transport/internal.h"
+#include "src/core/lib/iomgr/timer_manager.h"
#include "test/core/util/trickle_endpoint.h"
}
@@ -45,6 +46,22 @@ DEFINE_int32(warmup_max_time_seconds, 10,
namespace grpc {
namespace testing {
+gpr_atm g_now_us = 0;
+
+static gpr_timespec fake_now(gpr_clock_type clock_type) {
+ gpr_timespec t;
+ gpr_atm now = gpr_atm_no_barrier_load(&g_now_us);
+ t.tv_sec = now / GPR_US_PER_SEC;
+ t.tv_nsec = (now % GPR_US_PER_SEC) * GPR_NS_PER_US;
+ t.clock_type = clock_type;
+ return t;
+}
+
+static void inc_time() {
+ gpr_atm_no_barrier_fetch_add(&g_now_us, 100);
+ grpc_timer_manager_tick();
+}
+
static void* tag(intptr_t x) { return reinterpret_cast<void*>(x); }
template <class A0>
@@ -158,6 +175,7 @@ class TrickledCHTTP2 : public EndpointPairFixture {
void Step(bool update_stats) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
+ inc_time();
size_t client_backlog =
grpc_trickle_endpoint_trickle(&exec_ctx, endpoint_pair_.client);
size_t server_backlog =
@@ -212,9 +230,8 @@ static void TrickleCQNext(TrickledCHTTP2* fixture, void** t, bool* ok,
int64_t iteration) {
while (true) {
fixture->Log(iteration);
- switch (fixture->cq()->AsyncNext(
- t, ok, gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC),
- gpr_time_from_micros(100, GPR_TIMESPAN)))) {
+ switch (
+ fixture->cq()->AsyncNext(t, ok, gpr_inf_past(GPR_CLOCK_MONOTONIC))) {
case CompletionQueue::TIMEOUT:
fixture->Step(iteration != -1);
break;
@@ -289,9 +306,15 @@ static void BM_PumpStreamServerToClient_Trickle(benchmark::State& state) {
inner_loop(false);
}
response_rw.Finish(Status::OK, tag(1));
- need_tags = (1 << 0) | (1 << 1);
+ grpc::Status status;
+ request_rw->Finish(&status, tag(2));
+ need_tags = (1 << 0) | (1 << 1) | (1 << 2);
while (need_tags) {
TrickleCQNext(fixture.get(), &t, &ok, -1);
+ if (t == tag(0) && ok) {
+ request_rw->Read(&recv_response, tag(0));
+ continue;
+ }
int i = (int)(intptr_t)t;
GPR_ASSERT(need_tags & (1 << i));
need_tags &= ~(1 << i);
@@ -419,8 +442,12 @@ BENCHMARK(BM_PumpUnbalancedUnary_Trickle)->Apply(UnaryTrickleArgs);
}
}
+extern "C" gpr_timespec (*gpr_now_impl)(gpr_clock_type clock_type);
+
int main(int argc, char** argv) {
::benchmark::Initialize(&argc, argv);
::grpc::testing::InitTest(&argc, &argv, false);
+ grpc_timer_manager_set_threading(false);
+ gpr_now_impl = ::grpc::testing::fake_now;
::benchmark::RunSpecifiedBenchmarks();
}
diff --git a/test/cpp/microbenchmarks/bm_pollset.cc b/test/cpp/microbenchmarks/bm_pollset.cc
index 1fc1f2f83b..eab1e89480 100644
--- a/test/cpp/microbenchmarks/bm_pollset.cc
+++ b/test/cpp/microbenchmarks/bm_pollset.cc
@@ -117,11 +117,9 @@ static void BM_PollEmptyPollset(benchmark::State& state) {
gpr_mu* mu;
grpc_pollset_init(ps, &mu);
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- gpr_timespec now = gpr_time_0(GPR_CLOCK_MONOTONIC);
- gpr_timespec deadline = gpr_inf_past(GPR_CLOCK_MONOTONIC);
gpr_mu_lock(mu);
while (state.KeepRunning()) {
- GRPC_ERROR_UNREF(grpc_pollset_work(&exec_ctx, ps, NULL, now, deadline));
+ GRPC_ERROR_UNREF(grpc_pollset_work(&exec_ctx, ps, NULL, 0));
}
grpc_closure shutdown_ps_closure;
GRPC_CLOSURE_INIT(&shutdown_ps_closure, shutdown_ps, ps,
@@ -223,8 +221,6 @@ static void BM_SingleThreadPollOneFd(benchmark::State& state) {
gpr_mu* mu;
grpc_pollset_init(ps, &mu);
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
- gpr_timespec now = gpr_time_0(GPR_CLOCK_MONOTONIC);
- gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
grpc_wakeup_fd wakeup_fd;
GRPC_ERROR_UNREF(grpc_wakeup_fd_init(&wakeup_fd));
grpc_fd* wakeup = grpc_fd_create(wakeup_fd.read_fd, "wakeup_read");
@@ -245,7 +241,8 @@ static void BM_SingleThreadPollOneFd(benchmark::State& state) {
grpc_fd_notify_on_read(&exec_ctx, wakeup, continue_closure);
gpr_mu_lock(mu);
while (!done) {
- GRPC_ERROR_UNREF(grpc_pollset_work(&exec_ctx, ps, NULL, now, deadline));
+ GRPC_ERROR_UNREF(
+ grpc_pollset_work(&exec_ctx, ps, NULL, GRPC_MILLIS_INF_FUTURE));
}
grpc_fd_orphan(&exec_ctx, wakeup, NULL, NULL, false /* already_closed */,
"done");
diff --git a/test/cpp/microbenchmarks/fullstack_fixtures.h b/test/cpp/microbenchmarks/fullstack_fixtures.h
index ecd28c3f8a..a7f8504505 100644
--- a/test/cpp/microbenchmarks/fullstack_fixtures.h
+++ b/test/cpp/microbenchmarks/fullstack_fixtures.h
@@ -85,7 +85,7 @@ class FullstackFixture : public BaseFixture {
}
virtual ~FullstackFixture() {
- server_->Shutdown();
+ server_->Shutdown(gpr_inf_past(GPR_CLOCK_MONOTONIC));
cq_->Shutdown();
void* tag;
bool ok;
@@ -212,7 +212,7 @@ class EndpointPairFixture : public BaseFixture {
}
virtual ~EndpointPairFixture() {
- server_->Shutdown();
+ server_->Shutdown(gpr_inf_past(GPR_CLOCK_MONOTONIC));
cq_->Shutdown();
void* tag;
bool ok;
diff --git a/test/cpp/naming/README.md b/test/cpp/naming/README.md
new file mode 100644
index 0000000000..e33184620c
--- /dev/null
+++ b/test/cpp/naming/README.md
@@ -0,0 +1,43 @@
+# Resolver Tests
+
+This directory has tests and infrastructure for unit tests and GCE
+integration tests of gRPC resolver functionality.
+
+There are two different tests here:
+
+## Resolver unit tests (resolver "component" tests)
+
+These tests run per-change, along with the rest of the grpc unit tests.
+They query a local testing DNS server.
+
+## GCE integration tests
+
+These tests use the same test binary and the same test records
+as the unit tests, but they run against GCE DNS (this is done by
+running the test on a GCE instance and not specifying an authority
+in uris). These tests run in a background job, which needs to be
+actively monitored.
+
+## Making changes to test records
+
+After making a change to `resolver_test_record_groups.yaml`:
+
+1. Increment the "version number" in the `resolver_tests_common_zone_name`
+ DNS zone (this is a yaml field at the top
+ of `resolver_test_record_groups.yaml`).
+
+2. Regenerate projects.
+
+3. From the repo root, run:
+
+```
+$ test/cpp/naming/create_dns_private_zone.sh
+$ test/cpp/naming/private_dns_zone_init.sh
+```
+
+Note that these commands must be ran in environment that
+has access to the grpc-testing GCE project.
+
+If everything runs smoothly, then once the change is merged,
+the GCE DNS integration testing job will transition to the
+new records and continue passing.
diff --git a/test/cpp/naming/create_private_dns_zone.sh b/test/cpp/naming/create_private_dns_zone.sh
new file mode 100755
index 0000000000..3d7520b90a
--- /dev/null
+++ b/test/cpp/naming/create_private_dns_zone.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+# 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.
+
+# This file is auto-generated
+
+set -ex
+
+cd $(dirname $0)/../../..
+
+gcloud alpha dns managed-zones create \
+ resolver-tests-version-1-grpctestingexp-zone-id \
+ --dns-name=resolver-tests-version-1.grpctestingexp. \
+ --description="GCE-DNS-private-zone-for-GRPC-testing" \
+ --visibility=private \
+ --networks=default
diff --git a/test/cpp/naming/gen_build_yaml.py b/test/cpp/naming/gen_build_yaml.py
index 3a51fef7a0..91718156e9 100755
--- a/test/cpp/naming/gen_build_yaml.py
+++ b/test/cpp/naming/gen_build_yaml.py
@@ -24,6 +24,12 @@ import json
_LOCAL_DNS_SERVER_ADDRESS = '127.0.0.1:15353'
+_TARGET_RECORDS_TO_SKIP_AGAINST_GCE = [
+ # TODO: enable this once able to upload the very large TXT record
+ # in this group to GCE DNS.
+ 'ipv4-config-causing-fallback-to-tcp',
+]
+
def _append_zone_name(name, zone_name):
return '%s.%s' % (name, zone_name)
@@ -33,21 +39,107 @@ def _build_expected_addrs_cmd_arg(expected_addrs):
out.append('%s,%s' % (addr['address'], str(addr['is_balancer'])))
return ';'.join(out)
+def _data_for_type(r_type, r_data, common_zone_name):
+ if r_type in ['A', 'AAAA']:
+ return ' '.join(map(lambda x: '\"%s\"' % x, r_data))
+ if r_type == 'SRV':
+ assert len(r_data) == 1
+ target = r_data[0].split(' ')[3]
+ uploadable_target = '%s.%s' % (target, common_zone_name)
+ uploadable = r_data[0].split(' ')
+ uploadable[3] = uploadable_target
+ return '\"%s\"' % ' '.join(uploadable)
+ if r_type == 'TXT':
+ assert len(r_data) == 1
+ chunks = []
+ all_data = r_data[0]
+ cur = 0
+ # Split TXT records that span more than 255 characters (the single
+ # string length-limit in DNS) into multiple strings. Each string
+ # needs to be wrapped with double-quotes, and all inner double-quotes
+ # are escaped. The wrapping double-quotes and inner backslashes can be
+ # counted towards the 255 character length limit (as observed with gcloud),
+ # so make sure all strings fit within that limit.
+ while len(all_data[cur:]) > 0:
+ next_chunk = '\"'
+ while len(next_chunk) < 254 and len(all_data[cur:]) > 0:
+ if all_data[cur] == '\"':
+ if len(next_chunk) < 253:
+ next_chunk += '\\\"'
+ else:
+ break
+ else:
+ next_chunk += all_data[cur]
+ cur += 1
+ next_chunk += '\"'
+ if len(next_chunk) > 255:
+ raise Exception('Bug: next chunk is too long.')
+ chunks.append(next_chunk)
+ # Wrap the whole record in single quotes to make sure all strings
+ # are associated with the same TXT record (to make it one bash token for
+ # gcloud)
+ return '\'%s\'' % ' '.join(chunks)
+
+# Convert DNS records from their "within a test group" format
+# of the yaml file to an easier form for the templates to use.
+def _gcloud_uploadable_form(test_cases, common_zone_name):
+ out = []
+ for group in test_cases:
+ if group['record_to_resolve'] in _TARGET_RECORDS_TO_SKIP_AGAINST_GCE:
+ continue
+ for record_name in group['records'].keys():
+ r_ttl = None
+ all_r_data = {}
+ for r_data in group['records'][record_name]:
+ # enforce records have the same TTL only for simplicity
+ if r_ttl is None:
+ r_ttl = r_data['TTL']
+ assert r_ttl == r_data['TTL'], '%s and %s differ' % (r_ttl, r_data['TTL'])
+ r_type = r_data['type']
+ if all_r_data.get(r_type) is None:
+ all_r_data[r_type] = []
+ all_r_data[r_type].append(r_data['data'])
+ for r_type in all_r_data.keys():
+ for r in out:
+ assert r['name'] != record_name or r['type'] != r_type, 'attempt to add a duplicate record'
+ out.append({
+ 'name': record_name,
+ 'ttl': r_ttl,
+ 'type': r_type,
+ 'data': _data_for_type(r_type, all_r_data[r_type], common_zone_name)
+ })
+ return out
+
+def _gce_dns_zone_id(resolver_component_data):
+ dns_name = resolver_component_data['resolver_tests_common_zone_name']
+ return dns_name.replace('.', '-') + 'zone-id'
+
+def _resolver_test_cases(resolver_component_data, records_to_skip):
+ out = []
+ for test_case in resolver_component_data['resolver_component_tests']:
+ if test_case['record_to_resolve'] in records_to_skip:
+ continue
+ out.append({
+ 'target_name': _append_zone_name(test_case['record_to_resolve'],
+ resolver_component_data['resolver_tests_common_zone_name']),
+ 'expected_addrs': _build_expected_addrs_cmd_arg(test_case['expected_addrs']),
+ 'expected_chosen_service_config': (test_case['expected_chosen_service_config'] or ''),
+ 'expected_lb_policy': (test_case['expected_lb_policy'] or ''),
+ })
+ return out
+
def main():
resolver_component_data = ''
with open('test/cpp/naming/resolver_test_record_groups.yaml') as f:
resolver_component_data = yaml.load(f)
json = {
- 'resolver_component_test_cases': [
- {
- 'target_name': _append_zone_name(test_case['record_to_resolve'],
- resolver_component_data['resolver_component_tests_common_zone_name']),
- 'expected_addrs': _build_expected_addrs_cmd_arg(test_case['expected_addrs']),
- 'expected_chosen_service_config': (test_case['expected_chosen_service_config'] or ''),
- 'expected_lb_policy': (test_case['expected_lb_policy'] or ''),
- } for test_case in resolver_component_data['resolver_component_tests']
- ],
+ 'resolver_tests_common_zone_name': resolver_component_data['resolver_tests_common_zone_name'],
+ 'resolver_gce_integration_tests_zone_id': _gce_dns_zone_id(resolver_component_data),
+ 'all_integration_test_records': _gcloud_uploadable_form(resolver_component_data['resolver_component_tests'],
+ resolver_component_data['resolver_tests_common_zone_name']),
+ 'resolver_gce_integration_test_cases': _resolver_test_cases(resolver_component_data, _TARGET_RECORDS_TO_SKIP_AGAINST_GCE),
+ 'resolver_component_test_cases': _resolver_test_cases(resolver_component_data, []),
'targets': [
{
'name': 'resolver_component_test' + unsecure_build_config_suffix,
diff --git a/test/cpp/naming/private_dns_zone_init.sh b/test/cpp/naming/private_dns_zone_init.sh
new file mode 100755
index 0000000000..4eaf750ab7
--- /dev/null
+++ b/test/cpp/naming/private_dns_zone_init.sh
@@ -0,0 +1,215 @@
+#!/bin/bash
+# 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.
+
+# This file is auto-generated
+
+set -ex
+
+cd $(dirname $0)/../../..
+
+gcloud dns record-sets transaction start -z=resolver-tests-version-1-grpctestingexp-zone-id
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=_grpclb._tcp.srv-ipv4-single-target.resolver-tests-version-1.grpctestingexp. \
+ --type=SRV \
+ --ttl=2100 \
+ "0 0 1234 ipv4-single-target.resolver-tests-version-1.grpctestingexp."
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=ipv4-single-target.resolver-tests-version-1.grpctestingexp. \
+ --type=A \
+ --ttl=2100 \
+ "1.2.3.4"
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=_grpclb._tcp.srv-ipv4-multi-target.resolver-tests-version-1.grpctestingexp. \
+ --type=SRV \
+ --ttl=2100 \
+ "0 0 1234 ipv4-multi-target.resolver-tests-version-1.grpctestingexp."
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=ipv4-multi-target.resolver-tests-version-1.grpctestingexp. \
+ --type=A \
+ --ttl=2100 \
+ "1.2.3.5" "1.2.3.6" "1.2.3.7"
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=_grpclb._tcp.srv-ipv6-single-target.resolver-tests-version-1.grpctestingexp. \
+ --type=SRV \
+ --ttl=2100 \
+ "0 0 1234 ipv6-single-target.resolver-tests-version-1.grpctestingexp."
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=ipv6-single-target.resolver-tests-version-1.grpctestingexp. \
+ --type=AAAA \
+ --ttl=2100 \
+ "2607:f8b0:400a:801::1001"
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=_grpclb._tcp.srv-ipv6-multi-target.resolver-tests-version-1.grpctestingexp. \
+ --type=SRV \
+ --ttl=2100 \
+ "0 0 1234 ipv6-multi-target.resolver-tests-version-1.grpctestingexp."
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=ipv6-multi-target.resolver-tests-version-1.grpctestingexp. \
+ --type=AAAA \
+ --ttl=2100 \
+ "2607:f8b0:400a:801::1002" "2607:f8b0:400a:801::1003" "2607:f8b0:400a:801::1004"
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=srv-ipv4-simple-service-config.resolver-tests-version-1.grpctestingexp. \
+ --type=TXT \
+ --ttl=2100 \
+ '"grpc_config=[{\"serviceConfig\":{\"loadBalancingPolicy\":\"round_robin\",\"methodConfig\":[{\"name\":[{\"method\":\"Foo\",\"service\":\"SimpleService\",\"waitForReady\":true}]}]}}]"'
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=ipv4-simple-service-config.resolver-tests-version-1.grpctestingexp. \
+ --type=A \
+ --ttl=2100 \
+ "1.2.3.4"
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=_grpclb._tcp.srv-ipv4-simple-service-config.resolver-tests-version-1.grpctestingexp. \
+ --type=SRV \
+ --ttl=2100 \
+ "0 0 1234 ipv4-simple-service-config.resolver-tests-version-1.grpctestingexp."
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=ipv4-no-srv-simple-service-config.resolver-tests-version-1.grpctestingexp. \
+ --type=A \
+ --ttl=2100 \
+ "1.2.3.4"
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=ipv4-no-srv-simple-service-config.resolver-tests-version-1.grpctestingexp. \
+ --type=TXT \
+ --ttl=2100 \
+ '"grpc_config=[{\"serviceConfig\":{\"loadBalancingPolicy\":\"round_robin\",\"methodConfig\":[{\"name\":[{\"method\":\"Foo\",\"service\":\"NoSrvSimpleService\",\"waitForReady\":true}]}]}}]"'
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=ipv4-no-config-for-cpp.resolver-tests-version-1.grpctestingexp. \
+ --type=A \
+ --ttl=2100 \
+ "1.2.3.4"
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=ipv4-no-config-for-cpp.resolver-tests-version-1.grpctestingexp. \
+ --type=TXT \
+ --ttl=2100 \
+ '"grpc_config=[{\"clientLanguage\":[\"python\"],\"serviceConfig\":{\"loadBalancingPolicy\":\"round_robin\",\"methodConfig\":[{\"name\":[{\"method\":\"Foo\",\"service\":\"PythonService\",\"waitForReady\":true}]}]}}]"'
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=ipv4-cpp-config-has-zero-percentage.resolver-tests-version-1.grpctestingexp. \
+ --type=A \
+ --ttl=2100 \
+ "1.2.3.4"
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=ipv4-cpp-config-has-zero-percentage.resolver-tests-version-1.grpctestingexp. \
+ --type=TXT \
+ --ttl=2100 \
+ '"grpc_config=[{\"percentage\":0,\"serviceConfig\":{\"loadBalancingPolicy\":\"round_robin\",\"methodConfig\":[{\"name\":[{\"method\":\"Foo\",\"service\":\"CppService\",\"waitForReady\":true}]}]}}]"'
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=ipv4-second-language-is-cpp.resolver-tests-version-1.grpctestingexp. \
+ --type=A \
+ --ttl=2100 \
+ "1.2.3.4"
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=ipv4-second-language-is-cpp.resolver-tests-version-1.grpctestingexp. \
+ --type=TXT \
+ --ttl=2100 \
+ '"grpc_config=[{\"clientLanguage\":[\"go\"],\"serviceConfig\":{\"loadBalancingPolicy\":\"round_robin\",\"methodConfig\":[{\"name\":[{\"method\":\"Foo\",\"service\":\"GoService\",\"waitForReady\":true}]}]}},{\"clientLanguage\":[\"c++\"],\"serviceConfig\":{" "\"loadBalancingPolicy\":\"round_robin\",\"methodConfig\":[{\"name\":[{\"method\":\"Foo\",\"service\":\"CppService\",\"waitForReady\":true}]}]}}]"'
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=ipv4-config-with-percentages.resolver-tests-version-1.grpctestingexp. \
+ --type=A \
+ --ttl=2100 \
+ "1.2.3.4"
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=ipv4-config-with-percentages.resolver-tests-version-1.grpctestingexp. \
+ --type=TXT \
+ --ttl=2100 \
+ '"grpc_config=[{\"percentage\":0,\"serviceConfig\":{\"loadBalancingPolicy\":\"round_robin\",\"methodConfig\":[{\"name\":[{\"method\":\"Foo\",\"service\":\"NeverPickedService\",\"waitForReady\":true}]}]}},{\"percentage\":100,\"serviceConfig\":{\"loadBalanc" "ingPolicy\":\"round_robin\",\"methodConfig\":[{\"name\":[{\"method\":\"Foo\",\"service\":\"AlwaysPickedService\",\"waitForReady\":true}]}]}}]"'
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=_grpclb._tcp.srv-ipv4-target-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. \
+ --type=SRV \
+ --ttl=2100 \
+ "0 0 1234 balancer-for-ipv4-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp."
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=balancer-for-ipv4-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. \
+ --type=A \
+ --ttl=2100 \
+ "1.2.3.4"
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=srv-ipv4-target-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. \
+ --type=A \
+ --ttl=2100 \
+ "1.2.3.4"
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=_grpclb._tcp.srv-ipv6-target-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. \
+ --type=SRV \
+ --ttl=2100 \
+ "0 0 1234 balancer-for-ipv6-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp."
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=balancer-for-ipv6-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. \
+ --type=AAAA \
+ --ttl=2100 \
+ "2607:f8b0:400a:801::1002"
+
+gcloud dns record-sets transaction add \
+ -z=resolver-tests-version-1-grpctestingexp-zone-id \
+ --name=srv-ipv6-target-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. \
+ --type=AAAA \
+ --ttl=2100 \
+ "2607:f8b0:400a:801::1002"
+
+gcloud dns record-sets transaction describe -z=resolver-tests-version-1-grpctestingexp-zone-id
+gcloud dns record-sets transaction execute -z=resolver-tests-version-1-grpctestingexp-zone-id
+gcloud dns record-sets list -z=resolver-tests-version-1-grpctestingexp-zone-id
diff --git a/test/cpp/naming/resolver_component_test.cc b/test/cpp/naming/resolver_component_test.cc
index cc851ca9d5..7d0371bea4 100644
--- a/test/cpp/naming/resolver_component_test.cc
+++ b/test/cpp/naming/resolver_component_test.cc
@@ -199,10 +199,10 @@ void PollPollsetUntilRequestDone(ArgsStruct *args) {
grpc_pollset_worker *worker = NULL;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
gpr_mu_lock(args->mu);
- GRPC_LOG_IF_ERROR(
- "pollset_work",
- grpc_pollset_work(&exec_ctx, args->pollset, &worker,
- gpr_now(GPR_CLOCK_REALTIME), NSecondDeadline(1)));
+ GRPC_LOG_IF_ERROR("pollset_work",
+ grpc_pollset_work(&exec_ctx, args->pollset, &worker,
+ grpc_timespec_to_millis_round_up(
+ NSecondDeadline(1))));
gpr_mu_unlock(args->mu);
grpc_exec_ctx_finish(&exec_ctx);
}
diff --git a/test/cpp/naming/resolver_component_tests_runner.sh b/test/cpp/naming/resolver_component_tests_runner.sh
index cf71c9dcf9..407db5ed66 100755
--- a/test/cpp/naming/resolver_component_tests_runner.sh
+++ b/test/cpp/naming/resolver_component_tests_runner.sh
@@ -73,7 +73,7 @@ EXIT_CODE=0
# in the resolver.
$FLAGS_test_bin_path \
- --target_name='srv-ipv4-single-target.resolver-tests.grpctestingexp.' \
+ --target_name='srv-ipv4-single-target.resolver-tests-version-1.grpctestingexp.' \
--expected_addrs='1.2.3.4:1234,True' \
--expected_chosen_service_config='' \
--expected_lb_policy='' \
@@ -81,7 +81,7 @@ $FLAGS_test_bin_path \
wait $! || EXIT_CODE=1
$FLAGS_test_bin_path \
- --target_name='srv-ipv4-multi-target.resolver-tests.grpctestingexp.' \
+ --target_name='srv-ipv4-multi-target.resolver-tests-version-1.grpctestingexp.' \
--expected_addrs='1.2.3.5:1234,True;1.2.3.6:1234,True;1.2.3.7:1234,True' \
--expected_chosen_service_config='' \
--expected_lb_policy='' \
@@ -89,7 +89,7 @@ $FLAGS_test_bin_path \
wait $! || EXIT_CODE=1
$FLAGS_test_bin_path \
- --target_name='srv-ipv6-single-target.resolver-tests.grpctestingexp.' \
+ --target_name='srv-ipv6-single-target.resolver-tests-version-1.grpctestingexp.' \
--expected_addrs='[2607:f8b0:400a:801::1001]:1234,True' \
--expected_chosen_service_config='' \
--expected_lb_policy='' \
@@ -97,7 +97,7 @@ $FLAGS_test_bin_path \
wait $! || EXIT_CODE=1
$FLAGS_test_bin_path \
- --target_name='srv-ipv6-multi-target.resolver-tests.grpctestingexp.' \
+ --target_name='srv-ipv6-multi-target.resolver-tests-version-1.grpctestingexp.' \
--expected_addrs='[2607:f8b0:400a:801::1002]:1234,True;[2607:f8b0:400a:801::1003]:1234,True;[2607:f8b0:400a:801::1004]:1234,True' \
--expected_chosen_service_config='' \
--expected_lb_policy='' \
@@ -105,7 +105,7 @@ $FLAGS_test_bin_path \
wait $! || EXIT_CODE=1
$FLAGS_test_bin_path \
- --target_name='srv-ipv4-simple-service-config.resolver-tests.grpctestingexp.' \
+ --target_name='srv-ipv4-simple-service-config.resolver-tests-version-1.grpctestingexp.' \
--expected_addrs='1.2.3.4:1234,True' \
--expected_chosen_service_config='{"loadBalancingPolicy":"round_robin","methodConfig":[{"name":[{"method":"Foo","service":"SimpleService","waitForReady":true}]}]}' \
--expected_lb_policy='round_robin' \
@@ -113,7 +113,7 @@ $FLAGS_test_bin_path \
wait $! || EXIT_CODE=1
$FLAGS_test_bin_path \
- --target_name='ipv4-no-srv-simple-service-config.resolver-tests.grpctestingexp.' \
+ --target_name='ipv4-no-srv-simple-service-config.resolver-tests-version-1.grpctestingexp.' \
--expected_addrs='1.2.3.4:443,False' \
--expected_chosen_service_config='{"loadBalancingPolicy":"round_robin","methodConfig":[{"name":[{"method":"Foo","service":"NoSrvSimpleService","waitForReady":true}]}]}' \
--expected_lb_policy='round_robin' \
@@ -121,7 +121,7 @@ $FLAGS_test_bin_path \
wait $! || EXIT_CODE=1
$FLAGS_test_bin_path \
- --target_name='ipv4-no-config-for-cpp.resolver-tests.grpctestingexp.' \
+ --target_name='ipv4-no-config-for-cpp.resolver-tests-version-1.grpctestingexp.' \
--expected_addrs='1.2.3.4:443,False' \
--expected_chosen_service_config='' \
--expected_lb_policy='' \
@@ -129,7 +129,7 @@ $FLAGS_test_bin_path \
wait $! || EXIT_CODE=1
$FLAGS_test_bin_path \
- --target_name='ipv4-cpp-config-has-zero-percentage.resolver-tests.grpctestingexp.' \
+ --target_name='ipv4-cpp-config-has-zero-percentage.resolver-tests-version-1.grpctestingexp.' \
--expected_addrs='1.2.3.4:443,False' \
--expected_chosen_service_config='' \
--expected_lb_policy='' \
@@ -137,7 +137,7 @@ $FLAGS_test_bin_path \
wait $! || EXIT_CODE=1
$FLAGS_test_bin_path \
- --target_name='ipv4-second-language-is-cpp.resolver-tests.grpctestingexp.' \
+ --target_name='ipv4-second-language-is-cpp.resolver-tests-version-1.grpctestingexp.' \
--expected_addrs='1.2.3.4:443,False' \
--expected_chosen_service_config='{"loadBalancingPolicy":"round_robin","methodConfig":[{"name":[{"method":"Foo","service":"CppService","waitForReady":true}]}]}' \
--expected_lb_policy='round_robin' \
@@ -145,7 +145,7 @@ $FLAGS_test_bin_path \
wait $! || EXIT_CODE=1
$FLAGS_test_bin_path \
- --target_name='ipv4-config-with-percentages.resolver-tests.grpctestingexp.' \
+ --target_name='ipv4-config-with-percentages.resolver-tests-version-1.grpctestingexp.' \
--expected_addrs='1.2.3.4:443,False' \
--expected_chosen_service_config='{"loadBalancingPolicy":"round_robin","methodConfig":[{"name":[{"method":"Foo","service":"AlwaysPickedService","waitForReady":true}]}]}' \
--expected_lb_policy='round_robin' \
@@ -153,7 +153,7 @@ $FLAGS_test_bin_path \
wait $! || EXIT_CODE=1
$FLAGS_test_bin_path \
- --target_name='srv-ipv4-target-has-backend-and-balancer.resolver-tests.grpctestingexp.' \
+ --target_name='srv-ipv4-target-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp.' \
--expected_addrs='1.2.3.4:1234,True;1.2.3.4:443,False' \
--expected_chosen_service_config='' \
--expected_lb_policy='' \
@@ -161,7 +161,7 @@ $FLAGS_test_bin_path \
wait $! || EXIT_CODE=1
$FLAGS_test_bin_path \
- --target_name='srv-ipv6-target-has-backend-and-balancer.resolver-tests.grpctestingexp.' \
+ --target_name='srv-ipv6-target-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp.' \
--expected_addrs='[2607:f8b0:400a:801::1002]:1234,True;[2607:f8b0:400a:801::1002]:443,False' \
--expected_chosen_service_config='' \
--expected_lb_policy='' \
@@ -169,7 +169,7 @@ $FLAGS_test_bin_path \
wait $! || EXIT_CODE=1
$FLAGS_test_bin_path \
- --target_name='ipv4-config-causing-fallback-to-tcp.resolver-tests.grpctestingexp.' \
+ --target_name='ipv4-config-causing-fallback-to-tcp.resolver-tests-version-1.grpctestingexp.' \
--expected_addrs='1.2.3.4:443,False' \
--expected_chosen_service_config='{"loadBalancingPolicy":"round_robin","methodConfig":[{"name":[{"method":"Foo","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooTwo","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooThree","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooFour","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooFive","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooSix","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooSeven","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooEight","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooNine","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooTen","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooEleven","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooTwelve","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooTwelve","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooTwelve","service":"SimpleService","waitForReady":true}]},{"name":[{"method":"FooTwelve","service":"SimpleService","waitForReady":true}]}]}' \
--expected_lb_policy='' \
diff --git a/test/cpp/naming/resolver_gce_integration_tests_runner.sh b/test/cpp/naming/resolver_gce_integration_tests_runner.sh
new file mode 100755
index 0000000000..b20d18d9d1
--- /dev/null
+++ b/test/cpp/naming/resolver_gce_integration_tests_runner.sh
@@ -0,0 +1,359 @@
+#!/bin/bash
+# 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.
+
+# This file is auto-generated
+
+set -ex
+
+if [[ "$GRPC_DNS_RESOLVER" == "" ]]; then
+ export GRPC_DNS_RESOLVER=ares
+elif [[ "$GRPC_DNS_RESOLVER" != ares ]]; then
+ echo "Unexpected: GRPC_DNS_RESOLVER=$GRPC_DNS_RESOLVER. This test only works with c-ares resolver"
+ exit 1
+fi
+
+cd $(dirname $0)/../../..
+
+if [[ "$CONFIG" == "" ]]; then
+ export CONFIG=opt
+fi
+make resolver_component_test
+echo "Sanity check DNS records are resolveable with dig:"
+EXIT_CODE=0
+
+ONE_FAILED=0
+dig SRV _grpclb._tcp.srv-ipv4-single-target.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig SRV _grpclb._tcp.srv-ipv4-single-target.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig A ipv4-single-target.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig A ipv4-single-target.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig SRV _grpclb._tcp.srv-ipv4-multi-target.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig SRV _grpclb._tcp.srv-ipv4-multi-target.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig A ipv4-multi-target.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig A ipv4-multi-target.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig SRV _grpclb._tcp.srv-ipv6-single-target.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig SRV _grpclb._tcp.srv-ipv6-single-target.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig AAAA ipv6-single-target.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig AAAA ipv6-single-target.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig SRV _grpclb._tcp.srv-ipv6-multi-target.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig SRV _grpclb._tcp.srv-ipv6-multi-target.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig AAAA ipv6-multi-target.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig AAAA ipv6-multi-target.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig TXT srv-ipv4-simple-service-config.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig TXT srv-ipv4-simple-service-config.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig A ipv4-simple-service-config.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig A ipv4-simple-service-config.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig SRV _grpclb._tcp.srv-ipv4-simple-service-config.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig SRV _grpclb._tcp.srv-ipv4-simple-service-config.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig A ipv4-no-srv-simple-service-config.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig A ipv4-no-srv-simple-service-config.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig TXT ipv4-no-srv-simple-service-config.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig TXT ipv4-no-srv-simple-service-config.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig A ipv4-no-config-for-cpp.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig A ipv4-no-config-for-cpp.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig TXT ipv4-no-config-for-cpp.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig TXT ipv4-no-config-for-cpp.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig A ipv4-cpp-config-has-zero-percentage.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig A ipv4-cpp-config-has-zero-percentage.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig TXT ipv4-cpp-config-has-zero-percentage.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig TXT ipv4-cpp-config-has-zero-percentage.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig A ipv4-second-language-is-cpp.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig A ipv4-second-language-is-cpp.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig TXT ipv4-second-language-is-cpp.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig TXT ipv4-second-language-is-cpp.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig A ipv4-config-with-percentages.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig A ipv4-config-with-percentages.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig TXT ipv4-config-with-percentages.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig TXT ipv4-config-with-percentages.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig SRV _grpclb._tcp.srv-ipv4-target-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig SRV _grpclb._tcp.srv-ipv4-target-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig A balancer-for-ipv4-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig A balancer-for-ipv4-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig A srv-ipv4-target-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig A srv-ipv4-target-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig SRV _grpclb._tcp.srv-ipv6-target-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig SRV _grpclb._tcp.srv-ipv6-target-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig AAAA balancer-for-ipv6-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig AAAA balancer-for-ipv6-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+ONE_FAILED=0
+dig AAAA srv-ipv6-target-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. | grep 'ANSWER SECTION' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Sanity check: dig AAAA srv-ipv6-target-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. FAILED"
+ exit 1
+fi
+
+echo "Sanity check PASSED. Run resolver tests:"
+
+ONE_FAILED=0
+bins/$CONFIG/resolver_component_test \
+ --target_name='srv-ipv4-single-target.resolver-tests-version-1.grpctestingexp.' \
+ --expected_addrs='1.2.3.4:1234,True' \
+ --expected_chosen_service_config='' \
+ --expected_lb_policy='' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Test based on target record: srv-ipv4-single-target.resolver-tests-version-1.grpctestingexp. FAILED"
+ EXIT_CODE=1
+fi
+
+ONE_FAILED=0
+bins/$CONFIG/resolver_component_test \
+ --target_name='srv-ipv4-multi-target.resolver-tests-version-1.grpctestingexp.' \
+ --expected_addrs='1.2.3.5:1234,True;1.2.3.6:1234,True;1.2.3.7:1234,True' \
+ --expected_chosen_service_config='' \
+ --expected_lb_policy='' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Test based on target record: srv-ipv4-multi-target.resolver-tests-version-1.grpctestingexp. FAILED"
+ EXIT_CODE=1
+fi
+
+ONE_FAILED=0
+bins/$CONFIG/resolver_component_test \
+ --target_name='srv-ipv6-single-target.resolver-tests-version-1.grpctestingexp.' \
+ --expected_addrs='[2607:f8b0:400a:801::1001]:1234,True' \
+ --expected_chosen_service_config='' \
+ --expected_lb_policy='' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Test based on target record: srv-ipv6-single-target.resolver-tests-version-1.grpctestingexp. FAILED"
+ EXIT_CODE=1
+fi
+
+ONE_FAILED=0
+bins/$CONFIG/resolver_component_test \
+ --target_name='srv-ipv6-multi-target.resolver-tests-version-1.grpctestingexp.' \
+ --expected_addrs='[2607:f8b0:400a:801::1002]:1234,True;[2607:f8b0:400a:801::1003]:1234,True;[2607:f8b0:400a:801::1004]:1234,True' \
+ --expected_chosen_service_config='' \
+ --expected_lb_policy='' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Test based on target record: srv-ipv6-multi-target.resolver-tests-version-1.grpctestingexp. FAILED"
+ EXIT_CODE=1
+fi
+
+ONE_FAILED=0
+bins/$CONFIG/resolver_component_test \
+ --target_name='srv-ipv4-simple-service-config.resolver-tests-version-1.grpctestingexp.' \
+ --expected_addrs='1.2.3.4:1234,True' \
+ --expected_chosen_service_config='{"loadBalancingPolicy":"round_robin","methodConfig":[{"name":[{"method":"Foo","service":"SimpleService","waitForReady":true}]}]}' \
+ --expected_lb_policy='round_robin' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Test based on target record: srv-ipv4-simple-service-config.resolver-tests-version-1.grpctestingexp. FAILED"
+ EXIT_CODE=1
+fi
+
+ONE_FAILED=0
+bins/$CONFIG/resolver_component_test \
+ --target_name='ipv4-no-srv-simple-service-config.resolver-tests-version-1.grpctestingexp.' \
+ --expected_addrs='1.2.3.4:443,False' \
+ --expected_chosen_service_config='{"loadBalancingPolicy":"round_robin","methodConfig":[{"name":[{"method":"Foo","service":"NoSrvSimpleService","waitForReady":true}]}]}' \
+ --expected_lb_policy='round_robin' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Test based on target record: ipv4-no-srv-simple-service-config.resolver-tests-version-1.grpctestingexp. FAILED"
+ EXIT_CODE=1
+fi
+
+ONE_FAILED=0
+bins/$CONFIG/resolver_component_test \
+ --target_name='ipv4-no-config-for-cpp.resolver-tests-version-1.grpctestingexp.' \
+ --expected_addrs='1.2.3.4:443,False' \
+ --expected_chosen_service_config='' \
+ --expected_lb_policy='' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Test based on target record: ipv4-no-config-for-cpp.resolver-tests-version-1.grpctestingexp. FAILED"
+ EXIT_CODE=1
+fi
+
+ONE_FAILED=0
+bins/$CONFIG/resolver_component_test \
+ --target_name='ipv4-cpp-config-has-zero-percentage.resolver-tests-version-1.grpctestingexp.' \
+ --expected_addrs='1.2.3.4:443,False' \
+ --expected_chosen_service_config='' \
+ --expected_lb_policy='' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Test based on target record: ipv4-cpp-config-has-zero-percentage.resolver-tests-version-1.grpctestingexp. FAILED"
+ EXIT_CODE=1
+fi
+
+ONE_FAILED=0
+bins/$CONFIG/resolver_component_test \
+ --target_name='ipv4-second-language-is-cpp.resolver-tests-version-1.grpctestingexp.' \
+ --expected_addrs='1.2.3.4:443,False' \
+ --expected_chosen_service_config='{"loadBalancingPolicy":"round_robin","methodConfig":[{"name":[{"method":"Foo","service":"CppService","waitForReady":true}]}]}' \
+ --expected_lb_policy='round_robin' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Test based on target record: ipv4-second-language-is-cpp.resolver-tests-version-1.grpctestingexp. FAILED"
+ EXIT_CODE=1
+fi
+
+ONE_FAILED=0
+bins/$CONFIG/resolver_component_test \
+ --target_name='ipv4-config-with-percentages.resolver-tests-version-1.grpctestingexp.' \
+ --expected_addrs='1.2.3.4:443,False' \
+ --expected_chosen_service_config='{"loadBalancingPolicy":"round_robin","methodConfig":[{"name":[{"method":"Foo","service":"AlwaysPickedService","waitForReady":true}]}]}' \
+ --expected_lb_policy='round_robin' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Test based on target record: ipv4-config-with-percentages.resolver-tests-version-1.grpctestingexp. FAILED"
+ EXIT_CODE=1
+fi
+
+ONE_FAILED=0
+bins/$CONFIG/resolver_component_test \
+ --target_name='srv-ipv4-target-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp.' \
+ --expected_addrs='1.2.3.4:1234,True;1.2.3.4:443,False' \
+ --expected_chosen_service_config='' \
+ --expected_lb_policy='' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Test based on target record: srv-ipv4-target-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. FAILED"
+ EXIT_CODE=1
+fi
+
+ONE_FAILED=0
+bins/$CONFIG/resolver_component_test \
+ --target_name='srv-ipv6-target-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp.' \
+ --expected_addrs='[2607:f8b0:400a:801::1002]:1234,True;[2607:f8b0:400a:801::1002]:443,False' \
+ --expected_chosen_service_config='' \
+ --expected_lb_policy='' || ONE_FAILED=1
+if [[ "$ONE_FAILED" != 0 ]]; then
+ echo "Test based on target record: srv-ipv6-target-has-backend-and-balancer.resolver-tests-version-1.grpctestingexp. FAILED"
+ EXIT_CODE=1
+fi
+
+exit $EXIT_CODE
diff --git a/test/cpp/naming/resolver_test_record_groups.yaml b/test/cpp/naming/resolver_test_record_groups.yaml
index 33d774ca70..2b3204335c 100644
--- a/test/cpp/naming/resolver_test_record_groups.yaml
+++ b/test/cpp/naming/resolver_test_record_groups.yaml
@@ -1,4 +1,4 @@
-resolver_component_tests_common_zone_name: resolver-tests.grpctestingexp.
+resolver_tests_common_zone_name: resolver-tests-version-1.grpctestingexp.
resolver_component_tests:
- expected_addrs:
- {address: '1.2.3.4:1234', is_balancer: true}
diff --git a/test/cpp/naming/test_dns_server.py b/test/cpp/naming/test_dns_server.py
index 9d4b89cffb..9f42f65ee6 100755
--- a/test/cpp/naming/test_dns_server.py
+++ b/test/cpp/naming/test_dns_server.py
@@ -66,7 +66,7 @@ def start_local_dns_server(args):
with open(args.records_config_path) as config:
test_records_config = yaml.load(config)
- common_zone_name = test_records_config['resolver_component_tests_common_zone_name']
+ common_zone_name = test_records_config['resolver_tests_common_zone_name']
for group in test_records_config['resolver_component_tests']:
for name in group['records'].keys():
for record in group['records'][name]:
diff --git a/test/cpp/qps/gen_build_yaml.py b/test/cpp/qps/gen_build_yaml.py
index a3ccbcf576..8575fe5a05 100755
--- a/test/cpp/qps/gen_build_yaml.py
+++ b/test/cpp/qps/gen_build_yaml.py
@@ -77,7 +77,7 @@ print yaml.dump({
'defaults': 'boringssl',
'cpu_cost': guess_cpu(scenario_json, False),
'exclude_configs': ['tsan', 'asan'],
- 'timeout_seconds': 6*60,
+ 'timeout_seconds': 2*60,
'excluded_poll_engines': scenario_json.get('EXCLUDED_POLL_ENGINES', [])
}
for scenario_json in scenario_config.CXXLanguage().scenarios()
@@ -95,7 +95,7 @@ print yaml.dump({
'defaults': 'boringssl',
'cpu_cost': guess_cpu(scenario_json, True),
'exclude_configs': sorted(c for c in configs_from_yaml if c not in ('tsan', 'asan')),
- 'timeout_seconds': 6*60,
+ 'timeout_seconds': 2*60,
'excluded_poll_engines': scenario_json.get('EXCLUDED_POLL_ENGINES', [])
}
for scenario_json in scenario_config.CXXLanguage().scenarios()
diff --git a/test/cpp/util/grpc_tool.cc b/test/cpp/util/grpc_tool.cc
index bb6f878020..cd6084ac6d 100644
--- a/test/cpp/util/grpc_tool.cc
+++ b/test/cpp/util/grpc_tool.cc
@@ -58,6 +58,11 @@ DEFINE_string(protofiles, "", "Name of the proto file.");
DEFINE_bool(binary_input, false, "Input in binary format");
DEFINE_bool(binary_output, false, "Output in binary format");
DEFINE_string(infile, "", "Input file (default is stdin)");
+DEFINE_bool(batch, false,
+ "Input contains multiple requests. Please do not use this to send "
+ "more than a few RPCs. gRPC CLI has very different performance "
+ "characteristics compared with normal RPC calls which make it "
+ "unsuitable for loadtesting or significant production traffic.");
namespace {
@@ -460,12 +465,17 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
return false;
}
+ if (argc == 3) {
+ request_text = argv[2];
+ }
+
if (parser->IsStreaming(method_name, true /* is_request */)) {
std::istream* input_stream;
std::ifstream input_file;
- if (argc == 3) {
- request_text = argv[2];
+ if (FLAGS_batch) {
+ fprintf(stderr, "Batch mode for streaming RPC is not supported.\n");
+ return false;
}
std::multimap<grpc::string, grpc::string> client_metadata;
@@ -549,8 +559,115 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
}
} else { // parser->IsStreaming(method_name, true /* is_request */)
+ if (FLAGS_batch) {
+ if (parser->IsStreaming(method_name, false /* is_request */)) {
+ fprintf(stderr, "Batch mode for streaming RPC is not supported.\n");
+ return false;
+ }
+
+ std::istream* input_stream;
+ std::ifstream input_file;
+
+ if (FLAGS_infile.empty()) {
+ if (isatty(fileno(stdin))) {
+ print_mode = true;
+ fprintf(stderr, "reading request messages from stdin...\n");
+ }
+ input_stream = &std::cin;
+ } else {
+ input_file.open(FLAGS_infile, std::ios::in | std::ios::binary);
+ input_stream = &input_file;
+ }
+
+ std::multimap<grpc::string, grpc::string> client_metadata;
+ ParseMetadataFlag(&client_metadata);
+ if (print_mode) {
+ PrintMetadata(client_metadata, "Sending client initial metadata:");
+ }
+
+ std::stringstream request_ss;
+ grpc::string line;
+ while (!request_text.empty() ||
+ (!input_stream->eof() && getline(*input_stream, line))) {
+ if (!request_text.empty()) {
+ if (FLAGS_binary_input) {
+ serialized_request_proto = request_text;
+ request_text.clear();
+ } else {
+ serialized_request_proto = parser->GetSerializedProtoFromMethod(
+ method_name, request_text, true /* is_request */);
+ request_text.clear();
+ if (parser->HasError()) {
+ if (print_mode) {
+ fprintf(stderr, "Failed to parse request.\n");
+ }
+ continue;
+ }
+ }
+
+ grpc::string serialized_response_proto;
+ std::multimap<grpc::string_ref, grpc::string_ref>
+ server_initial_metadata, server_trailing_metadata;
+ CliCall call(channel, formatted_method_name, client_metadata);
+ call.Write(serialized_request_proto);
+ call.WritesDone();
+ if (!call.Read(&serialized_response_proto,
+ &server_initial_metadata)) {
+ fprintf(stderr, "Failed to read response.\n");
+ }
+ Status status = call.Finish(&server_trailing_metadata);
+
+ if (status.ok()) {
+ if (print_mode) {
+ fprintf(stderr, "Rpc succeeded with OK status.\n");
+ PrintMetadata(server_initial_metadata,
+ "Received initial metadata from server:");
+ PrintMetadata(server_trailing_metadata,
+ "Received trailing metadata from server:");
+ }
+
+ if (FLAGS_binary_output) {
+ if (!callback(serialized_response_proto)) {
+ break;
+ }
+ } else {
+ grpc::string response_text = parser->GetTextFormatFromMethod(
+ method_name, serialized_response_proto,
+ false /* is_request */);
+ if (parser->HasError() && print_mode) {
+ fprintf(stderr, "Failed to parse response.\n");
+ } else {
+ if (!callback(response_text)) {
+ break;
+ }
+ }
+ }
+ } else {
+ if (print_mode) {
+ fprintf(stderr,
+ "Rpc failed with status code %d, error message: %s\n",
+ status.error_code(), status.error_message().c_str());
+ }
+ }
+ } else {
+ if (line.length() == 0) {
+ request_text = request_ss.str();
+ request_ss.str(grpc::string());
+ request_ss.clear();
+ } else {
+ request_ss << line << ' ';
+ }
+ }
+ }
+
+ if (input_file.is_open()) {
+ input_file.close();
+ }
+
+ return true;
+ }
+
if (argc == 3) {
- request_text = argv[2];
if (!FLAGS_infile.empty()) {
fprintf(stderr, "warning: request given in argv, ignoring --infile\n");
}
@@ -571,9 +688,7 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
if (FLAGS_binary_input) {
serialized_request_proto = request_text;
- // formatted_method_name = method_name;
} else {
- // formatted_method_name = parser->GetFormattedMethodName(method_name);
serialized_request_proto = parser->GetSerializedProtoFromMethod(
method_name, request_text, true /* is_request */);
if (parser->HasError()) {
diff --git a/test/cpp/util/grpc_tool_test.cc b/test/cpp/util/grpc_tool_test.cc
index dd00581f2b..d0b3d7b81b 100644
--- a/test/cpp/util/grpc_tool_test.cc
+++ b/test/cpp/util/grpc_tool_test.cc
@@ -84,6 +84,7 @@ namespace testing {
DECLARE_bool(binary_input);
DECLARE_bool(binary_output);
DECLARE_bool(l);
+DECLARE_bool(batch);
namespace {
@@ -399,6 +400,60 @@ TEST_F(GrpcToolTest, CallCommand) {
ShutdownServer();
}
+TEST_F(GrpcToolTest, CallCommandBatch) {
+ // Test input "grpc_cli call Echo"
+ std::stringstream output_stream;
+
+ const grpc::string server_address = SetUpServer();
+ const char* argv[] = {"grpc_cli", "call", server_address.c_str(), "Echo",
+ "message: 'Hello0'"};
+
+ // Mock std::cin input "message: 'Hello1'\n\n message: 'Hello2'\n\n"
+ std::streambuf* orig = std::cin.rdbuf();
+ std::istringstream ss("message: 'Hello1'\n\n message: 'Hello2'\n\n");
+ std::cin.rdbuf(ss.rdbuf());
+
+ FLAGS_batch = true;
+ EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
+ std::bind(PrintStream, &output_stream,
+ std::placeholders::_1)));
+ FLAGS_batch = false;
+
+ // Expected output: "message: "Hello0"\nmessage: "Hello1"\nmessage:
+ // "Hello2"\n"
+ EXPECT_TRUE(NULL != strstr(output_stream.str().c_str(),
+ "message: \"Hello0\"\nmessage: "
+ "\"Hello1\"\nmessage: \"Hello2\"\n"));
+ std::cin.rdbuf(orig);
+ ShutdownServer();
+}
+
+TEST_F(GrpcToolTest, CallCommandBatchWithBadRequest) {
+ // Test input "grpc_cli call Echo"
+ std::stringstream output_stream;
+
+ const grpc::string server_address = SetUpServer();
+ const char* argv[] = {"grpc_cli", "call", server_address.c_str(), "Echo",
+ "message: 'Hello0'"};
+
+ // Mock std::cin input "message: 1\n\n message: 'Hello2'\n\n"
+ std::streambuf* orig = std::cin.rdbuf();
+ std::istringstream ss("message: 1\n\n message: 'Hello2'\n\n");
+ std::cin.rdbuf(ss.rdbuf());
+
+ FLAGS_batch = true;
+ EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
+ std::bind(PrintStream, &output_stream,
+ std::placeholders::_1)));
+ FLAGS_batch = false;
+
+ // Expected output: "message: "Hello0"\nmessage: "Hello2"\n"
+ EXPECT_TRUE(NULL != strstr(output_stream.str().c_str(),
+ "message: \"Hello0\"\nmessage: \"Hello2\"\n"));
+ std::cin.rdbuf(orig);
+ ShutdownServer();
+}
+
TEST_F(GrpcToolTest, CallCommandRequestStream) {
// Test input: grpc_cli call localhost:<port> RequestStream "message:
// 'Hello0'"
diff --git a/third_party/bloaty b/third_party/bloaty
new file mode 160000
+Subproject 73594cde8c9a52a102c4341c244c833aa61b9c0
diff --git a/tools/buildgen/plugins/expand_filegroups.py b/tools/buildgen/plugins/expand_filegroups.py
index dc073d72b8..669704063e 100755
--- a/tools/buildgen/plugins/expand_filegroups.py
+++ b/tools/buildgen/plugins/expand_filegroups.py
@@ -146,7 +146,7 @@ def mako_plugin(dictionary):
lib[lst] = vals
lib['plugins'] = plugins
if lib.get('generate_plugin_registry', False):
- lib['src'].append('src/core/plugin_registry/%s_plugin_registry.c' %
+ lib['src'].append('src/core/plugin_registry/%s_plugin_registry.cc' %
lib['name'])
for lst in FILEGROUP_LISTS:
lib[lst] = uniquify(lib.get(lst, []))
diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py
index 74e5131852..81846818cb 100755
--- a/tools/codegen/core/gen_static_metadata.py
+++ b/tools/codegen/core/gen_static_metadata.py
@@ -306,7 +306,7 @@ else:
C = open(
os.path.join(
os.path.dirname(sys.argv[0]),
- '../../../src/core/lib/transport/static_metadata.c'), 'w')
+ '../../../src/core/lib/transport/static_metadata.cc'), 'w')
D = open(
os.path.join(
os.path.dirname(sys.argv[0]),
@@ -356,6 +356,10 @@ an explanation of what's going on.
print >> H, '#ifndef GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H'
print >> H, '#define GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H'
print >> H
+print >> H, '#ifdef __cplusplus'
+print >> H, 'extern "C" {'
+print >> H, '#endif'
+print >> H
print >> H, '#include "src/core/lib/transport/metadata.h"'
print >> H
@@ -591,6 +595,10 @@ print >> C, '};'
print >> H, '#define GRPC_MDELEM_ACCEPT_STREAM_ENCODING_FOR_ALGORITHMS(algs) (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[grpc_static_accept_stream_encoding_metadata[(algs)]], GRPC_MDELEM_STORAGE_STATIC))'
+print >> H, '#ifdef __cplusplus'
+print >> H, '}'
+print >> H, '#endif'
+
print >> H, '#endif /* GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H */'
H.close()
diff --git a/tools/codegen/core/gen_stats_data.py b/tools/codegen/core/gen_stats_data.py
index 10ad0cc831..072a677615 100755
--- a/tools/codegen/core/gen_stats_data.py
+++ b/tools/codegen/core/gen_stats_data.py
@@ -147,8 +147,7 @@ def gen_bucket_code(histogram):
shift_data = find_ideal_shift(code_bounds[first_nontrivial:], 256 * histogram.buckets)
#print first_nontrivial, shift_data, bounds
#if shift_data is not None: print [hex(x >> shift_data[0]) for x in code_bounds[first_nontrivial:]]
- code = '\n/* Automatically generated by tools/codegen/core/gen_stats_data.py */\n'
- code += 'value = GPR_CLAMP(value, 0, %d);\n' % histogram.max
+ code = 'value = GPR_CLAMP(value, 0, %d);\n' % histogram.max
map_table = gen_map_table(code_bounds[first_nontrivial:], shift_data)
if first_nontrivial is None:
code += ('GRPC_STATS_INC_HISTOGRAM((exec_ctx), GRPC_STATS_HISTOGRAM_%s, value);\n'
@@ -209,6 +208,10 @@ with open('src/core/lib/debug/stats_data.h', 'w') as H:
print >>H, "#include <inttypes.h>"
print >>H, "#include \"src/core/lib/iomgr/exec_ctx.h\""
print >>H
+ print >>H, "#ifdef __cplusplus"
+ print >>H, "extern \"C\" {"
+ print >>H, "#endif"
+ print >>H
for typename, instances in sorted(inst_map.items()):
print >>H, "typedef enum {"
@@ -254,9 +257,13 @@ with open('src/core/lib/debug/stats_data.h', 'w') as H:
print >>H, "extern void (*const grpc_stats_inc_histogram[%d])(grpc_exec_ctx *exec_ctx, int x);" % len(inst_map['Histogram'])
print >>H
+ print >>H, "#ifdef __cplusplus"
+ print >>H, "}"
+ print >>H, "#endif"
+ print >>H
print >>H, "#endif /* GRPC_CORE_LIB_DEBUG_STATS_DATA_H */"
-with open('src/core/lib/debug/stats_data.c', 'w') as C:
+with open('src/core/lib/debug/stats_data.cc', 'w') as C:
# copy-paste copyright notice from this file
with open(sys.argv[0]) as my_source:
copyright = []
@@ -408,3 +415,4 @@ with open('src/core/lib/debug/stats_data_bq_schema.sql', 'w') as S:
for counter in inst_map['Counter']:
columns.append(('%s_per_iteration' % counter.name, 'FLOAT'))
print >>S, ',\n'.join('%s:%s' % x for x in columns)
+
diff --git a/tools/debug/core/chttp2_ref_leak.py b/tools/debug/core/chttp2_ref_leak.py
new file mode 100755
index 0000000000..d693dd9e54
--- /dev/null
+++ b/tools/debug/core/chttp2_ref_leak.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env python2.7
+# 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.
+
+# Reads stdin to find chttp2_refcount log lines, and prints reference leaks
+# to stdout
+
+import collections
+import sys
+import re
+
+def new_obj():
+ return ['destroy']
+
+outstanding = collections.defaultdict(new_obj)
+
+# Sample log line:
+# chttp2:unref:0x629000005200 2->1 destroy [src/core/ext/transport/chttp2/transport/chttp2_transport.c:599]
+
+for line in sys.stdin:
+ m = re.search(r'chttp2:( ref|unref):0x([a-fA-F0-9]+) [^ ]+ ([^[]+) \[(.*)\]', line)
+ if m:
+ if m.group(1) == ' ref':
+ outstanding[m.group(2)].append(m.group(3))
+ else:
+ outstanding[m.group(2)].remove(m.group(3))
+
+for obj, remaining in outstanding.items():
+ if remaining:
+ print 'LEAKED: %s %r' % (obj, remaining)
+
diff --git a/tools/distrib/build_ruby_environment_macos.sh b/tools/distrib/build_ruby_environment_macos.sh
index c2240ce976..fe0c5a4d70 100644
--- a/tools/distrib/build_ruby_environment_macos.sh
+++ b/tools/distrib/build_ruby_environment_macos.sh
@@ -21,9 +21,10 @@ CROSS_RUBY=`mktemp tmpfile.XXXXXXXX`
curl https://raw.githubusercontent.com/rake-compiler/rake-compiler/v1.0.3/tasks/bin/cross-ruby.rake > $CROSS_RUBY
+# See https://github.com/grpc/grpc/issues/12161 for verconf.h patch details
patch $CROSS_RUBY << EOF
---- cross-ruby.rake 2016-02-05 16:26:53.000000000 -0800
-+++ cross-ruby.rake.patched 2016-02-05 16:27:33.000000000 -0800
+--- cross-ruby.rake 2017-09-27 16:46:00.311020325 +0200
++++ patched 2017-09-27 16:49:46.127016895 +0200
@@ -133,7 +133,8 @@
"--host=#{MINGW_HOST}",
"--target=#{MINGW_TARGET}",
@@ -32,8 +33,16 @@ patch $CROSS_RUBY << EOF
+ '--enable-static',
+ '--disable-shared',
'--disable-install-doc',
- '--without-tk',
- '--without-tcl'
+ '--with-ext='
+ ]
+@@ -151,6 +152,7 @@
+ # make
+ file "#{USER_HOME}/builds/#{MINGW_HOST}/#{RUBY_CC_VERSION}/ruby.exe" => ["#{USER_HOME}/builds/#{MINGW_HOST}/#{RUBY_CC_VERSION}/Makefile"] do |t|
+ chdir File.dirname(t.prerequisites.first) do
++ sh "test -s verconf.h || rm -f verconf.h" # if verconf.h has size 0, make sure it gets re-built by make
+ sh MAKE
+ end
+ end
EOF
MAKE="make -j8"
diff --git a/tools/distrib/pull_requests_interval.sh b/tools/distrib/pull_requests_interval.sh
new file mode 100755
index 0000000000..7a6c702daa
--- /dev/null
+++ b/tools/distrib/pull_requests_interval.sh
@@ -0,0 +1,80 @@
+#!/bin/bash
+# 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.
+
+if [ "x$1" = "x" ] ; then
+ echo "Usage: $0 <first ref> [second ref]"
+ exit 1
+else
+ first=$1
+fi
+
+if [ -n $2 ] ; then
+ second=HEAD
+fi
+
+if [ -e ~/github-credentials.vars ] ; then
+ . ~/github-credentials.vars
+fi
+
+if [ "x$github_client_id" = "x" ] || [ "x$github_client_secret" = "x" ] ; then
+ echo "Warning: you don't have github credentials set."
+ echo
+ echo "You may end up exceeding guest quota quickly."
+ echo "You can create an application for yourself,"
+ echo "and get its credentials. Go to"
+ echo
+ echo " https://github.com/settings/developers"
+ echo
+ echo "and click 'Register a new application'."
+ echo
+ echo "From the application's information, copy/paste"
+ echo "its Client ID and Client Secret, into the file"
+ echo
+ echo " ~/github-credentials.vars"
+ echo
+ echo "with the following format:"
+ echo
+ echo "github_client_id=0123456789abcdef0123"
+ echo "github_client_secret=0123456789abcdef0123456789abcdef"
+ echo
+ echo
+ addendum=""
+else
+ addendum="?client_id=$github_client_id&client_secret=$github_client_secret"
+fi
+
+unset notfirst
+echo "["
+git log --pretty=oneline $1..$2 |
+ grep '[^ ]\+ Merge pull request #[0-9]\{4,6\} ' |
+ cut -f 2 -d# |
+ cut -f 1 -d\ |
+ sort -u |
+ while read id ; do
+ if [ "x$notfirst" = "x" ] ; then
+ notfirst=true
+ else
+ echo ","
+ fi
+ echo -n " {\"url\": \"https://github.com/grpc/grpc/pull/$id\","
+ out=`mktemp`
+ curl -s "https://api.github.com/repos/grpc/grpc/pulls/$id$addendum" > $out
+ echo -n " "`grep '"title"' $out`
+ echo -n " "`grep '"login"' $out | head -1`
+ echo -n " \"pr\": $id }"
+ rm $out
+ done
+echo
+echo "]"
diff --git a/tools/distrib/pylint_code.sh b/tools/distrib/pylint_code.sh
index 3c9235b548..7175f1e15b 100755
--- a/tools/distrib/pylint_code.sh
+++ b/tools/distrib/pylint_code.sh
@@ -29,7 +29,7 @@ VIRTUALENV=python_pylint_venv
virtualenv $VIRTUALENV
PYTHON=$(realpath $VIRTUALENV/bin/python)
-$PYTHON -m pip install --upgrade pip
+$PYTHON -m pip install --upgrade pip==9.0.1
$PYTHON -m pip install pylint==1.6.5
for dir in "${DIRS[@]}"; do
diff --git a/tools/distrib/python/docgen.py b/tools/distrib/python/docgen.py
index 6f6d43c7d9..1822e51d09 100755
--- a/tools/distrib/python/docgen.py
+++ b/tools/distrib/python/docgen.py
@@ -60,7 +60,7 @@ environment.update({
subprocess_arguments_list = [
{'args': ['virtualenv', VIRTUALENV_DIR], 'env': environment},
- {'args': [VIRTUALENV_PIP_PATH, 'install', '--upgrade', 'pip'],
+ {'args': [VIRTUALENV_PIP_PATH, 'install', '--upgrade', 'pip==9.0.1'],
'env': environment},
{'args': [VIRTUALENV_PIP_PATH, 'install', '-r', REQUIREMENTS_PATH],
'env': environment},
diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py
index a4178a58c1..db92b10c60 100644
--- a/tools/distrib/python/grpcio_tools/grpc_version.py
+++ b/tools/distrib/python/grpcio_tools/grpc_version.py
@@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!!
-VERSION='1.7.0.dev0'
+VERSION='1.8.0.dev0'
diff --git a/tools/distrib/yapf_code.sh b/tools/distrib/yapf_code.sh
index dbb6b5c41f..e5beb70117 100755
--- a/tools/distrib/yapf_code.sh
+++ b/tools/distrib/yapf_code.sh
@@ -33,7 +33,7 @@ VIRTUALENV=yapf_virtual_environment
virtualenv $VIRTUALENV
PYTHON=$(realpath "${VIRTUALENV}/bin/python")
-$PYTHON -m pip install --upgrade pip
+$PYTHON -m pip install --upgrade pip==9.0.1
$PYTHON -m pip install --upgrade futures
$PYTHON -m pip install yapf==0.16.0
diff --git a/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile
index dbf58023c5..ea82476b65 100644
--- a/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile
+++ b/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile
@@ -60,7 +60,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/Dockerfile
index 4ccfbc43c3..56b8be89ec 100644
--- a/tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/Dockerfile
+++ b/tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/Dockerfile
@@ -59,7 +59,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0
diff --git a/tools/dockerfile/interoptest/grpc_interop_cxx/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_cxx/Dockerfile
index 7cfe98cbc8..38d377ce2f 100644
--- a/tools/dockerfile/interoptest/grpc_interop_cxx/Dockerfile
+++ b/tools/dockerfile/interoptest/grpc_interop_cxx/Dockerfile
@@ -60,7 +60,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile
index febe2fa251..73c41a4838 100644
--- a/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile
+++ b/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile
@@ -28,7 +28,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/interoptest/grpc_interop_go1.7/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_go1.7/Dockerfile
index 3a516cbb62..7c083de365 100644
--- a/tools/dockerfile/interoptest/grpc_interop_go1.7/Dockerfile
+++ b/tools/dockerfile/interoptest/grpc_interop_go1.7/Dockerfile
@@ -28,7 +28,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/interoptest/grpc_interop_go1.8/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_go1.8/Dockerfile
index acb640a81d..61efc18df9 100644
--- a/tools/dockerfile/interoptest/grpc_interop_go1.8/Dockerfile
+++ b/tools/dockerfile/interoptest/grpc_interop_go1.8/Dockerfile
@@ -28,7 +28,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/interoptest/grpc_interop_http2/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_http2/Dockerfile
index 354b7bfdb5..278b09a666 100644
--- a/tools/dockerfile/interoptest/grpc_interop_http2/Dockerfile
+++ b/tools/dockerfile/interoptest/grpc_interop_http2/Dockerfile
@@ -28,7 +28,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile
index 92a542ff76..d56632440f 100644
--- a/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile
+++ b/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile
@@ -43,7 +43,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile
index 92a542ff76..d56632440f 100644
--- a/tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile
+++ b/tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile
@@ -43,7 +43,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile
index 4343d56cb4..f4c3e4103e 100644
--- a/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile
+++ b/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile
@@ -60,7 +60,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile
index 271c6e75e9..d165307031 100644
--- a/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile
+++ b/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile
@@ -60,7 +60,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile
index 7bcada68e0..2217b10b8b 100644
--- a/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile
+++ b/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile
@@ -60,7 +60,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/test/csharp_jessie_x64/Dockerfile b/tools/dockerfile/test/csharp_jessie_x64/Dockerfile
index 40d46fcf58..3e31e67f5f 100644
--- a/tools/dockerfile/test/csharp_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/csharp_jessie_x64/Dockerfile
@@ -64,7 +64,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/test/cxx_alpine_x64/Dockerfile b/tools/dockerfile/test/cxx_alpine_x64/Dockerfile
index 1ae50c106f..af5e7d6f14 100644
--- a/tools/dockerfile/test/cxx_alpine_x64/Dockerfile
+++ b/tools/dockerfile/test/cxx_alpine_x64/Dockerfile
@@ -36,7 +36,7 @@ RUN apk update && apk add \
zip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0
diff --git a/tools/dockerfile/test/cxx_jessie_x64/Dockerfile b/tools/dockerfile/test/cxx_jessie_x64/Dockerfile
index 888a37baca..3492dd72c5 100644
--- a/tools/dockerfile/test/cxx_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/cxx_jessie_x64/Dockerfile
@@ -64,7 +64,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/test/cxx_jessie_x86/Dockerfile b/tools/dockerfile/test/cxx_jessie_x86/Dockerfile
index 319f1e1889..f8cbf35d39 100644
--- a/tools/dockerfile/test/cxx_jessie_x86/Dockerfile
+++ b/tools/dockerfile/test/cxx_jessie_x86/Dockerfile
@@ -64,7 +64,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile b/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile
index 61f005d9da..6966d6b8d3 100644
--- a/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile
+++ b/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile
@@ -64,7 +64,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile b/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile
index f35247eccb..016034aa50 100644
--- a/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile
+++ b/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile
@@ -64,7 +64,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/test/fuzzer/Dockerfile b/tools/dockerfile/test/fuzzer/Dockerfile
index ce1badfeb1..50104ad7ae 100644
--- a/tools/dockerfile/test/fuzzer/Dockerfile
+++ b/tools/dockerfile/test/fuzzer/Dockerfile
@@ -64,7 +64,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/test/multilang_jessie_x64/Dockerfile b/tools/dockerfile/test/multilang_jessie_x64/Dockerfile
index 59fe4d8f93..8e29fcb88c 100644
--- a/tools/dockerfile/test/multilang_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/multilang_jessie_x64/Dockerfile
@@ -71,6 +71,24 @@ RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y \
RUN nuget update -self
+# Install dotnet SDK based on https://www.microsoft.com/net/core#debian
+RUN apt-get update && apt-get install -y curl libunwind8 gettext
+# dotnet-dev-1.0.0-preview2-003131
+RUN curl -sSL -o dotnet100.tar.gz https://go.microsoft.com/fwlink/?LinkID=827530
+RUN mkdir -p /opt/dotnet && tar zxf dotnet100.tar.gz -C /opt/dotnet
+# dotnet-dev-1.0.1
+RUN curl -sSL -o dotnet101.tar.gz https://go.microsoft.com/fwlink/?LinkID=843453
+RUN mkdir -p /opt/dotnet && tar zxf dotnet101.tar.gz -C /opt/dotnet
+RUN ln -s /opt/dotnet/dotnet /usr/local/bin
+
+# Trigger the population of the local package cache
+ENV NUGET_XMLDOC_MODE skip
+RUN mkdir warmup \
+ && cd warmup \
+ && dotnet new \
+ && cd .. \
+ && rm -rf warmup
+
#=================
# C++ dependencies
RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean
@@ -121,7 +139,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/test/node_jessie_x64/Dockerfile b/tools/dockerfile/test/node_jessie_x64/Dockerfile
index 103be8412b..d0e5af64cc 100644
--- a/tools/dockerfile/test/node_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/node_jessie_x64/Dockerfile
@@ -75,7 +75,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
@@ -102,5 +102,8 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
RUN mkdir /var/local/jenkins
+# Install Mako to generate files in grpc/grpc-node
+RUN pip install Mako
+
# Define the default command.
CMD ["bash"]
diff --git a/tools/dockerfile/test/php7_jessie_x64/Dockerfile b/tools/dockerfile/test/php7_jessie_x64/Dockerfile
index f6d426bcd6..1399502840 100644
--- a/tools/dockerfile/test/php7_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/php7_jessie_x64/Dockerfile
@@ -75,7 +75,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/test/php_jessie_x64/Dockerfile b/tools/dockerfile/test/php_jessie_x64/Dockerfile
index ae82a8d99f..56dc6045e1 100644
--- a/tools/dockerfile/test/php_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/php_jessie_x64/Dockerfile
@@ -64,7 +64,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/test/python_alpine_x64/Dockerfile b/tools/dockerfile/test/python_alpine_x64/Dockerfile
index 7bd11d7407..7584ab8767 100644
--- a/tools/dockerfile/test/python_alpine_x64/Dockerfile
+++ b/tools/dockerfile/test/python_alpine_x64/Dockerfile
@@ -36,7 +36,7 @@ RUN apk update && apk add \
zip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0
diff --git a/tools/dockerfile/test/python_jessie_x64/Dockerfile b/tools/dockerfile/test/python_jessie_x64/Dockerfile
index d5d781cd1a..8d89f5022f 100644
--- a/tools/dockerfile/test/python_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/python_jessie_x64/Dockerfile
@@ -64,7 +64,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/test/python_pyenv_x64/Dockerfile b/tools/dockerfile/test/python_pyenv_x64/Dockerfile
index 3b4ad12b6d..f8cbdc5726 100644
--- a/tools/dockerfile/test/python_pyenv_x64/Dockerfile
+++ b/tools/dockerfile/test/python_pyenv_x64/Dockerfile
@@ -64,7 +64,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/test/ruby_jessie_x64/Dockerfile b/tools/dockerfile/test/ruby_jessie_x64/Dockerfile
index 3d879bb0c9..5d7f80bf88 100644
--- a/tools/dockerfile/test/ruby_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/ruby_jessie_x64/Dockerfile
@@ -64,7 +64,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/dockerfile/test/sanity/Dockerfile b/tools/dockerfile/test/sanity/Dockerfile
index dff979dc37..487ce15e2e 100644
--- a/tools/dockerfile/test/sanity/Dockerfile
+++ b/tools/dockerfile/test/sanity/Dockerfile
@@ -64,7 +64,7 @@ RUN apt-get update && apt-get install -y \
python-pip
# Install Python packages from PyPI
-RUN pip install pip --upgrade
+RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0
diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++
index d81b7b4d11..eb27eed075 100644
--- a/tools/doxygen/Doxyfile.c++
+++ b/tools/doxygen/Doxyfile.c++
@@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = 1.7.0-dev
+PROJECT_NUMBER = 1.8.0-dev
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal
index 63a3a38bfc..0014cf508a 100644
--- a/tools/doxygen/Doxyfile.c++.internal
+++ b/tools/doxygen/Doxyfile.c++.internal
@@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = 1.7.0-dev
+PROJECT_NUMBER = 1.8.0-dev
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -933,6 +933,7 @@ include/grpc/support/tls_pthread.h \
include/grpc/support/useful.h \
include/grpc/support/workaround_list.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 \
@@ -953,6 +954,7 @@ src/core/lib/debug/trace.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 \
@@ -1029,8 +1031,6 @@ src/core/lib/support/arena.h \
src/core/lib/support/atomic.h \
src/core/lib/support/atomic_with_atm.h \
src/core/lib/support/atomic_with_std.h \
-src/core/lib/support/backoff.h \
-src/core/lib/support/block_annotate.h \
src/core/lib/support/env.h \
src/core/lib/support/memory.h \
src/core/lib/support/mpscq.h \
diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal
index e96df5e2ff..2c54eacd49 100644
--- a/tools/doxygen/Doxyfile.core.internal
+++ b/tools/doxygen/Doxyfile.core.internal
@@ -872,567 +872,567 @@ src/core/README.md \
src/core/ext/README.md \
src/core/ext/census/README.md \
src/core/ext/census/aggregation.h \
-src/core/ext/census/base_resources.c \
+src/core/ext/census/base_resources.cc \
src/core/ext/census/base_resources.h \
src/core/ext/census/census_interface.h \
src/core/ext/census/census_rpc_stats.h \
-src/core/ext/census/context.c \
+src/core/ext/census/context.cc \
src/core/ext/census/gen/README.md \
src/core/ext/census/gen/census.pb.c \
src/core/ext/census/gen/census.pb.h \
src/core/ext/census/gen/trace_context.pb.c \
src/core/ext/census/gen/trace_context.pb.h \
-src/core/ext/census/grpc_context.c \
-src/core/ext/census/grpc_filter.c \
+src/core/ext/census/grpc_context.cc \
+src/core/ext/census/grpc_filter.cc \
src/core/ext/census/grpc_filter.h \
-src/core/ext/census/grpc_plugin.c \
-src/core/ext/census/initialize.c \
-src/core/ext/census/intrusive_hash_map.c \
+src/core/ext/census/grpc_plugin.cc \
+src/core/ext/census/initialize.cc \
+src/core/ext/census/intrusive_hash_map.cc \
src/core/ext/census/intrusive_hash_map.h \
src/core/ext/census/intrusive_hash_map_internal.h \
-src/core/ext/census/mlog.c \
+src/core/ext/census/mlog.cc \
src/core/ext/census/mlog.h \
-src/core/ext/census/operation.c \
-src/core/ext/census/placeholders.c \
-src/core/ext/census/resource.c \
+src/core/ext/census/operation.cc \
+src/core/ext/census/placeholders.cc \
+src/core/ext/census/resource.cc \
src/core/ext/census/resource.h \
src/core/ext/census/rpc_metric_id.h \
-src/core/ext/census/trace_context.c \
+src/core/ext/census/trace_context.cc \
src/core/ext/census/trace_context.h \
src/core/ext/census/trace_label.h \
src/core/ext/census/trace_propagation.h \
src/core/ext/census/trace_status.h \
src/core/ext/census/trace_string.h \
-src/core/ext/census/tracing.c \
+src/core/ext/census/tracing.cc \
src/core/ext/census/tracing.h \
src/core/ext/filters/client_channel/README.md \
-src/core/ext/filters/client_channel/channel_connectivity.c \
-src/core/ext/filters/client_channel/client_channel.c \
+src/core/ext/filters/client_channel/channel_connectivity.cc \
+src/core/ext/filters/client_channel/client_channel.cc \
src/core/ext/filters/client_channel/client_channel.h \
-src/core/ext/filters/client_channel/client_channel_factory.c \
+src/core/ext/filters/client_channel/client_channel_factory.cc \
src/core/ext/filters/client_channel/client_channel_factory.h \
-src/core/ext/filters/client_channel/client_channel_plugin.c \
-src/core/ext/filters/client_channel/connector.c \
+src/core/ext/filters/client_channel/client_channel_plugin.cc \
+src/core/ext/filters/client_channel/connector.cc \
src/core/ext/filters/client_channel/connector.h \
-src/core/ext/filters/client_channel/http_connect_handshaker.c \
+src/core/ext/filters/client_channel/http_connect_handshaker.cc \
src/core/ext/filters/client_channel/http_connect_handshaker.h \
-src/core/ext/filters/client_channel/http_proxy.c \
+src/core/ext/filters/client_channel/http_proxy.cc \
src/core/ext/filters/client_channel/http_proxy.h \
-src/core/ext/filters/client_channel/lb_policy.c \
+src/core/ext/filters/client_channel/lb_policy.cc \
src/core/ext/filters/client_channel/lb_policy.h \
-src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c \
+src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc \
src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h \
-src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c \
+src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc \
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_channel_secure.c \
-src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c \
+src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc \
+src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc \
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.c \
+src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc \
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.c \
src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h \
-src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c \
-src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c \
-src/core/ext/filters/client_channel/lb_policy_factory.c \
+src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc \
+src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc \
+src/core/ext/filters/client_channel/lb_policy_factory.cc \
src/core/ext/filters/client_channel/lb_policy_factory.h \
-src/core/ext/filters/client_channel/lb_policy_registry.c \
+src/core/ext/filters/client_channel/lb_policy_registry.cc \
src/core/ext/filters/client_channel/lb_policy_registry.h \
-src/core/ext/filters/client_channel/parse_address.c \
+src/core/ext/filters/client_channel/parse_address.cc \
src/core/ext/filters/client_channel/parse_address.h \
-src/core/ext/filters/client_channel/proxy_mapper.c \
+src/core/ext/filters/client_channel/proxy_mapper.cc \
src/core/ext/filters/client_channel/proxy_mapper.h \
-src/core/ext/filters/client_channel/proxy_mapper_registry.c \
+src/core/ext/filters/client_channel/proxy_mapper_registry.cc \
src/core/ext/filters/client_channel/proxy_mapper_registry.h \
-src/core/ext/filters/client_channel/resolver.c \
+src/core/ext/filters/client_channel/resolver.cc \
src/core/ext/filters/client_channel/resolver.h \
src/core/ext/filters/client_channel/resolver/README.md \
-src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c \
+src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \
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_ev_driver_posix.c \
-src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c \
+src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc \
+src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc \
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h \
-src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c \
+src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc \
src/core/ext/filters/client_channel/resolver/dns/native/README.md \
-src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c \
-src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c \
+src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc \
+src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc \
src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h \
src/core/ext/filters/client_channel/resolver/sockaddr/README.md \
-src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c \
-src/core/ext/filters/client_channel/resolver_factory.c \
+src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc \
+src/core/ext/filters/client_channel/resolver_factory.cc \
src/core/ext/filters/client_channel/resolver_factory.h \
-src/core/ext/filters/client_channel/resolver_registry.c \
+src/core/ext/filters/client_channel/resolver_registry.cc \
src/core/ext/filters/client_channel/resolver_registry.h \
-src/core/ext/filters/client_channel/retry_throttle.c \
+src/core/ext/filters/client_channel/retry_throttle.cc \
src/core/ext/filters/client_channel/retry_throttle.h \
-src/core/ext/filters/client_channel/subchannel.c \
+src/core/ext/filters/client_channel/subchannel.cc \
src/core/ext/filters/client_channel/subchannel.h \
-src/core/ext/filters/client_channel/subchannel_index.c \
+src/core/ext/filters/client_channel/subchannel_index.cc \
src/core/ext/filters/client_channel/subchannel_index.h \
-src/core/ext/filters/client_channel/uri_parser.c \
+src/core/ext/filters/client_channel/uri_parser.cc \
src/core/ext/filters/client_channel/uri_parser.h \
-src/core/ext/filters/deadline/deadline_filter.c \
+src/core/ext/filters/deadline/deadline_filter.cc \
src/core/ext/filters/deadline/deadline_filter.h \
-src/core/ext/filters/http/client/http_client_filter.c \
+src/core/ext/filters/http/client/http_client_filter.cc \
src/core/ext/filters/http/client/http_client_filter.h \
-src/core/ext/filters/http/http_filters_plugin.c \
-src/core/ext/filters/http/message_compress/message_compress_filter.c \
+src/core/ext/filters/http/http_filters_plugin.cc \
+src/core/ext/filters/http/message_compress/message_compress_filter.cc \
src/core/ext/filters/http/message_compress/message_compress_filter.h \
-src/core/ext/filters/http/server/http_server_filter.c \
+src/core/ext/filters/http/server/http_server_filter.cc \
src/core/ext/filters/http/server/http_server_filter.h \
-src/core/ext/filters/load_reporting/server_load_reporting_filter.c \
+src/core/ext/filters/load_reporting/server_load_reporting_filter.cc \
src/core/ext/filters/load_reporting/server_load_reporting_filter.h \
-src/core/ext/filters/load_reporting/server_load_reporting_plugin.c \
+src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc \
src/core/ext/filters/load_reporting/server_load_reporting_plugin.h \
-src/core/ext/filters/max_age/max_age_filter.c \
+src/core/ext/filters/max_age/max_age_filter.cc \
src/core/ext/filters/max_age/max_age_filter.h \
-src/core/ext/filters/message_size/message_size_filter.c \
+src/core/ext/filters/message_size/message_size_filter.cc \
src/core/ext/filters/message_size/message_size_filter.h \
-src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c \
+src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc \
src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h \
-src/core/ext/filters/workarounds/workaround_utils.c \
+src/core/ext/filters/workarounds/workaround_utils.cc \
src/core/ext/filters/workarounds/workaround_utils.h \
src/core/ext/transport/README.md \
src/core/ext/transport/chttp2/README.md \
-src/core/ext/transport/chttp2/alpn/alpn.c \
+src/core/ext/transport/chttp2/alpn/alpn.cc \
src/core/ext/transport/chttp2/alpn/alpn.h \
-src/core/ext/transport/chttp2/client/chttp2_connector.c \
+src/core/ext/transport/chttp2/client/chttp2_connector.cc \
src/core/ext/transport/chttp2/client/chttp2_connector.h \
src/core/ext/transport/chttp2/client/insecure/README.md \
-src/core/ext/transport/chttp2/client/insecure/channel_create.c \
-src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \
+src/core/ext/transport/chttp2/client/insecure/channel_create.cc \
+src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc \
src/core/ext/transport/chttp2/client/secure/README.md \
-src/core/ext/transport/chttp2/client/secure/secure_channel_create.c \
-src/core/ext/transport/chttp2/server/chttp2_server.c \
+src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc \
+src/core/ext/transport/chttp2/server/chttp2_server.cc \
src/core/ext/transport/chttp2/server/chttp2_server.h \
src/core/ext/transport/chttp2/server/insecure/README.md \
-src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \
-src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \
+src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc \
+src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc \
src/core/ext/transport/chttp2/server/secure/README.md \
-src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c \
+src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc \
src/core/ext/transport/chttp2/transport/README.md \
-src/core/ext/transport/chttp2/transport/bin_decoder.c \
+src/core/ext/transport/chttp2/transport/bin_decoder.cc \
src/core/ext/transport/chttp2/transport/bin_decoder.h \
-src/core/ext/transport/chttp2/transport/bin_encoder.c \
+src/core/ext/transport/chttp2/transport/bin_encoder.cc \
src/core/ext/transport/chttp2/transport/bin_encoder.h \
-src/core/ext/transport/chttp2/transport/chttp2_plugin.c \
-src/core/ext/transport/chttp2/transport/chttp2_transport.c \
+src/core/ext/transport/chttp2/transport/chttp2_plugin.cc \
+src/core/ext/transport/chttp2/transport/chttp2_transport.cc \
src/core/ext/transport/chttp2/transport/chttp2_transport.h \
-src/core/ext/transport/chttp2/transport/flow_control.c \
+src/core/ext/transport/chttp2/transport/flow_control.cc \
src/core/ext/transport/chttp2/transport/frame.h \
-src/core/ext/transport/chttp2/transport/frame_data.c \
+src/core/ext/transport/chttp2/transport/frame_data.cc \
src/core/ext/transport/chttp2/transport/frame_data.h \
-src/core/ext/transport/chttp2/transport/frame_goaway.c \
+src/core/ext/transport/chttp2/transport/frame_goaway.cc \
src/core/ext/transport/chttp2/transport/frame_goaway.h \
-src/core/ext/transport/chttp2/transport/frame_ping.c \
+src/core/ext/transport/chttp2/transport/frame_ping.cc \
src/core/ext/transport/chttp2/transport/frame_ping.h \
-src/core/ext/transport/chttp2/transport/frame_rst_stream.c \
+src/core/ext/transport/chttp2/transport/frame_rst_stream.cc \
src/core/ext/transport/chttp2/transport/frame_rst_stream.h \
-src/core/ext/transport/chttp2/transport/frame_settings.c \
+src/core/ext/transport/chttp2/transport/frame_settings.cc \
src/core/ext/transport/chttp2/transport/frame_settings.h \
-src/core/ext/transport/chttp2/transport/frame_window_update.c \
+src/core/ext/transport/chttp2/transport/frame_window_update.cc \
src/core/ext/transport/chttp2/transport/frame_window_update.h \
-src/core/ext/transport/chttp2/transport/hpack_encoder.c \
+src/core/ext/transport/chttp2/transport/hpack_encoder.cc \
src/core/ext/transport/chttp2/transport/hpack_encoder.h \
-src/core/ext/transport/chttp2/transport/hpack_parser.c \
+src/core/ext/transport/chttp2/transport/hpack_parser.cc \
src/core/ext/transport/chttp2/transport/hpack_parser.h \
-src/core/ext/transport/chttp2/transport/hpack_table.c \
+src/core/ext/transport/chttp2/transport/hpack_table.cc \
src/core/ext/transport/chttp2/transport/hpack_table.h \
-src/core/ext/transport/chttp2/transport/http2_settings.c \
+src/core/ext/transport/chttp2/transport/http2_settings.cc \
src/core/ext/transport/chttp2/transport/http2_settings.h \
-src/core/ext/transport/chttp2/transport/huffsyms.c \
+src/core/ext/transport/chttp2/transport/huffsyms.cc \
src/core/ext/transport/chttp2/transport/huffsyms.h \
-src/core/ext/transport/chttp2/transport/incoming_metadata.c \
+src/core/ext/transport/chttp2/transport/incoming_metadata.cc \
src/core/ext/transport/chttp2/transport/incoming_metadata.h \
src/core/ext/transport/chttp2/transport/internal.h \
-src/core/ext/transport/chttp2/transport/parsing.c \
-src/core/ext/transport/chttp2/transport/stream_lists.c \
-src/core/ext/transport/chttp2/transport/stream_map.c \
+src/core/ext/transport/chttp2/transport/parsing.cc \
+src/core/ext/transport/chttp2/transport/stream_lists.cc \
+src/core/ext/transport/chttp2/transport/stream_map.cc \
src/core/ext/transport/chttp2/transport/stream_map.h \
-src/core/ext/transport/chttp2/transport/varint.c \
+src/core/ext/transport/chttp2/transport/varint.cc \
src/core/ext/transport/chttp2/transport/varint.h \
-src/core/ext/transport/chttp2/transport/writing.c \
-src/core/ext/transport/inproc/inproc_plugin.c \
-src/core/ext/transport/inproc/inproc_transport.c \
+src/core/ext/transport/chttp2/transport/writing.cc \
+src/core/ext/transport/inproc/inproc_plugin.cc \
+src/core/ext/transport/inproc/inproc_transport.cc \
src/core/ext/transport/inproc/inproc_transport.h \
src/core/lib/README.md \
+src/core/lib/backoff/backoff.cc \
+src/core/lib/backoff/backoff.h \
src/core/lib/channel/README.md \
-src/core/lib/channel/channel_args.c \
+src/core/lib/channel/channel_args.cc \
src/core/lib/channel/channel_args.h \
-src/core/lib/channel/channel_stack.c \
+src/core/lib/channel/channel_stack.cc \
src/core/lib/channel/channel_stack.h \
-src/core/lib/channel/channel_stack_builder.c \
+src/core/lib/channel/channel_stack_builder.cc \
src/core/lib/channel/channel_stack_builder.h \
-src/core/lib/channel/connected_channel.c \
+src/core/lib/channel/connected_channel.cc \
src/core/lib/channel/connected_channel.h \
src/core/lib/channel/context.h \
-src/core/lib/channel/handshaker.c \
+src/core/lib/channel/handshaker.cc \
src/core/lib/channel/handshaker.h \
-src/core/lib/channel/handshaker_factory.c \
+src/core/lib/channel/handshaker_factory.cc \
src/core/lib/channel/handshaker_factory.h \
-src/core/lib/channel/handshaker_registry.c \
+src/core/lib/channel/handshaker_registry.cc \
src/core/lib/channel/handshaker_registry.h \
src/core/lib/compression/algorithm_metadata.h \
-src/core/lib/compression/compression.c \
-src/core/lib/compression/compression_internal.c \
+src/core/lib/compression/compression.cc \
+src/core/lib/compression/compression_internal.cc \
src/core/lib/compression/compression_internal.h \
-src/core/lib/compression/message_compress.c \
+src/core/lib/compression/message_compress.cc \
src/core/lib/compression/message_compress.h \
-src/core/lib/compression/stream_compression.c \
+src/core/lib/compression/stream_compression.cc \
src/core/lib/compression/stream_compression.h \
-src/core/lib/compression/stream_compression_gzip.c \
+src/core/lib/compression/stream_compression_gzip.cc \
src/core/lib/compression/stream_compression_gzip.h \
-src/core/lib/compression/stream_compression_identity.c \
+src/core/lib/compression/stream_compression_identity.cc \
src/core/lib/compression/stream_compression_identity.h \
-src/core/lib/debug/stats.c \
+src/core/lib/debug/stats.cc \
src/core/lib/debug/stats.h \
-src/core/lib/debug/stats_data.c \
+src/core/lib/debug/stats_data.cc \
src/core/lib/debug/stats_data.h \
-src/core/lib/debug/trace.c \
+src/core/lib/debug/trace.cc \
src/core/lib/debug/trace.h \
-src/core/lib/http/format_request.c \
+src/core/lib/http/format_request.cc \
src/core/lib/http/format_request.h \
-src/core/lib/http/httpcli.c \
+src/core/lib/http/httpcli.cc \
src/core/lib/http/httpcli.h \
-src/core/lib/http/httpcli_security_connector.c \
-src/core/lib/http/parser.c \
+src/core/lib/http/httpcli_security_connector.cc \
+src/core/lib/http/parser.cc \
src/core/lib/http/parser.h \
src/core/lib/iomgr/README.md \
-src/core/lib/iomgr/call_combiner.c \
+src/core/lib/iomgr/block_annotate.h \
+src/core/lib/iomgr/call_combiner.cc \
src/core/lib/iomgr/call_combiner.h \
-src/core/lib/iomgr/closure.c \
+src/core/lib/iomgr/closure.cc \
src/core/lib/iomgr/closure.h \
-src/core/lib/iomgr/combiner.c \
+src/core/lib/iomgr/combiner.cc \
src/core/lib/iomgr/combiner.h \
-src/core/lib/iomgr/endpoint.c \
+src/core/lib/iomgr/endpoint.cc \
src/core/lib/iomgr/endpoint.h \
src/core/lib/iomgr/endpoint_pair.h \
-src/core/lib/iomgr/endpoint_pair_posix.c \
-src/core/lib/iomgr/endpoint_pair_uv.c \
-src/core/lib/iomgr/endpoint_pair_windows.c \
-src/core/lib/iomgr/error.c \
+src/core/lib/iomgr/endpoint_pair_posix.cc \
+src/core/lib/iomgr/endpoint_pair_uv.cc \
+src/core/lib/iomgr/endpoint_pair_windows.cc \
+src/core/lib/iomgr/error.cc \
src/core/lib/iomgr/error.h \
src/core/lib/iomgr/error_internal.h \
-src/core/lib/iomgr/ev_epoll1_linux.c \
+src/core/lib/iomgr/ev_epoll1_linux.cc \
src/core/lib/iomgr/ev_epoll1_linux.h \
-src/core/lib/iomgr/ev_epollex_linux.c \
+src/core/lib/iomgr/ev_epollex_linux.cc \
src/core/lib/iomgr/ev_epollex_linux.h \
-src/core/lib/iomgr/ev_epollsig_linux.c \
+src/core/lib/iomgr/ev_epollsig_linux.cc \
src/core/lib/iomgr/ev_epollsig_linux.h \
-src/core/lib/iomgr/ev_poll_posix.c \
+src/core/lib/iomgr/ev_poll_posix.cc \
src/core/lib/iomgr/ev_poll_posix.h \
-src/core/lib/iomgr/ev_posix.c \
+src/core/lib/iomgr/ev_posix.cc \
src/core/lib/iomgr/ev_posix.h \
-src/core/lib/iomgr/ev_windows.c \
-src/core/lib/iomgr/exec_ctx.c \
+src/core/lib/iomgr/ev_windows.cc \
+src/core/lib/iomgr/exec_ctx.cc \
src/core/lib/iomgr/exec_ctx.h \
-src/core/lib/iomgr/executor.c \
+src/core/lib/iomgr/executor.cc \
src/core/lib/iomgr/executor.h \
src/core/lib/iomgr/gethostname.h \
-src/core/lib/iomgr/gethostname_fallback.c \
-src/core/lib/iomgr/gethostname_host_name_max.c \
-src/core/lib/iomgr/gethostname_sysconf.c \
-src/core/lib/iomgr/iocp_windows.c \
+src/core/lib/iomgr/gethostname_fallback.cc \
+src/core/lib/iomgr/gethostname_host_name_max.cc \
+src/core/lib/iomgr/gethostname_sysconf.cc \
+src/core/lib/iomgr/iocp_windows.cc \
src/core/lib/iomgr/iocp_windows.h \
-src/core/lib/iomgr/iomgr.c \
+src/core/lib/iomgr/iomgr.cc \
src/core/lib/iomgr/iomgr.h \
src/core/lib/iomgr/iomgr_internal.h \
-src/core/lib/iomgr/iomgr_posix.c \
+src/core/lib/iomgr/iomgr_posix.cc \
src/core/lib/iomgr/iomgr_posix.h \
-src/core/lib/iomgr/iomgr_uv.c \
+src/core/lib/iomgr/iomgr_uv.cc \
src/core/lib/iomgr/iomgr_uv.h \
-src/core/lib/iomgr/iomgr_windows.c \
-src/core/lib/iomgr/is_epollexclusive_available.c \
+src/core/lib/iomgr/iomgr_windows.cc \
+src/core/lib/iomgr/is_epollexclusive_available.cc \
src/core/lib/iomgr/is_epollexclusive_available.h \
-src/core/lib/iomgr/load_file.c \
+src/core/lib/iomgr/load_file.cc \
src/core/lib/iomgr/load_file.h \
-src/core/lib/iomgr/lockfree_event.c \
+src/core/lib/iomgr/lockfree_event.cc \
src/core/lib/iomgr/lockfree_event.h \
src/core/lib/iomgr/nameser.h \
-src/core/lib/iomgr/network_status_tracker.c \
+src/core/lib/iomgr/network_status_tracker.cc \
src/core/lib/iomgr/network_status_tracker.h \
-src/core/lib/iomgr/polling_entity.c \
+src/core/lib/iomgr/polling_entity.cc \
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_uv.c \
-src/core/lib/iomgr/pollset_set_windows.c \
+src/core/lib/iomgr/pollset_set_uv.cc \
+src/core/lib/iomgr/pollset_set_windows.cc \
src/core/lib/iomgr/pollset_set_windows.h \
-src/core/lib/iomgr/pollset_uv.c \
+src/core/lib/iomgr/pollset_uv.cc \
src/core/lib/iomgr/pollset_uv.h \
-src/core/lib/iomgr/pollset_windows.c \
+src/core/lib/iomgr/pollset_windows.cc \
src/core/lib/iomgr/pollset_windows.h \
src/core/lib/iomgr/port.h \
src/core/lib/iomgr/resolve_address.h \
-src/core/lib/iomgr/resolve_address_posix.c \
-src/core/lib/iomgr/resolve_address_uv.c \
-src/core/lib/iomgr/resolve_address_windows.c \
-src/core/lib/iomgr/resource_quota.c \
+src/core/lib/iomgr/resolve_address_posix.cc \
+src/core/lib/iomgr/resolve_address_uv.cc \
+src/core/lib/iomgr/resolve_address_windows.cc \
+src/core/lib/iomgr/resource_quota.cc \
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.c \
+src/core/lib/iomgr/sockaddr_utils.cc \
src/core/lib/iomgr/sockaddr_utils.h \
src/core/lib/iomgr/sockaddr_windows.h \
-src/core/lib/iomgr/socket_factory_posix.c \
+src/core/lib/iomgr/socket_factory_posix.cc \
src/core/lib/iomgr/socket_factory_posix.h \
-src/core/lib/iomgr/socket_mutator.c \
+src/core/lib/iomgr/socket_mutator.cc \
src/core/lib/iomgr/socket_mutator.h \
src/core/lib/iomgr/socket_utils.h \
-src/core/lib/iomgr/socket_utils_common_posix.c \
-src/core/lib/iomgr/socket_utils_linux.c \
-src/core/lib/iomgr/socket_utils_posix.c \
+src/core/lib/iomgr/socket_utils_common_posix.cc \
+src/core/lib/iomgr/socket_utils_linux.cc \
+src/core/lib/iomgr/socket_utils_posix.cc \
src/core/lib/iomgr/socket_utils_posix.h \
-src/core/lib/iomgr/socket_utils_uv.c \
-src/core/lib/iomgr/socket_utils_windows.c \
-src/core/lib/iomgr/socket_windows.c \
+src/core/lib/iomgr/socket_utils_uv.cc \
+src/core/lib/iomgr/socket_utils_windows.cc \
+src/core/lib/iomgr/socket_windows.cc \
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.c \
+src/core/lib/iomgr/tcp_client_posix.cc \
src/core/lib/iomgr/tcp_client_posix.h \
-src/core/lib/iomgr/tcp_client_uv.c \
-src/core/lib/iomgr/tcp_client_windows.c \
-src/core/lib/iomgr/tcp_posix.c \
+src/core/lib/iomgr/tcp_client_uv.cc \
+src/core/lib/iomgr/tcp_client_windows.cc \
+src/core/lib/iomgr/tcp_posix.cc \
src/core/lib/iomgr/tcp_posix.h \
src/core/lib/iomgr/tcp_server.h \
-src/core/lib/iomgr/tcp_server_posix.c \
+src/core/lib/iomgr/tcp_server_posix.cc \
src/core/lib/iomgr/tcp_server_utils_posix.h \
-src/core/lib/iomgr/tcp_server_utils_posix_common.c \
-src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c \
-src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c \
-src/core/lib/iomgr/tcp_server_uv.c \
-src/core/lib/iomgr/tcp_server_windows.c \
-src/core/lib/iomgr/tcp_uv.c \
+src/core/lib/iomgr/tcp_server_utils_posix_common.cc \
+src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc \
+src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc \
+src/core/lib/iomgr/tcp_server_uv.cc \
+src/core/lib/iomgr/tcp_server_windows.cc \
+src/core/lib/iomgr/tcp_uv.cc \
src/core/lib/iomgr/tcp_uv.h \
-src/core/lib/iomgr/tcp_windows.c \
+src/core/lib/iomgr/tcp_windows.cc \
src/core/lib/iomgr/tcp_windows.h \
-src/core/lib/iomgr/time_averaged_stats.c \
+src/core/lib/iomgr/time_averaged_stats.cc \
src/core/lib/iomgr/time_averaged_stats.h \
src/core/lib/iomgr/timer.h \
-src/core/lib/iomgr/timer_generic.c \
+src/core/lib/iomgr/timer_generic.cc \
src/core/lib/iomgr/timer_generic.h \
-src/core/lib/iomgr/timer_heap.c \
+src/core/lib/iomgr/timer_heap.cc \
src/core/lib/iomgr/timer_heap.h \
-src/core/lib/iomgr/timer_manager.c \
+src/core/lib/iomgr/timer_manager.cc \
src/core/lib/iomgr/timer_manager.h \
-src/core/lib/iomgr/timer_uv.c \
+src/core/lib/iomgr/timer_uv.cc \
src/core/lib/iomgr/timer_uv.h \
-src/core/lib/iomgr/udp_server.c \
+src/core/lib/iomgr/udp_server.cc \
src/core/lib/iomgr/udp_server.h \
-src/core/lib/iomgr/unix_sockets_posix.c \
+src/core/lib/iomgr/unix_sockets_posix.cc \
src/core/lib/iomgr/unix_sockets_posix.h \
-src/core/lib/iomgr/unix_sockets_posix_noop.c \
-src/core/lib/iomgr/wakeup_fd_cv.c \
+src/core/lib/iomgr/unix_sockets_posix_noop.cc \
+src/core/lib/iomgr/wakeup_fd_cv.cc \
src/core/lib/iomgr/wakeup_fd_cv.h \
-src/core/lib/iomgr/wakeup_fd_eventfd.c \
-src/core/lib/iomgr/wakeup_fd_nospecial.c \
-src/core/lib/iomgr/wakeup_fd_pipe.c \
+src/core/lib/iomgr/wakeup_fd_eventfd.cc \
+src/core/lib/iomgr/wakeup_fd_nospecial.cc \
+src/core/lib/iomgr/wakeup_fd_pipe.cc \
src/core/lib/iomgr/wakeup_fd_pipe.h \
-src/core/lib/iomgr/wakeup_fd_posix.c \
+src/core/lib/iomgr/wakeup_fd_posix.cc \
src/core/lib/iomgr/wakeup_fd_posix.h \
-src/core/lib/json/json.c \
+src/core/lib/json/json.cc \
src/core/lib/json/json.h \
src/core/lib/json/json_common.h \
-src/core/lib/json/json_reader.c \
+src/core/lib/json/json_reader.cc \
src/core/lib/json/json_reader.h \
-src/core/lib/json/json_string.c \
-src/core/lib/json/json_writer.c \
+src/core/lib/json/json_string.cc \
+src/core/lib/json/json_writer.cc \
src/core/lib/json/json_writer.h \
-src/core/lib/profiling/basic_timers.c \
-src/core/lib/profiling/stap_timers.c \
+src/core/lib/profiling/basic_timers.cc \
+src/core/lib/profiling/stap_timers.cc \
src/core/lib/profiling/timers.h \
-src/core/lib/security/context/security_context.c \
+src/core/lib/security/context/security_context.cc \
src/core/lib/security/context/security_context.h \
-src/core/lib/security/credentials/composite/composite_credentials.c \
+src/core/lib/security/credentials/composite/composite_credentials.cc \
src/core/lib/security/credentials/composite/composite_credentials.h \
-src/core/lib/security/credentials/credentials.c \
+src/core/lib/security/credentials/credentials.cc \
src/core/lib/security/credentials/credentials.h \
-src/core/lib/security/credentials/credentials_metadata.c \
-src/core/lib/security/credentials/fake/fake_credentials.c \
+src/core/lib/security/credentials/credentials_metadata.cc \
+src/core/lib/security/credentials/fake/fake_credentials.cc \
src/core/lib/security/credentials/fake/fake_credentials.h \
-src/core/lib/security/credentials/google_default/credentials_generic.c \
-src/core/lib/security/credentials/google_default/google_default_credentials.c \
+src/core/lib/security/credentials/google_default/credentials_generic.cc \
+src/core/lib/security/credentials/google_default/google_default_credentials.cc \
src/core/lib/security/credentials/google_default/google_default_credentials.h \
-src/core/lib/security/credentials/iam/iam_credentials.c \
+src/core/lib/security/credentials/iam/iam_credentials.cc \
src/core/lib/security/credentials/iam/iam_credentials.h \
-src/core/lib/security/credentials/jwt/json_token.c \
+src/core/lib/security/credentials/jwt/json_token.cc \
src/core/lib/security/credentials/jwt/json_token.h \
-src/core/lib/security/credentials/jwt/jwt_credentials.c \
+src/core/lib/security/credentials/jwt/jwt_credentials.cc \
src/core/lib/security/credentials/jwt/jwt_credentials.h \
-src/core/lib/security/credentials/jwt/jwt_verifier.c \
+src/core/lib/security/credentials/jwt/jwt_verifier.cc \
src/core/lib/security/credentials/jwt/jwt_verifier.h \
-src/core/lib/security/credentials/oauth2/oauth2_credentials.c \
+src/core/lib/security/credentials/oauth2/oauth2_credentials.cc \
src/core/lib/security/credentials/oauth2/oauth2_credentials.h \
-src/core/lib/security/credentials/plugin/plugin_credentials.c \
+src/core/lib/security/credentials/plugin/plugin_credentials.cc \
src/core/lib/security/credentials/plugin/plugin_credentials.h \
-src/core/lib/security/credentials/ssl/ssl_credentials.c \
+src/core/lib/security/credentials/ssl/ssl_credentials.cc \
src/core/lib/security/credentials/ssl/ssl_credentials.h \
src/core/lib/security/transport/auth_filters.h \
-src/core/lib/security/transport/client_auth_filter.c \
-src/core/lib/security/transport/lb_targets_info.c \
+src/core/lib/security/transport/client_auth_filter.cc \
+src/core/lib/security/transport/lb_targets_info.cc \
src/core/lib/security/transport/lb_targets_info.h \
-src/core/lib/security/transport/secure_endpoint.c \
+src/core/lib/security/transport/secure_endpoint.cc \
src/core/lib/security/transport/secure_endpoint.h \
-src/core/lib/security/transport/security_connector.c \
+src/core/lib/security/transport/security_connector.cc \
src/core/lib/security/transport/security_connector.h \
-src/core/lib/security/transport/security_handshaker.c \
+src/core/lib/security/transport/security_handshaker.cc \
src/core/lib/security/transport/security_handshaker.h \
-src/core/lib/security/transport/server_auth_filter.c \
-src/core/lib/security/transport/tsi_error.c \
+src/core/lib/security/transport/server_auth_filter.cc \
+src/core/lib/security/transport/tsi_error.cc \
src/core/lib/security/transport/tsi_error.h \
-src/core/lib/security/util/json_util.c \
+src/core/lib/security/util/json_util.cc \
src/core/lib/security/util/json_util.h \
-src/core/lib/slice/b64.c \
+src/core/lib/slice/b64.cc \
src/core/lib/slice/b64.h \
-src/core/lib/slice/percent_encoding.c \
+src/core/lib/slice/percent_encoding.cc \
src/core/lib/slice/percent_encoding.h \
-src/core/lib/slice/slice.c \
-src/core/lib/slice/slice_buffer.c \
-src/core/lib/slice/slice_hash_table.c \
+src/core/lib/slice/slice.cc \
+src/core/lib/slice/slice_buffer.cc \
+src/core/lib/slice/slice_hash_table.cc \
src/core/lib/slice/slice_hash_table.h \
-src/core/lib/slice/slice_intern.c \
+src/core/lib/slice/slice_intern.cc \
src/core/lib/slice/slice_internal.h \
-src/core/lib/slice/slice_string_helpers.c \
+src/core/lib/slice/slice_string_helpers.cc \
src/core/lib/slice/slice_string_helpers.h \
-src/core/lib/support/alloc.c \
-src/core/lib/support/arena.c \
+src/core/lib/support/alloc.cc \
+src/core/lib/support/arena.cc \
src/core/lib/support/arena.h \
-src/core/lib/support/atm.c \
+src/core/lib/support/atm.cc \
src/core/lib/support/atomic.h \
src/core/lib/support/atomic_with_atm.h \
src/core/lib/support/atomic_with_std.h \
-src/core/lib/support/avl.c \
-src/core/lib/support/backoff.c \
-src/core/lib/support/backoff.h \
-src/core/lib/support/block_annotate.h \
-src/core/lib/support/cmdline.c \
-src/core/lib/support/cpu_iphone.c \
-src/core/lib/support/cpu_linux.c \
-src/core/lib/support/cpu_posix.c \
-src/core/lib/support/cpu_windows.c \
+src/core/lib/support/avl.cc \
+src/core/lib/support/cmdline.cc \
+src/core/lib/support/cpu_iphone.cc \
+src/core/lib/support/cpu_linux.cc \
+src/core/lib/support/cpu_posix.cc \
+src/core/lib/support/cpu_windows.cc \
src/core/lib/support/env.h \
-src/core/lib/support/env_linux.c \
-src/core/lib/support/env_posix.c \
-src/core/lib/support/env_windows.c \
-src/core/lib/support/histogram.c \
-src/core/lib/support/host_port.c \
-src/core/lib/support/log.c \
-src/core/lib/support/log_android.c \
-src/core/lib/support/log_linux.c \
-src/core/lib/support/log_posix.c \
-src/core/lib/support/log_windows.c \
+src/core/lib/support/env_linux.cc \
+src/core/lib/support/env_posix.cc \
+src/core/lib/support/env_windows.cc \
+src/core/lib/support/histogram.cc \
+src/core/lib/support/host_port.cc \
+src/core/lib/support/log.cc \
+src/core/lib/support/log_android.cc \
+src/core/lib/support/log_linux.cc \
+src/core/lib/support/log_posix.cc \
+src/core/lib/support/log_windows.cc \
src/core/lib/support/memory.h \
-src/core/lib/support/mpscq.c \
+src/core/lib/support/mpscq.cc \
src/core/lib/support/mpscq.h \
-src/core/lib/support/murmur_hash.c \
+src/core/lib/support/murmur_hash.cc \
src/core/lib/support/murmur_hash.h \
src/core/lib/support/spinlock.h \
-src/core/lib/support/stack_lockfree.c \
+src/core/lib/support/stack_lockfree.cc \
src/core/lib/support/stack_lockfree.h \
-src/core/lib/support/string.c \
+src/core/lib/support/string.cc \
src/core/lib/support/string.h \
-src/core/lib/support/string_posix.c \
-src/core/lib/support/string_util_windows.c \
-src/core/lib/support/string_windows.c \
+src/core/lib/support/string_posix.cc \
+src/core/lib/support/string_util_windows.cc \
+src/core/lib/support/string_windows.cc \
src/core/lib/support/string_windows.h \
-src/core/lib/support/subprocess_posix.c \
-src/core/lib/support/subprocess_windows.c \
-src/core/lib/support/sync.c \
-src/core/lib/support/sync_posix.c \
-src/core/lib/support/sync_windows.c \
-src/core/lib/support/thd.c \
-src/core/lib/support/thd_posix.c \
-src/core/lib/support/thd_windows.c \
-src/core/lib/support/time.c \
-src/core/lib/support/time_posix.c \
-src/core/lib/support/time_precise.c \
+src/core/lib/support/subprocess_posix.cc \
+src/core/lib/support/subprocess_windows.cc \
+src/core/lib/support/sync.cc \
+src/core/lib/support/sync_posix.cc \
+src/core/lib/support/sync_windows.cc \
+src/core/lib/support/thd.cc \
+src/core/lib/support/thd_posix.cc \
+src/core/lib/support/thd_windows.cc \
+src/core/lib/support/time.cc \
+src/core/lib/support/time_posix.cc \
+src/core/lib/support/time_precise.cc \
src/core/lib/support/time_precise.h \
-src/core/lib/support/time_windows.c \
-src/core/lib/support/tls_pthread.c \
+src/core/lib/support/time_windows.cc \
+src/core/lib/support/tls_pthread.cc \
src/core/lib/support/tmpfile.h \
-src/core/lib/support/tmpfile_msys.c \
-src/core/lib/support/tmpfile_posix.c \
-src/core/lib/support/tmpfile_windows.c \
-src/core/lib/support/wrap_memcpy.c \
+src/core/lib/support/tmpfile_msys.cc \
+src/core/lib/support/tmpfile_posix.cc \
+src/core/lib/support/tmpfile_windows.cc \
+src/core/lib/support/wrap_memcpy.cc \
src/core/lib/surface/README.md \
-src/core/lib/surface/alarm.c \
+src/core/lib/surface/alarm.cc \
src/core/lib/surface/alarm_internal.h \
-src/core/lib/surface/api_trace.c \
+src/core/lib/surface/api_trace.cc \
src/core/lib/surface/api_trace.h \
-src/core/lib/surface/byte_buffer.c \
-src/core/lib/surface/byte_buffer_reader.c \
-src/core/lib/surface/call.c \
+src/core/lib/surface/byte_buffer.cc \
+src/core/lib/surface/byte_buffer_reader.cc \
+src/core/lib/surface/call.cc \
src/core/lib/surface/call.h \
-src/core/lib/surface/call_details.c \
-src/core/lib/surface/call_log_batch.c \
+src/core/lib/surface/call_details.cc \
+src/core/lib/surface/call_log_batch.cc \
src/core/lib/surface/call_test_only.h \
-src/core/lib/surface/channel.c \
+src/core/lib/surface/channel.cc \
src/core/lib/surface/channel.h \
-src/core/lib/surface/channel_init.c \
+src/core/lib/surface/channel_init.cc \
src/core/lib/surface/channel_init.h \
-src/core/lib/surface/channel_ping.c \
-src/core/lib/surface/channel_stack_type.c \
+src/core/lib/surface/channel_ping.cc \
+src/core/lib/surface/channel_stack_type.cc \
src/core/lib/surface/channel_stack_type.h \
-src/core/lib/surface/completion_queue.c \
+src/core/lib/surface/completion_queue.cc \
src/core/lib/surface/completion_queue.h \
-src/core/lib/surface/completion_queue_factory.c \
+src/core/lib/surface/completion_queue_factory.cc \
src/core/lib/surface/completion_queue_factory.h \
-src/core/lib/surface/event_string.c \
+src/core/lib/surface/event_string.cc \
src/core/lib/surface/event_string.h \
-src/core/lib/surface/init.c \
+src/core/lib/surface/init.cc \
src/core/lib/surface/init.h \
-src/core/lib/surface/init_secure.c \
+src/core/lib/surface/init_secure.cc \
src/core/lib/surface/lame_client.cc \
src/core/lib/surface/lame_client.h \
-src/core/lib/surface/metadata_array.c \
-src/core/lib/surface/server.c \
+src/core/lib/surface/metadata_array.cc \
+src/core/lib/surface/server.cc \
src/core/lib/surface/server.h \
-src/core/lib/surface/validate_metadata.c \
+src/core/lib/surface/validate_metadata.cc \
src/core/lib/surface/validate_metadata.h \
-src/core/lib/surface/version.c \
+src/core/lib/surface/version.cc \
src/core/lib/transport/README.md \
-src/core/lib/transport/bdp_estimator.c \
+src/core/lib/transport/bdp_estimator.cc \
src/core/lib/transport/bdp_estimator.h \
-src/core/lib/transport/byte_stream.c \
+src/core/lib/transport/byte_stream.cc \
src/core/lib/transport/byte_stream.h \
-src/core/lib/transport/connectivity_state.c \
+src/core/lib/transport/connectivity_state.cc \
src/core/lib/transport/connectivity_state.h \
-src/core/lib/transport/error_utils.c \
+src/core/lib/transport/error_utils.cc \
src/core/lib/transport/error_utils.h \
src/core/lib/transport/http2_errors.h \
-src/core/lib/transport/metadata.c \
+src/core/lib/transport/metadata.cc \
src/core/lib/transport/metadata.h \
-src/core/lib/transport/metadata_batch.c \
+src/core/lib/transport/metadata_batch.cc \
src/core/lib/transport/metadata_batch.h \
-src/core/lib/transport/pid_controller.c \
+src/core/lib/transport/pid_controller.cc \
src/core/lib/transport/pid_controller.h \
-src/core/lib/transport/service_config.c \
+src/core/lib/transport/service_config.cc \
src/core/lib/transport/service_config.h \
-src/core/lib/transport/static_metadata.c \
+src/core/lib/transport/static_metadata.cc \
src/core/lib/transport/static_metadata.h \
-src/core/lib/transport/status_conversion.c \
+src/core/lib/transport/status_conversion.cc \
src/core/lib/transport/status_conversion.h \
-src/core/lib/transport/timeout_encoding.c \
+src/core/lib/transport/timeout_encoding.cc \
src/core/lib/transport/timeout_encoding.h \
-src/core/lib/transport/transport.c \
+src/core/lib/transport/transport.cc \
src/core/lib/transport/transport.h \
src/core/lib/transport/transport_impl.h \
-src/core/lib/transport/transport_op_string.c \
-src/core/plugin_registry/grpc_plugin_registry.c \
+src/core/lib/transport/transport_op_string.cc \
+src/core/plugin_registry/grpc_plugin_registry.cc \
src/core/tsi/README.md \
-src/core/tsi/fake_transport_security.c \
+src/core/tsi/fake_transport_security.cc \
src/core/tsi/fake_transport_security.h \
-src/core/tsi/gts_transport_security.c \
+src/core/tsi/gts_transport_security.cc \
src/core/tsi/gts_transport_security.h \
-src/core/tsi/ssl_transport_security.c \
+src/core/tsi/ssl_transport_security.cc \
src/core/tsi/ssl_transport_security.h \
src/core/tsi/ssl_types.h \
-src/core/tsi/transport_security.c \
+src/core/tsi/transport_security.cc \
src/core/tsi/transport_security.h \
-src/core/tsi/transport_security_adapter.c \
+src/core/tsi/transport_security_adapter.cc \
src/core/tsi/transport_security_adapter.h \
-src/core/tsi/transport_security_grpc.c \
+src/core/tsi/transport_security_grpc.cc \
src/core/tsi/transport_security_grpc.h \
src/core/tsi/transport_security_interface.h \
third_party/nanopb/pb.h \
diff --git a/tools/gce/linux_performance_worker_init.sh b/tools/gce/linux_performance_worker_init.sh
index 88d8de7402..8d900f1d16 100755
--- a/tools/gce/linux_performance_worker_init.sh
+++ b/tools/gce/linux_performance_worker_init.sh
@@ -72,6 +72,7 @@ sudo apt-get install -y netperf
sudo apt-get install -y libgflags-dev libgtest-dev libc++-dev clang
# Python dependencies
+sudo pip install --upgrade pip==9.0.1
sudo pip install tabulate
sudo pip install google-api-python-client
sudo pip install virtualenv
diff --git a/tools/github/pr_latency.py b/tools/github/pr_latency.py
new file mode 100644
index 0000000000..5d635835e5
--- /dev/null
+++ b/tools/github/pr_latency.py
@@ -0,0 +1,163 @@
+#!/usr/bin/env python
+# 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.
+
+"""Measure the time between PR creation and completion of all tests.
+
+You'll need a github API token to avoid being rate-limited. See
+https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/
+
+This script goes over the most recent 100 pull requests. For PRs with a single
+commit, it uses the PR's creation as the initial time; othewise, it uses the
+date of the last commit. This is somewhat fragile, and imposed by the fact that
+GitHub reports a PR's updated timestamp for any event that modifies the PR (e.g.
+comments), not just the addition of new commits.
+
+In addition, it ignores latencies greater than five hours, as that's likely due
+to a manual re-run of tests.
+"""
+
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+
+import json
+import logging
+import pprint
+import urllib2
+
+from datetime import datetime, timedelta
+
+logging.basicConfig(format='%(asctime)s %(message)s')
+
+PRS = 'https://api.github.com/repos/grpc/grpc/pulls?state=open&per_page=100'
+COMMITS = 'https://api.github.com/repos/grpc/grpc/pulls/{pr_number}/commits'
+
+
+def gh(url):
+ request = urllib2.Request(url)
+ if TOKEN:
+ request.add_header('Authorization', 'token {}'.format(TOKEN))
+ response = urllib2.urlopen(request)
+ return response.read()
+
+
+def print_csv_header():
+ print('pr,base_time,test_time,latency_seconds,successes,failures,errors')
+
+
+def output(pr, base_time, test_time, diff_time, successes, failures, errors, mode='human'):
+ if mode == 'human':
+ print("PR #{} base time: {} UTC, Tests completed at: {} UTC. Latency: {}."
+ "\n\tSuccesses: {}, Failures: {}, Errors: {}".format(
+ pr, base_time, test_time, diff_time, successes, failures, errors))
+ elif mode == 'csv':
+ print(','.join([str(pr), str(base_time),
+ str(test_time), str(int((test_time-base_time).total_seconds())),
+ str(successes), str(failures), str(errors)]))
+
+
+def parse_timestamp(datetime_str):
+ return datetime.strptime(datetime_str, '%Y-%m-%dT%H:%M:%SZ')
+
+
+def to_posix_timestamp(dt):
+ return str((dt - datetime(1970, 1, 1)).total_seconds())
+
+
+def get_pr_data():
+ latest_prs = json.loads(gh(PRS))
+ res = [{'number': pr['number'],
+ 'created_at': parse_timestamp(pr['created_at']),
+ 'updated_at': parse_timestamp(pr['updated_at']),
+ 'statuses_url': pr['statuses_url']}
+ for pr in latest_prs]
+ return res
+
+
+def get_commits_data(pr_number):
+ commits = json.loads(gh(COMMITS.format(pr_number=pr_number)))
+ return {'num_commits': len(commits),
+ 'most_recent_date': parse_timestamp(commits[-1]['commit']['author']['date'])}
+
+
+def get_status_data(statuses_url, system):
+ status_url = statuses_url.replace('statuses', 'status')
+ statuses = json.loads(gh(status_url + '?per_page=100'))
+ successes = 0
+ failures = 0
+ errors = 0
+ latest_datetime = None
+ if not statuses: return None
+ if system == 'kokoro': string_in_target_url = 'kokoro'
+ elif system == 'jenkins': string_in_target_url = 'grpc-testing'
+ for status in statuses['statuses']:
+ if not status['target_url'] or string_in_target_url not in status['target_url']: continue # Ignore jenkins
+ if status['state'] == 'pending': return None
+ elif status['state'] == 'success': successes += 1
+ elif status['state'] == 'failure': failures += 1
+ elif status['state'] == 'error': errors += 1
+ if not latest_datetime:
+ latest_datetime = parse_timestamp(status['updated_at'])
+ else:
+ latest_datetime = max(latest_datetime, parse_timestamp(status['updated_at']))
+ # First status is the most recent one.
+ if any([successes, failures, errors]) and sum([successes, failures, errors]) > 15:
+ return {'latest_datetime': latest_datetime,
+ 'successes': successes,
+ 'failures': failures,
+ 'errors': errors}
+ else: return None
+
+
+def build_args_parser():
+ import argparse
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--format', type=str, choices=['human', 'csv'],
+ default='human',
+ help='Output format: are you a human or a machine?')
+ parser.add_argument('--system', type=str, choices=['jenkins', 'kokoro'],
+ required=True, help='Consider only the given CI system')
+ parser.add_argument('--token', type=str, default='',
+ help='GitHub token to use its API with a higher rate limit')
+ return parser
+
+
+def main():
+ import sys
+ global TOKEN
+ args_parser = build_args_parser()
+ args = args_parser.parse_args()
+ TOKEN = args.token
+ if args.format == 'csv': print_csv_header()
+ for pr_data in get_pr_data():
+ commit_data = get_commits_data(pr_data['number'])
+ # PR with a single commit -> use the PRs creation time.
+ # else -> use the latest commit's date.
+ base_timestamp = pr_data['updated_at']
+ if commit_data['num_commits'] > 1:
+ base_timestamp = commit_data['most_recent_date']
+ else:
+ base_timestamp = pr_data['created_at']
+ last_status = get_status_data(pr_data['statuses_url'], args.system)
+ if last_status:
+ diff = last_status['latest_datetime'] - base_timestamp
+ if diff < timedelta(hours=5):
+ output(pr_data['number'], base_timestamp, last_status['latest_datetime'],
+ diff, last_status['successes'], last_status['failures'],
+ last_status['errors'], mode=args.format)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/tools/internal_ci/helper_scripts/prepare_build_macos_rc b/tools/internal_ci/helper_scripts/prepare_build_macos_rc
index bec529f85e..b6cc43e0ab 100644
--- a/tools/internal_ci/helper_scripts/prepare_build_macos_rc
+++ b/tools/internal_ci/helper_scripts/prepare_build_macos_rc
@@ -27,6 +27,14 @@ ulimit -n 10000
# show current limits
ulimit -a
+# synchronize the clock
+date
+sudo systemsetup -setusingnetworktime off
+sudo systemsetup -setnetworktimeserver "$( ipconfig getoption en0 server_identifier )"
+sudo systemsetup -settimezone America/Los_Angeles
+sudo systemsetup -setusingnetworktime on
+date
+
# Add GCP credentials for BQ access
pip install google-api-python-client --user python
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json
@@ -51,12 +59,14 @@ export LANG=en_US.UTF-8
pod repo update # needed by python
# python
-brew install coreutils # we need grealpath
pip install virtualenv --user python
-pip install -U six tox setuptools twisted pyyaml --user python
+pip install -U Mako six tox setuptools twisted pyyaml --user python
export PYTHONPATH=/Library/Python/3.4/site-packages
# set xcode version for Obj-C tests
sudo xcode-select -switch /Applications/Xcode_8.2.1.app/Contents/Developer
+# TODO(jtattermusch): better debugging of clock skew, remove once not needed
+date
+
git submodule update --init
diff --git a/tools/internal_ci/linux/grpc_coverage.cfg b/tools/internal_ci/linux/grpc_coverage.cfg
new file mode 100644
index 0000000000..56b7745b21
--- /dev/null
+++ b/tools/internal_ci/linux/grpc_coverage.cfg
@@ -0,0 +1,24 @@
+# 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_coverage.sh"
+timeout_mins: 420
+action {
+ define_artifacts {
+ regex: "github/grpc/reports/**"
+ }
+}
diff --git a/tools/internal_ci/linux/grpc_coverage.sh b/tools/internal_ci/linux/grpc_coverage.sh
new file mode 100755
index 0000000000..31623d2618
--- /dev/null
+++ b/tools/internal_ci/linux/grpc_coverage.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+# 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.
+
+set -ex
+
+# Enter the gRPC repo root
+cd $(dirname $0)/../../..
+
+source tools/internal_ci/helper_scripts/prepare_build_linux_rc
+
+python tools/run_tests/run_tests.py \
+ --use_docker \
+ -t \
+ -l all \
+ -c gcov \
+ -x report.xml \
+ -j 16
+ \ No newline at end of file
diff --git a/tools/internal_ci/linux/grpc_interop_toprod.sh b/tools/internal_ci/linux/grpc_interop_toprod.sh
index 3d06185406..97a7d5d239 100755
--- a/tools/internal_ci/linux/grpc_interop_toprod.sh
+++ b/tools/internal_ci/linux/grpc_interop_toprod.sh
@@ -28,5 +28,5 @@ tools/run_tests/run_interop_tests.py \
--cloud_to_prod \
--cloud_to_prod_auth \
--prod_servers default gateway_v4 \
- --use_docker --internal_ci -t -j 12 $@
+ --use_docker --internal_ci --allow_flakes -t -j 12 $@
diff --git a/tools/internal_ci/linux/grpc_microbenchmark_diff.sh b/tools/internal_ci/linux/grpc_microbenchmark_diff.sh
index 58ffcf336b..45add1b02d 100755
--- a/tools/internal_ci/linux/grpc_microbenchmark_diff.sh
+++ b/tools/internal_ci/linux/grpc_microbenchmark_diff.sh
@@ -25,6 +25,8 @@ cd $(dirname $0)/../../..
source tools/internal_ci/helper_scripts/prepare_build_linux_perf_rc
tools/run_tests/start_port_server.py
+tools/jenkins/run_c_cpp_test.sh tools/profiling/bloat/bloat_diff.py \
+ -d origin/$ghprbTargetBranch || FAILED="true"
tools/jenkins/run_c_cpp_test.sh tools/profiling/microbenchmarks/bm_diff/bm_main.py \
-d origin/$ghprbTargetBranch \
-b $BENCHMARKS_TO_RUN || FAILED="true"
diff --git a/tools/internal_ci/linux/grpc_performance_profile_daily.sh b/tools/internal_ci/linux/grpc_performance_profile_daily.sh
index 25523e21b8..34d41bc04c 100755
--- a/tools/internal_ci/linux/grpc_performance_profile_daily.sh
+++ b/tools/internal_ci/linux/grpc_performance_profile_daily.sh
@@ -22,6 +22,8 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_perf_rc
CPUS=`python -c 'import multiprocessing; print multiprocessing.cpu_count()'`
+./tools/run_tests/start_port_server.py || true
+
make CONFIG=opt memory_profile_test memory_profile_client memory_profile_server -j $CPUS
bins/opt/memory_profile_test
bq load microbenchmarks.memory memory_usage.csv
diff --git a/tools/internal_ci/macos/grpc_build_artifacts.sh b/tools/internal_ci/macos/grpc_build_artifacts.sh
index 09784e3bb4..eb4568c32b 100755
--- a/tools/internal_ci/macos/grpc_build_artifacts.sh
+++ b/tools/internal_ci/macos/grpc_build_artifacts.sh
@@ -27,8 +27,7 @@ python3.5 -m pip install cython setuptools wheel
python3.6 -m pip install cython setuptools wheel
# needed to build ruby artifacts
-wget https://raw.githubusercontent.com/grpc/grpc/master/tools/distrib/build_ruby_environment_macos.sh
-bash build_ruby_environment_macos.sh
+time bash tools/distrib/build_ruby_environment_macos.sh
gem install rubygems-update
update_rubygems
diff --git a/tools/internal_ci/macos/grpc_run_tests_matrix.sh b/tools/internal_ci/macos/grpc_run_tests_matrix.sh
index 8e7fd54a62..6e0c2bb487 100755
--- a/tools/internal_ci/macos/grpc_run_tests_matrix.sh
+++ b/tools/internal_ci/macos/grpc_run_tests_matrix.sh
@@ -28,6 +28,9 @@ ps aux | grep port_server\\.py | awk '{print $2}' | xargs kill -9
# Reveal leftover processes that might be left behind by the build
ps aux | grep -i kbuilder
+# TODO(jtattermusch): better debugging of clock skew, remove once not needed
+date
+
echo 'Exiting gRPC main test script.'
if [ "$FAILED" != "" ]
diff --git a/tools/interop_matrix/README.md b/tools/interop_matrix/README.md
index f92dc690e2..c2f354399f 100644
--- a/tools/interop_matrix/README.md
+++ b/tools/interop_matrix/README.md
@@ -5,6 +5,21 @@ This directory contains scripts that facilitate building and running gRPC tests
The setup builds gRPC docker images for each language/runtime and upload it to Google Container Registry (GCR). These images, encapsulating gRPC stack
from specific releases/tag, are used to test version compatiblity between gRPC release versions.
+## Step-by-step instructions for adding a new release to compatibility test
+We have continuous nightly test setup to test gRPC backward compatibility between old clients and latest server. When a gRPC developer creates a new gRPC release, s/he is also responsible to add the just-released gRPC client to the nightly test. The steps are:
+- Add (or update) an entry in ./client_matrix.py file to reference the github tag for the release.
+- Build new client docker image(s). For example, for java release `v1.9.9`, do
+ - `tools/interop_matrix/create_matrix_images.py --git_checkout --release=v1.9.9 --language=java`
+- Verify that the new docker image was built successfully and uploaded to GCR. For example,
+ - `gcloud beta container images list-tags gcr.io/grpc-testing/grpc_interop_java_oracle8`
+ - should show an image entry with tag `v1.9.9`.
+- Verify the just-created docker client image would pass backward compatibility test (it should). For example,
+ - `gcloud docker -- pull gcr.io/grpc-testing/grpc_interop_java_oracle8:v1.9.9` followed by
+ - `docker_image=gcr.io/grpc-testing/grpc_interop_java_oracle8:v1.9.9 ./testcases/java__master`
+- git commit the change and merge it to upstream/master.
+- (Optional) clean up the tmp directory to where grpc source is cloned at `/export/hda3/tmp/grpc_matrix/`.
+For more details on each step, refer to sections below.
+
## Instructions for creating GCR images
- Edit `./client_matrix.py` to include desired gRPC release.
- Run `tools/interop_matrix/create_matrix_images.py`. Useful options:
@@ -45,3 +60,4 @@ For example:
Note:
- File path starting with `tools/` or `template/` are relative to the grpc repo root dir. File path starting with `./` are relative to current directory (`tools/interop_matrix`).
+- Creating and referencing images in GCR require read and write permission to Google Container Registry path gcr.io/grpc-testing.
diff --git a/tools/jenkins/run_full_performance.sh b/tools/jenkins/run_full_performance.sh
index a9661c7e26..9598fd7734 100755
--- a/tools/jenkins/run_full_performance.sh
+++ b/tools/jenkins/run_full_performance.sh
@@ -21,7 +21,7 @@ cd $(dirname $0)/../..
# run 8core client vs 8core server
tools/run_tests/run_performance_tests.py \
- -l c++ csharp node ruby java python go node_express php \
+ -l c++ csharp node ruby java python go node_express php_protobuf_php php_protobuf_c \
--netperf \
--category scalable \
--bq_result_table performance_test.performance_experiment \
diff --git a/tools/jenkins/run_performance_profile_daily.sh b/tools/jenkins/run_performance_profile_daily.sh
index 04a2464aee..48d82a9b7f 100755
--- a/tools/jenkins/run_performance_profile_daily.sh
+++ b/tools/jenkins/run_performance_profile_daily.sh
@@ -29,4 +29,6 @@ fi
BENCHMARKS_TO_RUN="bm_fullstack_unary_ping_pong bm_fullstack_streaming_ping_pong bm_fullstack_streaming_pump bm_closure bm_cq bm_call_create bm_error bm_chttp2_hpack bm_chttp2_transport bm_pollset bm_metadata"
+./tools/run_tests/start_port_server.py || true
+
$PYTHON tools/run_tests/run_microbenchmark.py --collect summary perf latency -b $BENCHMARKS_TO_RUN
diff --git a/tools/profiling/bloat/bloat_diff.py b/tools/profiling/bloat/bloat_diff.py
new file mode 100755
index 0000000000..9b40685e90
--- /dev/null
+++ b/tools/profiling/bloat/bloat_diff.py
@@ -0,0 +1,99 @@
+#!/usr/bin/env python2.7
+#
+# 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.
+
+import argparse
+import glob
+import multiprocessing
+import os
+import shutil
+import subprocess
+import sys
+
+sys.path.append(
+ os.path.join(
+ os.path.dirname(sys.argv[0]), '..', '..', 'run_tests', 'python_utils'))
+import comment_on_pr
+
+argp = argparse.ArgumentParser(
+ description='Perform diff on microbenchmarks')
+
+argp.add_argument(
+ '-d',
+ '--diff_base',
+ type=str,
+ help='Commit or branch to compare the current one to')
+
+argp.add_argument(
+ '-j',
+ '--jobs',
+ type=int,
+ default=multiprocessing.cpu_count())
+
+args = argp.parse_args()
+
+LIBS = [
+ 'libgrpc.so',
+ 'libgrpc++.so',
+]
+
+def build(where):
+ subprocess.check_call('make -j%d' % args.jobs,
+ shell=True, cwd='.')
+ shutil.rmtree('bloat_diff_%s' % where, ignore_errors=True)
+ os.rename('libs', 'bloat_diff_%s' % where)
+
+build('new')
+
+if args.diff_base:
+ old = 'old'
+ where_am_i = subprocess.check_output(
+ ['git', 'rev-parse', '--abbrev-ref', 'HEAD']).strip()
+ subprocess.check_call(['git', 'checkout', args.diff_base])
+ subprocess.check_call(['git', 'submodule', 'update'])
+ try:
+ try:
+ build('old')
+ except subprocess.CalledProcessError, e:
+ subprocess.check_call(['make', 'clean'])
+ build('old')
+ finally:
+ subprocess.check_call(['git', 'checkout', where_am_i])
+ subprocess.check_call(['git', 'submodule', 'update'])
+
+subprocess.check_call('make -j%d' % args.jobs,
+ shell=True, cwd='third_party/bloaty')
+
+text = ''
+for lib in LIBS:
+ text += '****************************************************************\n\n'
+ text += lib + '\n\n'
+ old_version = glob.glob('bloat_diff_old/opt/%s' % lib)
+ new_version = glob.glob('bloat_diff_new/opt/%s' % lib)
+ assert len(new_version) == 1
+ cmd = 'third_party/bloaty/bloaty -d compileunits,symbols'
+ if old_version:
+ assert len(old_version) == 1
+ text += subprocess.check_output('%s %s -- %s' %
+ (cmd, new_version[0], old_version[0]),
+ shell=True)
+ else:
+ text += subprocess.check_output('%s %s' %
+ (cmd, new_version[0]),
+ shell=True)
+ text += '\n\n'
+
+print text
+comment_on_pr.comment_on_pr('```\n%s\n```' % text)
diff --git a/tools/profiling/microbenchmarks/bm_diff/bm_main.py b/tools/profiling/microbenchmarks/bm_diff/bm_main.py
index 5aa11ac391..516d110b97 100755
--- a/tools/profiling/microbenchmarks/bm_diff/bm_main.py
+++ b/tools/profiling/microbenchmarks/bm_diff/bm_main.py
@@ -23,6 +23,7 @@ import bm_diff
import sys
import os
+import random
import argparse
import multiprocessing
import subprocess
@@ -32,6 +33,12 @@ sys.path.append(
os.path.dirname(sys.argv[0]), '..', '..', 'run_tests', 'python_utils'))
import comment_on_pr
+sys.path.append(
+ os.path.join(
+ os.path.dirname(sys.argv[0]), '..', '..', '..', 'run_tests',
+ 'python_utils'))
+import jobset
+
def _args():
argp = argparse.ArgumentParser(
@@ -125,8 +132,13 @@ def main(args):
subprocess.check_call(['git', 'checkout', where_am_i])
subprocess.check_call(['git', 'submodule', 'update'])
- bm_run.run('new', args.benchmarks, args.jobs, args.loops, args.regex, args.counters)
- bm_run.run(old, args.benchmarks, args.jobs, args.loops, args.regex, args.counters)
+ jobs_list = []
+ jobs_list += bm_run.create_jobs('new', args.benchmarks, args.loops, args.regex, args.counters)
+ jobs_list += bm_run.create_jobs(old, args.benchmarks, args.loops, args.regex, args.counters)
+
+ # shuffle all jobs to eliminate noise from GCE CPU drift
+ random.shuffle(jobs_list, random.SystemRandom().random)
+ jobset.run(jobs_list, maxjobs=args.jobs)
diff, note = bm_diff.diff(args.benchmarks, args.loops, args.regex, args.track, old,
'new', args.counters)
diff --git a/tools/profiling/microbenchmarks/bm_diff/bm_run.py b/tools/profiling/microbenchmarks/bm_diff/bm_run.py
index 206f7c5845..81db5a226a 100755
--- a/tools/profiling/microbenchmarks/bm_diff/bm_run.py
+++ b/tools/profiling/microbenchmarks/bm_diff/bm_run.py
@@ -95,11 +95,12 @@ def _collect_bm_data(bm, cfg, name, regex, idx, loops):
shortname='%s %s %s %s %d/%d' % (bm, line, cfg, name, idx + 1,
loops),
verbose_success=True,
+ cpu_cost=2,
timeout_seconds=60 * 60)) # one hour
return jobs_list
-def run(name, benchmarks, jobs, loops, regex, counters):
+def create_jobs(name, benchmarks, loops, regex, counters):
jobs_list = []
for loop in range(0, loops):
for bm in benchmarks:
@@ -108,9 +109,11 @@ def run(name, benchmarks, jobs, loops, regex, counters):
jobs_list += _collect_bm_data(bm, 'counters', name, regex, loop,
loops)
random.shuffle(jobs_list, random.SystemRandom().random)
- jobset.run(jobs_list, maxjobs=jobs)
+ return jobs_list
if __name__ == '__main__':
args = _args()
- run(args.name, args.benchmarks, args.jobs, args.loops, args.regex, args.counters)
+ jobs_list = create_jobs(args.name, args.benchmarks, args.loops,
+ args.regex, args.counters)
+ jobset.run(jobs_list, maxjobs=args.jobs)
diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json
index 1e34dc6b7a..5d9a0f652c 100644
--- a/tools/run_tests/generated/sources_and_headers.json
+++ b/tools/run_tests/generated/sources_and_headers.json
@@ -104,6 +104,23 @@
"gpr",
"gpr_test_util",
"grpc",
+ "grpc_test_util"
+ ],
+ "headers": [],
+ "is_filegroup": false,
+ "language": "c",
+ "name": "backoff_test",
+ "src": [
+ "test/core/backoff/backoff_test.c"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
"grpc_test_util",
"test_tcp_server"
],
@@ -734,21 +751,6 @@
"headers": [],
"is_filegroup": false,
"language": "c",
- "name": "gpr_backoff_test",
- "src": [
- "test/core/support/backoff_test.c"
- ],
- "third_party": false,
- "type": "target"
- },
- {
- "deps": [
- "gpr",
- "gpr_test_util"
- ],
- "headers": [],
- "is_filegroup": false,
- "language": "c",
"name": "gpr_cmdline_test",
"src": [
"test/core/support/cmdline_test.c"
@@ -6000,7 +6002,7 @@
"language": "c",
"name": "grpc",
"src": [
- "src/core/lib/surface/init.c"
+ "src/core/lib/surface/init.cc"
],
"third_party": false,
"type": "lib"
@@ -6018,7 +6020,7 @@
"language": "c",
"name": "grpc_cronet",
"src": [
- "src/core/lib/surface/init.c"
+ "src/core/lib/surface/init.cc"
],
"third_party": false,
"type": "lib"
@@ -6104,8 +6106,8 @@
"language": "c",
"name": "grpc_unsecure",
"src": [
- "src/core/lib/surface/init.c",
- "src/core/lib/surface/init_unsecure.c"
+ "src/core/lib/surface/init.cc",
+ "src/core/lib/surface/init_unsecure.cc"
],
"third_party": false,
"type": "lib"
@@ -7722,37 +7724,37 @@
"src": [
"include/grpc/census.h",
"src/core/ext/census/aggregation.h",
- "src/core/ext/census/base_resources.c",
+ "src/core/ext/census/base_resources.cc",
"src/core/ext/census/base_resources.h",
"src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h",
- "src/core/ext/census/context.c",
+ "src/core/ext/census/context.cc",
"src/core/ext/census/gen/census.pb.c",
"src/core/ext/census/gen/census.pb.h",
"src/core/ext/census/gen/trace_context.pb.c",
"src/core/ext/census/gen/trace_context.pb.h",
- "src/core/ext/census/grpc_context.c",
- "src/core/ext/census/grpc_filter.c",
+ "src/core/ext/census/grpc_context.cc",
+ "src/core/ext/census/grpc_filter.cc",
"src/core/ext/census/grpc_filter.h",
- "src/core/ext/census/grpc_plugin.c",
- "src/core/ext/census/initialize.c",
- "src/core/ext/census/intrusive_hash_map.c",
+ "src/core/ext/census/grpc_plugin.cc",
+ "src/core/ext/census/initialize.cc",
+ "src/core/ext/census/intrusive_hash_map.cc",
"src/core/ext/census/intrusive_hash_map.h",
"src/core/ext/census/intrusive_hash_map_internal.h",
- "src/core/ext/census/mlog.c",
+ "src/core/ext/census/mlog.cc",
"src/core/ext/census/mlog.h",
- "src/core/ext/census/operation.c",
- "src/core/ext/census/placeholders.c",
- "src/core/ext/census/resource.c",
+ "src/core/ext/census/operation.cc",
+ "src/core/ext/census/placeholders.cc",
+ "src/core/ext/census/resource.cc",
"src/core/ext/census/resource.h",
"src/core/ext/census/rpc_metric_id.h",
- "src/core/ext/census/trace_context.c",
+ "src/core/ext/census/trace_context.cc",
"src/core/ext/census/trace_context.h",
"src/core/ext/census/trace_label.h",
"src/core/ext/census/trace_propagation.h",
"src/core/ext/census/trace_status.h",
"src/core/ext/census/trace_string.h",
- "src/core/ext/census/tracing.c",
+ "src/core/ext/census/tracing.cc",
"src/core/ext/census/tracing.h"
],
"third_party": false,
@@ -7767,52 +7769,51 @@
"language": "c",
"name": "gpr_base",
"src": [
- "src/core/lib/profiling/basic_timers.c",
- "src/core/lib/profiling/stap_timers.c",
- "src/core/lib/support/alloc.c",
- "src/core/lib/support/arena.c",
- "src/core/lib/support/atm.c",
- "src/core/lib/support/avl.c",
- "src/core/lib/support/backoff.c",
- "src/core/lib/support/cmdline.c",
- "src/core/lib/support/cpu_iphone.c",
- "src/core/lib/support/cpu_linux.c",
- "src/core/lib/support/cpu_posix.c",
- "src/core/lib/support/cpu_windows.c",
- "src/core/lib/support/env_linux.c",
- "src/core/lib/support/env_posix.c",
- "src/core/lib/support/env_windows.c",
- "src/core/lib/support/histogram.c",
- "src/core/lib/support/host_port.c",
- "src/core/lib/support/log.c",
- "src/core/lib/support/log_android.c",
- "src/core/lib/support/log_linux.c",
- "src/core/lib/support/log_posix.c",
- "src/core/lib/support/log_windows.c",
- "src/core/lib/support/mpscq.c",
- "src/core/lib/support/murmur_hash.c",
- "src/core/lib/support/stack_lockfree.c",
- "src/core/lib/support/string.c",
- "src/core/lib/support/string_posix.c",
- "src/core/lib/support/string_util_windows.c",
- "src/core/lib/support/string_windows.c",
- "src/core/lib/support/subprocess_posix.c",
- "src/core/lib/support/subprocess_windows.c",
- "src/core/lib/support/sync.c",
- "src/core/lib/support/sync_posix.c",
- "src/core/lib/support/sync_windows.c",
- "src/core/lib/support/thd.c",
- "src/core/lib/support/thd_posix.c",
- "src/core/lib/support/thd_windows.c",
- "src/core/lib/support/time.c",
- "src/core/lib/support/time_posix.c",
- "src/core/lib/support/time_precise.c",
- "src/core/lib/support/time_windows.c",
- "src/core/lib/support/tls_pthread.c",
- "src/core/lib/support/tmpfile_msys.c",
- "src/core/lib/support/tmpfile_posix.c",
- "src/core/lib/support/tmpfile_windows.c",
- "src/core/lib/support/wrap_memcpy.c"
+ "src/core/lib/profiling/basic_timers.cc",
+ "src/core/lib/profiling/stap_timers.cc",
+ "src/core/lib/support/alloc.cc",
+ "src/core/lib/support/arena.cc",
+ "src/core/lib/support/atm.cc",
+ "src/core/lib/support/avl.cc",
+ "src/core/lib/support/cmdline.cc",
+ "src/core/lib/support/cpu_iphone.cc",
+ "src/core/lib/support/cpu_linux.cc",
+ "src/core/lib/support/cpu_posix.cc",
+ "src/core/lib/support/cpu_windows.cc",
+ "src/core/lib/support/env_linux.cc",
+ "src/core/lib/support/env_posix.cc",
+ "src/core/lib/support/env_windows.cc",
+ "src/core/lib/support/histogram.cc",
+ "src/core/lib/support/host_port.cc",
+ "src/core/lib/support/log.cc",
+ "src/core/lib/support/log_android.cc",
+ "src/core/lib/support/log_linux.cc",
+ "src/core/lib/support/log_posix.cc",
+ "src/core/lib/support/log_windows.cc",
+ "src/core/lib/support/mpscq.cc",
+ "src/core/lib/support/murmur_hash.cc",
+ "src/core/lib/support/stack_lockfree.cc",
+ "src/core/lib/support/string.cc",
+ "src/core/lib/support/string_posix.cc",
+ "src/core/lib/support/string_util_windows.cc",
+ "src/core/lib/support/string_windows.cc",
+ "src/core/lib/support/subprocess_posix.cc",
+ "src/core/lib/support/subprocess_windows.cc",
+ "src/core/lib/support/sync.cc",
+ "src/core/lib/support/sync_posix.cc",
+ "src/core/lib/support/sync_windows.cc",
+ "src/core/lib/support/thd.cc",
+ "src/core/lib/support/thd_posix.cc",
+ "src/core/lib/support/thd_windows.cc",
+ "src/core/lib/support/time.cc",
+ "src/core/lib/support/time_posix.cc",
+ "src/core/lib/support/time_precise.cc",
+ "src/core/lib/support/time_windows.cc",
+ "src/core/lib/support/tls_pthread.cc",
+ "src/core/lib/support/tmpfile_msys.cc",
+ "src/core/lib/support/tmpfile_posix.cc",
+ "src/core/lib/support/tmpfile_windows.cc",
+ "src/core/lib/support/wrap_memcpy.cc"
],
"third_party": false,
"type": "filegroup"
@@ -7854,8 +7855,6 @@
"src/core/lib/support/atomic.h",
"src/core/lib/support/atomic_with_atm.h",
"src/core/lib/support/atomic_with_std.h",
- "src/core/lib/support/backoff.h",
- "src/core/lib/support/block_annotate.h",
"src/core/lib/support/env.h",
"src/core/lib/support/memory.h",
"src/core/lib/support/mpscq.h",
@@ -7903,8 +7902,6 @@
"src/core/lib/support/atomic.h",
"src/core/lib/support/atomic_with_atm.h",
"src/core/lib/support/atomic_with_std.h",
- "src/core/lib/support/backoff.h",
- "src/core/lib/support/block_annotate.h",
"src/core/lib/support/env.h",
"src/core/lib/support/memory.h",
"src/core/lib/support/mpscq.h",
@@ -7997,138 +7994,139 @@
"language": "c",
"name": "grpc_base",
"src": [
- "src/core/lib/channel/channel_args.c",
- "src/core/lib/channel/channel_stack.c",
- "src/core/lib/channel/channel_stack_builder.c",
- "src/core/lib/channel/connected_channel.c",
- "src/core/lib/channel/handshaker.c",
- "src/core/lib/channel/handshaker_factory.c",
- "src/core/lib/channel/handshaker_registry.c",
- "src/core/lib/compression/compression.c",
- "src/core/lib/compression/compression_internal.c",
- "src/core/lib/compression/message_compress.c",
- "src/core/lib/compression/stream_compression.c",
- "src/core/lib/compression/stream_compression_gzip.c",
- "src/core/lib/compression/stream_compression_identity.c",
- "src/core/lib/debug/stats.c",
- "src/core/lib/debug/stats_data.c",
- "src/core/lib/http/format_request.c",
- "src/core/lib/http/httpcli.c",
- "src/core/lib/http/parser.c",
- "src/core/lib/iomgr/call_combiner.c",
- "src/core/lib/iomgr/closure.c",
- "src/core/lib/iomgr/combiner.c",
- "src/core/lib/iomgr/endpoint.c",
- "src/core/lib/iomgr/endpoint_pair_posix.c",
- "src/core/lib/iomgr/endpoint_pair_uv.c",
- "src/core/lib/iomgr/endpoint_pair_windows.c",
- "src/core/lib/iomgr/error.c",
- "src/core/lib/iomgr/ev_epoll1_linux.c",
- "src/core/lib/iomgr/ev_epollex_linux.c",
- "src/core/lib/iomgr/ev_epollsig_linux.c",
- "src/core/lib/iomgr/ev_poll_posix.c",
- "src/core/lib/iomgr/ev_posix.c",
- "src/core/lib/iomgr/ev_windows.c",
- "src/core/lib/iomgr/exec_ctx.c",
- "src/core/lib/iomgr/executor.c",
- "src/core/lib/iomgr/gethostname_fallback.c",
- "src/core/lib/iomgr/gethostname_host_name_max.c",
- "src/core/lib/iomgr/gethostname_sysconf.c",
- "src/core/lib/iomgr/iocp_windows.c",
- "src/core/lib/iomgr/iomgr.c",
- "src/core/lib/iomgr/iomgr_posix.c",
- "src/core/lib/iomgr/iomgr_uv.c",
- "src/core/lib/iomgr/iomgr_windows.c",
- "src/core/lib/iomgr/is_epollexclusive_available.c",
- "src/core/lib/iomgr/load_file.c",
- "src/core/lib/iomgr/lockfree_event.c",
- "src/core/lib/iomgr/network_status_tracker.c",
- "src/core/lib/iomgr/polling_entity.c",
- "src/core/lib/iomgr/pollset_set_uv.c",
- "src/core/lib/iomgr/pollset_set_windows.c",
- "src/core/lib/iomgr/pollset_uv.c",
- "src/core/lib/iomgr/pollset_windows.c",
- "src/core/lib/iomgr/resolve_address_posix.c",
- "src/core/lib/iomgr/resolve_address_uv.c",
- "src/core/lib/iomgr/resolve_address_windows.c",
- "src/core/lib/iomgr/resource_quota.c",
- "src/core/lib/iomgr/sockaddr_utils.c",
- "src/core/lib/iomgr/socket_factory_posix.c",
- "src/core/lib/iomgr/socket_mutator.c",
- "src/core/lib/iomgr/socket_utils_common_posix.c",
- "src/core/lib/iomgr/socket_utils_linux.c",
- "src/core/lib/iomgr/socket_utils_posix.c",
- "src/core/lib/iomgr/socket_utils_uv.c",
- "src/core/lib/iomgr/socket_utils_windows.c",
- "src/core/lib/iomgr/socket_windows.c",
- "src/core/lib/iomgr/tcp_client_posix.c",
- "src/core/lib/iomgr/tcp_client_uv.c",
- "src/core/lib/iomgr/tcp_client_windows.c",
- "src/core/lib/iomgr/tcp_posix.c",
- "src/core/lib/iomgr/tcp_server_posix.c",
- "src/core/lib/iomgr/tcp_server_utils_posix_common.c",
- "src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c",
- "src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c",
- "src/core/lib/iomgr/tcp_server_uv.c",
- "src/core/lib/iomgr/tcp_server_windows.c",
- "src/core/lib/iomgr/tcp_uv.c",
- "src/core/lib/iomgr/tcp_windows.c",
- "src/core/lib/iomgr/time_averaged_stats.c",
- "src/core/lib/iomgr/timer_generic.c",
- "src/core/lib/iomgr/timer_heap.c",
- "src/core/lib/iomgr/timer_manager.c",
- "src/core/lib/iomgr/timer_uv.c",
- "src/core/lib/iomgr/udp_server.c",
- "src/core/lib/iomgr/unix_sockets_posix.c",
- "src/core/lib/iomgr/unix_sockets_posix_noop.c",
- "src/core/lib/iomgr/wakeup_fd_cv.c",
- "src/core/lib/iomgr/wakeup_fd_eventfd.c",
- "src/core/lib/iomgr/wakeup_fd_nospecial.c",
- "src/core/lib/iomgr/wakeup_fd_pipe.c",
- "src/core/lib/iomgr/wakeup_fd_posix.c",
- "src/core/lib/json/json.c",
- "src/core/lib/json/json_reader.c",
- "src/core/lib/json/json_string.c",
- "src/core/lib/json/json_writer.c",
- "src/core/lib/slice/b64.c",
- "src/core/lib/slice/percent_encoding.c",
- "src/core/lib/slice/slice.c",
- "src/core/lib/slice/slice_buffer.c",
- "src/core/lib/slice/slice_hash_table.c",
- "src/core/lib/slice/slice_intern.c",
- "src/core/lib/slice/slice_string_helpers.c",
- "src/core/lib/surface/alarm.c",
- "src/core/lib/surface/api_trace.c",
- "src/core/lib/surface/byte_buffer.c",
- "src/core/lib/surface/byte_buffer_reader.c",
- "src/core/lib/surface/call.c",
- "src/core/lib/surface/call_details.c",
- "src/core/lib/surface/call_log_batch.c",
- "src/core/lib/surface/channel.c",
- "src/core/lib/surface/channel_init.c",
- "src/core/lib/surface/channel_ping.c",
- "src/core/lib/surface/channel_stack_type.c",
- "src/core/lib/surface/completion_queue.c",
- "src/core/lib/surface/completion_queue_factory.c",
- "src/core/lib/surface/event_string.c",
+ "src/core/lib/backoff/backoff.cc",
+ "src/core/lib/channel/channel_args.cc",
+ "src/core/lib/channel/channel_stack.cc",
+ "src/core/lib/channel/channel_stack_builder.cc",
+ "src/core/lib/channel/connected_channel.cc",
+ "src/core/lib/channel/handshaker.cc",
+ "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/message_compress.cc",
+ "src/core/lib/compression/stream_compression.cc",
+ "src/core/lib/compression/stream_compression_gzip.cc",
+ "src/core/lib/compression/stream_compression_identity.cc",
+ "src/core/lib/debug/stats.cc",
+ "src/core/lib/debug/stats_data.cc",
+ "src/core/lib/http/format_request.cc",
+ "src/core/lib/http/httpcli.cc",
+ "src/core/lib/http/parser.cc",
+ "src/core/lib/iomgr/call_combiner.cc",
+ "src/core/lib/iomgr/closure.cc",
+ "src/core/lib/iomgr/combiner.cc",
+ "src/core/lib/iomgr/endpoint.cc",
+ "src/core/lib/iomgr/endpoint_pair_posix.cc",
+ "src/core/lib/iomgr/endpoint_pair_uv.cc",
+ "src/core/lib/iomgr/endpoint_pair_windows.cc",
+ "src/core/lib/iomgr/error.cc",
+ "src/core/lib/iomgr/ev_epoll1_linux.cc",
+ "src/core/lib/iomgr/ev_epollex_linux.cc",
+ "src/core/lib/iomgr/ev_epollsig_linux.cc",
+ "src/core/lib/iomgr/ev_poll_posix.cc",
+ "src/core/lib/iomgr/ev_posix.cc",
+ "src/core/lib/iomgr/ev_windows.cc",
+ "src/core/lib/iomgr/exec_ctx.cc",
+ "src/core/lib/iomgr/executor.cc",
+ "src/core/lib/iomgr/gethostname_fallback.cc",
+ "src/core/lib/iomgr/gethostname_host_name_max.cc",
+ "src/core/lib/iomgr/gethostname_sysconf.cc",
+ "src/core/lib/iomgr/iocp_windows.cc",
+ "src/core/lib/iomgr/iomgr.cc",
+ "src/core/lib/iomgr/iomgr_posix.cc",
+ "src/core/lib/iomgr/iomgr_uv.cc",
+ "src/core/lib/iomgr/iomgr_windows.cc",
+ "src/core/lib/iomgr/is_epollexclusive_available.cc",
+ "src/core/lib/iomgr/load_file.cc",
+ "src/core/lib/iomgr/lockfree_event.cc",
+ "src/core/lib/iomgr/network_status_tracker.cc",
+ "src/core/lib/iomgr/polling_entity.cc",
+ "src/core/lib/iomgr/pollset_set_uv.cc",
+ "src/core/lib/iomgr/pollset_set_windows.cc",
+ "src/core/lib/iomgr/pollset_uv.cc",
+ "src/core/lib/iomgr/pollset_windows.cc",
+ "src/core/lib/iomgr/resolve_address_posix.cc",
+ "src/core/lib/iomgr/resolve_address_uv.cc",
+ "src/core/lib/iomgr/resolve_address_windows.cc",
+ "src/core/lib/iomgr/resource_quota.cc",
+ "src/core/lib/iomgr/sockaddr_utils.cc",
+ "src/core/lib/iomgr/socket_factory_posix.cc",
+ "src/core/lib/iomgr/socket_mutator.cc",
+ "src/core/lib/iomgr/socket_utils_common_posix.cc",
+ "src/core/lib/iomgr/socket_utils_linux.cc",
+ "src/core/lib/iomgr/socket_utils_posix.cc",
+ "src/core/lib/iomgr/socket_utils_uv.cc",
+ "src/core/lib/iomgr/socket_utils_windows.cc",
+ "src/core/lib/iomgr/socket_windows.cc",
+ "src/core/lib/iomgr/tcp_client_posix.cc",
+ "src/core/lib/iomgr/tcp_client_uv.cc",
+ "src/core/lib/iomgr/tcp_client_windows.cc",
+ "src/core/lib/iomgr/tcp_posix.cc",
+ "src/core/lib/iomgr/tcp_server_posix.cc",
+ "src/core/lib/iomgr/tcp_server_utils_posix_common.cc",
+ "src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc",
+ "src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc",
+ "src/core/lib/iomgr/tcp_server_uv.cc",
+ "src/core/lib/iomgr/tcp_server_windows.cc",
+ "src/core/lib/iomgr/tcp_uv.cc",
+ "src/core/lib/iomgr/tcp_windows.cc",
+ "src/core/lib/iomgr/time_averaged_stats.cc",
+ "src/core/lib/iomgr/timer_generic.cc",
+ "src/core/lib/iomgr/timer_heap.cc",
+ "src/core/lib/iomgr/timer_manager.cc",
+ "src/core/lib/iomgr/timer_uv.cc",
+ "src/core/lib/iomgr/udp_server.cc",
+ "src/core/lib/iomgr/unix_sockets_posix.cc",
+ "src/core/lib/iomgr/unix_sockets_posix_noop.cc",
+ "src/core/lib/iomgr/wakeup_fd_cv.cc",
+ "src/core/lib/iomgr/wakeup_fd_eventfd.cc",
+ "src/core/lib/iomgr/wakeup_fd_nospecial.cc",
+ "src/core/lib/iomgr/wakeup_fd_pipe.cc",
+ "src/core/lib/iomgr/wakeup_fd_posix.cc",
+ "src/core/lib/json/json.cc",
+ "src/core/lib/json/json_reader.cc",
+ "src/core/lib/json/json_string.cc",
+ "src/core/lib/json/json_writer.cc",
+ "src/core/lib/slice/b64.cc",
+ "src/core/lib/slice/percent_encoding.cc",
+ "src/core/lib/slice/slice.cc",
+ "src/core/lib/slice/slice_buffer.cc",
+ "src/core/lib/slice/slice_hash_table.cc",
+ "src/core/lib/slice/slice_intern.cc",
+ "src/core/lib/slice/slice_string_helpers.cc",
+ "src/core/lib/surface/alarm.cc",
+ "src/core/lib/surface/api_trace.cc",
+ "src/core/lib/surface/byte_buffer.cc",
+ "src/core/lib/surface/byte_buffer_reader.cc",
+ "src/core/lib/surface/call.cc",
+ "src/core/lib/surface/call_details.cc",
+ "src/core/lib/surface/call_log_batch.cc",
+ "src/core/lib/surface/channel.cc",
+ "src/core/lib/surface/channel_init.cc",
+ "src/core/lib/surface/channel_ping.cc",
+ "src/core/lib/surface/channel_stack_type.cc",
+ "src/core/lib/surface/completion_queue.cc",
+ "src/core/lib/surface/completion_queue_factory.cc",
+ "src/core/lib/surface/event_string.cc",
"src/core/lib/surface/lame_client.cc",
- "src/core/lib/surface/metadata_array.c",
- "src/core/lib/surface/server.c",
- "src/core/lib/surface/validate_metadata.c",
- "src/core/lib/surface/version.c",
- "src/core/lib/transport/bdp_estimator.c",
- "src/core/lib/transport/byte_stream.c",
- "src/core/lib/transport/connectivity_state.c",
- "src/core/lib/transport/error_utils.c",
- "src/core/lib/transport/metadata.c",
- "src/core/lib/transport/metadata_batch.c",
- "src/core/lib/transport/pid_controller.c",
- "src/core/lib/transport/service_config.c",
- "src/core/lib/transport/static_metadata.c",
- "src/core/lib/transport/status_conversion.c",
- "src/core/lib/transport/timeout_encoding.c",
- "src/core/lib/transport/transport.c",
- "src/core/lib/transport/transport_op_string.c"
+ "src/core/lib/surface/metadata_array.cc",
+ "src/core/lib/surface/server.cc",
+ "src/core/lib/surface/validate_metadata.cc",
+ "src/core/lib/surface/version.cc",
+ "src/core/lib/transport/bdp_estimator.cc",
+ "src/core/lib/transport/byte_stream.cc",
+ "src/core/lib/transport/connectivity_state.cc",
+ "src/core/lib/transport/error_utils.cc",
+ "src/core/lib/transport/metadata.cc",
+ "src/core/lib/transport/metadata_batch.cc",
+ "src/core/lib/transport/pid_controller.cc",
+ "src/core/lib/transport/service_config.cc",
+ "src/core/lib/transport/static_metadata.cc",
+ "src/core/lib/transport/status_conversion.cc",
+ "src/core/lib/transport/timeout_encoding.cc",
+ "src/core/lib/transport/transport.cc",
+ "src/core/lib/transport/transport_op_string.cc"
],
"third_party": false,
"type": "filegroup"
@@ -8151,6 +8149,7 @@
"include/grpc/slice_buffer.h",
"include/grpc/status.h",
"include/grpc/support/workaround_list.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",
@@ -8170,6 +8169,7 @@
"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",
@@ -8285,6 +8285,7 @@
"include/grpc/slice_buffer.h",
"include/grpc/status.h",
"include/grpc/support/workaround_list.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",
@@ -8304,6 +8305,7 @@
"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",
@@ -8437,43 +8439,43 @@
"language": "c",
"name": "grpc_client_channel",
"src": [
- "src/core/ext/filters/client_channel/channel_connectivity.c",
- "src/core/ext/filters/client_channel/client_channel.c",
+ "src/core/ext/filters/client_channel/channel_connectivity.cc",
+ "src/core/ext/filters/client_channel/client_channel.cc",
"src/core/ext/filters/client_channel/client_channel.h",
- "src/core/ext/filters/client_channel/client_channel_factory.c",
+ "src/core/ext/filters/client_channel/client_channel_factory.cc",
"src/core/ext/filters/client_channel/client_channel_factory.h",
- "src/core/ext/filters/client_channel/client_channel_plugin.c",
- "src/core/ext/filters/client_channel/connector.c",
+ "src/core/ext/filters/client_channel/client_channel_plugin.cc",
+ "src/core/ext/filters/client_channel/connector.cc",
"src/core/ext/filters/client_channel/connector.h",
- "src/core/ext/filters/client_channel/http_connect_handshaker.c",
+ "src/core/ext/filters/client_channel/http_connect_handshaker.cc",
"src/core/ext/filters/client_channel/http_connect_handshaker.h",
- "src/core/ext/filters/client_channel/http_proxy.c",
+ "src/core/ext/filters/client_channel/http_proxy.cc",
"src/core/ext/filters/client_channel/http_proxy.h",
- "src/core/ext/filters/client_channel/lb_policy.c",
+ "src/core/ext/filters/client_channel/lb_policy.cc",
"src/core/ext/filters/client_channel/lb_policy.h",
- "src/core/ext/filters/client_channel/lb_policy_factory.c",
+ "src/core/ext/filters/client_channel/lb_policy_factory.cc",
"src/core/ext/filters/client_channel/lb_policy_factory.h",
- "src/core/ext/filters/client_channel/lb_policy_registry.c",
+ "src/core/ext/filters/client_channel/lb_policy_registry.cc",
"src/core/ext/filters/client_channel/lb_policy_registry.h",
- "src/core/ext/filters/client_channel/parse_address.c",
+ "src/core/ext/filters/client_channel/parse_address.cc",
"src/core/ext/filters/client_channel/parse_address.h",
- "src/core/ext/filters/client_channel/proxy_mapper.c",
+ "src/core/ext/filters/client_channel/proxy_mapper.cc",
"src/core/ext/filters/client_channel/proxy_mapper.h",
- "src/core/ext/filters/client_channel/proxy_mapper_registry.c",
+ "src/core/ext/filters/client_channel/proxy_mapper_registry.cc",
"src/core/ext/filters/client_channel/proxy_mapper_registry.h",
- "src/core/ext/filters/client_channel/resolver.c",
+ "src/core/ext/filters/client_channel/resolver.cc",
"src/core/ext/filters/client_channel/resolver.h",
- "src/core/ext/filters/client_channel/resolver_factory.c",
+ "src/core/ext/filters/client_channel/resolver_factory.cc",
"src/core/ext/filters/client_channel/resolver_factory.h",
- "src/core/ext/filters/client_channel/resolver_registry.c",
+ "src/core/ext/filters/client_channel/resolver_registry.cc",
"src/core/ext/filters/client_channel/resolver_registry.h",
- "src/core/ext/filters/client_channel/retry_throttle.c",
+ "src/core/ext/filters/client_channel/retry_throttle.cc",
"src/core/ext/filters/client_channel/retry_throttle.h",
- "src/core/ext/filters/client_channel/subchannel.c",
+ "src/core/ext/filters/client_channel/subchannel.cc",
"src/core/ext/filters/client_channel/subchannel.h",
- "src/core/ext/filters/client_channel/subchannel_index.c",
+ "src/core/ext/filters/client_channel/subchannel_index.cc",
"src/core/ext/filters/client_channel/subchannel_index.h",
- "src/core/ext/filters/client_channel/uri_parser.c",
+ "src/core/ext/filters/client_channel/uri_parser.cc",
"src/core/ext/filters/client_channel/uri_parser.h"
],
"third_party": false,
@@ -8523,7 +8525,7 @@
"language": "c",
"name": "grpc_deadline_filter",
"src": [
- "src/core/ext/filters/deadline/deadline_filter.c",
+ "src/core/ext/filters/deadline/deadline_filter.cc",
"src/core/ext/filters/deadline/deadline_filter.h"
],
"third_party": false,
@@ -8543,12 +8545,12 @@
"language": "c",
"name": "grpc_http_filters",
"src": [
- "src/core/ext/filters/http/client/http_client_filter.c",
+ "src/core/ext/filters/http/client/http_client_filter.cc",
"src/core/ext/filters/http/client/http_client_filter.h",
- "src/core/ext/filters/http/http_filters_plugin.c",
- "src/core/ext/filters/http/message_compress/message_compress_filter.c",
+ "src/core/ext/filters/http/http_filters_plugin.cc",
+ "src/core/ext/filters/http/message_compress/message_compress_filter.cc",
"src/core/ext/filters/http/message_compress/message_compress_filter.h",
- "src/core/ext/filters/http/server/http_server_filter.c",
+ "src/core/ext/filters/http/server/http_server_filter.cc",
"src/core/ext/filters/http/server/http_server_filter.h"
],
"third_party": false,
@@ -8574,15 +8576,15 @@
"language": "c",
"name": "grpc_lb_policy_grpclb",
"src": [
- "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc",
"src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h",
- "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc",
"src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h",
- "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.c",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc",
"src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h",
- "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc",
"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.c",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc",
"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.c",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h"
@@ -8611,15 +8613,15 @@
"language": "c",
"name": "grpc_lb_policy_grpclb_secure",
"src": [
- "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc",
"src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h",
- "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc",
"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_channel_secure.c",
- "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc",
"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.c",
+ "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc",
"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.c",
"src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h"
@@ -8638,7 +8640,7 @@
"language": "c",
"name": "grpc_lb_policy_pick_first",
"src": [
- "src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c"
+ "src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc"
],
"third_party": false,
"type": "filegroup"
@@ -8654,7 +8656,7 @@
"language": "c",
"name": "grpc_lb_policy_round_robin",
"src": [
- "src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c"
+ "src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc"
],
"third_party": false,
"type": "filegroup"
@@ -8671,7 +8673,7 @@
"language": "c",
"name": "grpc_max_age_filter",
"src": [
- "src/core/ext/filters/max_age/max_age_filter.c",
+ "src/core/ext/filters/max_age/max_age_filter.cc",
"src/core/ext/filters/max_age/max_age_filter.h"
],
"third_party": false,
@@ -8689,7 +8691,7 @@
"language": "c",
"name": "grpc_message_size_filter",
"src": [
- "src/core/ext/filters/message_size/message_size_filter.c",
+ "src/core/ext/filters/message_size/message_size_filter.cc",
"src/core/ext/filters/message_size/message_size_filter.h"
],
"third_party": false,
@@ -8709,12 +8711,12 @@
"language": "c",
"name": "grpc_resolver_dns_ares",
"src": [
- "src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c",
+ "src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc",
"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_ev_driver_posix.c",
- "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c",
+ "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc",
+ "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc",
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h",
- "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c"
+ "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc"
],
"third_party": false,
"type": "filegroup"
@@ -8730,7 +8732,7 @@
"language": "c",
"name": "grpc_resolver_dns_native",
"src": [
- "src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c"
+ "src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc"
],
"third_party": false,
"type": "filegroup"
@@ -8748,7 +8750,7 @@
"language": "c",
"name": "grpc_resolver_fake",
"src": [
- "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c",
+ "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc",
"src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h"
],
"third_party": false,
@@ -8765,7 +8767,7 @@
"language": "c",
"name": "grpc_resolver_sockaddr",
"src": [
- "src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c"
+ "src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc"
],
"third_party": false,
"type": "filegroup"
@@ -8804,49 +8806,49 @@
"name": "grpc_secure",
"src": [
"include/grpc/grpc_security.h",
- "src/core/lib/http/httpcli_security_connector.c",
- "src/core/lib/security/context/security_context.c",
+ "src/core/lib/http/httpcli_security_connector.cc",
+ "src/core/lib/security/context/security_context.cc",
"src/core/lib/security/context/security_context.h",
- "src/core/lib/security/credentials/composite/composite_credentials.c",
+ "src/core/lib/security/credentials/composite/composite_credentials.cc",
"src/core/lib/security/credentials/composite/composite_credentials.h",
- "src/core/lib/security/credentials/credentials.c",
+ "src/core/lib/security/credentials/credentials.cc",
"src/core/lib/security/credentials/credentials.h",
- "src/core/lib/security/credentials/credentials_metadata.c",
- "src/core/lib/security/credentials/fake/fake_credentials.c",
+ "src/core/lib/security/credentials/credentials_metadata.cc",
+ "src/core/lib/security/credentials/fake/fake_credentials.cc",
"src/core/lib/security/credentials/fake/fake_credentials.h",
- "src/core/lib/security/credentials/google_default/credentials_generic.c",
- "src/core/lib/security/credentials/google_default/google_default_credentials.c",
+ "src/core/lib/security/credentials/google_default/credentials_generic.cc",
+ "src/core/lib/security/credentials/google_default/google_default_credentials.cc",
"src/core/lib/security/credentials/google_default/google_default_credentials.h",
- "src/core/lib/security/credentials/iam/iam_credentials.c",
+ "src/core/lib/security/credentials/iam/iam_credentials.cc",
"src/core/lib/security/credentials/iam/iam_credentials.h",
- "src/core/lib/security/credentials/jwt/json_token.c",
+ "src/core/lib/security/credentials/jwt/json_token.cc",
"src/core/lib/security/credentials/jwt/json_token.h",
- "src/core/lib/security/credentials/jwt/jwt_credentials.c",
+ "src/core/lib/security/credentials/jwt/jwt_credentials.cc",
"src/core/lib/security/credentials/jwt/jwt_credentials.h",
- "src/core/lib/security/credentials/jwt/jwt_verifier.c",
+ "src/core/lib/security/credentials/jwt/jwt_verifier.cc",
"src/core/lib/security/credentials/jwt/jwt_verifier.h",
- "src/core/lib/security/credentials/oauth2/oauth2_credentials.c",
+ "src/core/lib/security/credentials/oauth2/oauth2_credentials.cc",
"src/core/lib/security/credentials/oauth2/oauth2_credentials.h",
- "src/core/lib/security/credentials/plugin/plugin_credentials.c",
+ "src/core/lib/security/credentials/plugin/plugin_credentials.cc",
"src/core/lib/security/credentials/plugin/plugin_credentials.h",
- "src/core/lib/security/credentials/ssl/ssl_credentials.c",
+ "src/core/lib/security/credentials/ssl/ssl_credentials.cc",
"src/core/lib/security/credentials/ssl/ssl_credentials.h",
"src/core/lib/security/transport/auth_filters.h",
- "src/core/lib/security/transport/client_auth_filter.c",
- "src/core/lib/security/transport/lb_targets_info.c",
+ "src/core/lib/security/transport/client_auth_filter.cc",
+ "src/core/lib/security/transport/lb_targets_info.cc",
"src/core/lib/security/transport/lb_targets_info.h",
- "src/core/lib/security/transport/secure_endpoint.c",
+ "src/core/lib/security/transport/secure_endpoint.cc",
"src/core/lib/security/transport/secure_endpoint.h",
- "src/core/lib/security/transport/security_connector.c",
+ "src/core/lib/security/transport/security_connector.cc",
"src/core/lib/security/transport/security_connector.h",
- "src/core/lib/security/transport/security_handshaker.c",
+ "src/core/lib/security/transport/security_handshaker.cc",
"src/core/lib/security/transport/security_handshaker.h",
- "src/core/lib/security/transport/server_auth_filter.c",
- "src/core/lib/security/transport/tsi_error.c",
+ "src/core/lib/security/transport/server_auth_filter.cc",
+ "src/core/lib/security/transport/tsi_error.cc",
"src/core/lib/security/transport/tsi_error.h",
- "src/core/lib/security/util/json_util.c",
+ "src/core/lib/security/util/json_util.cc",
"src/core/lib/security/util/json_util.h",
- "src/core/lib/surface/init_secure.c"
+ "src/core/lib/surface/init_secure.cc"
],
"third_party": false,
"type": "filegroup"
@@ -8863,7 +8865,7 @@
"language": "c",
"name": "grpc_server_backward_compatibility",
"src": [
- "src/core/ext/filters/workarounds/workaround_utils.c",
+ "src/core/ext/filters/workarounds/workaround_utils.cc",
"src/core/ext/filters/workarounds/workaround_utils.h"
],
"third_party": false,
@@ -8882,9 +8884,9 @@
"language": "c",
"name": "grpc_server_load_reporting",
"src": [
- "src/core/ext/filters/load_reporting/server_load_reporting_filter.c",
+ "src/core/ext/filters/load_reporting/server_load_reporting_filter.cc",
"src/core/ext/filters/load_reporting/server_load_reporting_filter.h",
- "src/core/ext/filters/load_reporting/server_load_reporting_plugin.c",
+ "src/core/ext/filters/load_reporting/server_load_reporting_plugin.cc",
"src/core/ext/filters/load_reporting/server_load_reporting_plugin.h"
],
"third_party": false,
@@ -8919,7 +8921,7 @@
"language": "c",
"name": "grpc_test_util_base",
"src": [
- "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c",
+ "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc",
"src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h",
"test/core/end2end/cq_verifier.c",
"test/core/end2end/cq_verifier.h",
@@ -8956,6 +8958,7 @@
{
"deps": [
"gpr",
+ "grpc_base_headers",
"grpc_trace_headers"
],
"headers": [],
@@ -8963,7 +8966,7 @@
"language": "c",
"name": "grpc_trace",
"src": [
- "src/core/lib/debug/trace.c"
+ "src/core/lib/debug/trace.cc"
],
"third_party": false,
"type": "filegroup"
@@ -9016,47 +9019,47 @@
"language": "c",
"name": "grpc_transport_chttp2",
"src": [
- "src/core/ext/transport/chttp2/transport/bin_decoder.c",
+ "src/core/ext/transport/chttp2/transport/bin_decoder.cc",
"src/core/ext/transport/chttp2/transport/bin_decoder.h",
- "src/core/ext/transport/chttp2/transport/bin_encoder.c",
+ "src/core/ext/transport/chttp2/transport/bin_encoder.cc",
"src/core/ext/transport/chttp2/transport/bin_encoder.h",
- "src/core/ext/transport/chttp2/transport/chttp2_plugin.c",
- "src/core/ext/transport/chttp2/transport/chttp2_transport.c",
+ "src/core/ext/transport/chttp2/transport/chttp2_plugin.cc",
+ "src/core/ext/transport/chttp2/transport/chttp2_transport.cc",
"src/core/ext/transport/chttp2/transport/chttp2_transport.h",
- "src/core/ext/transport/chttp2/transport/flow_control.c",
+ "src/core/ext/transport/chttp2/transport/flow_control.cc",
"src/core/ext/transport/chttp2/transport/frame.h",
- "src/core/ext/transport/chttp2/transport/frame_data.c",
+ "src/core/ext/transport/chttp2/transport/frame_data.cc",
"src/core/ext/transport/chttp2/transport/frame_data.h",
- "src/core/ext/transport/chttp2/transport/frame_goaway.c",
+ "src/core/ext/transport/chttp2/transport/frame_goaway.cc",
"src/core/ext/transport/chttp2/transport/frame_goaway.h",
- "src/core/ext/transport/chttp2/transport/frame_ping.c",
+ "src/core/ext/transport/chttp2/transport/frame_ping.cc",
"src/core/ext/transport/chttp2/transport/frame_ping.h",
- "src/core/ext/transport/chttp2/transport/frame_rst_stream.c",
+ "src/core/ext/transport/chttp2/transport/frame_rst_stream.cc",
"src/core/ext/transport/chttp2/transport/frame_rst_stream.h",
- "src/core/ext/transport/chttp2/transport/frame_settings.c",
+ "src/core/ext/transport/chttp2/transport/frame_settings.cc",
"src/core/ext/transport/chttp2/transport/frame_settings.h",
- "src/core/ext/transport/chttp2/transport/frame_window_update.c",
+ "src/core/ext/transport/chttp2/transport/frame_window_update.cc",
"src/core/ext/transport/chttp2/transport/frame_window_update.h",
- "src/core/ext/transport/chttp2/transport/hpack_encoder.c",
+ "src/core/ext/transport/chttp2/transport/hpack_encoder.cc",
"src/core/ext/transport/chttp2/transport/hpack_encoder.h",
- "src/core/ext/transport/chttp2/transport/hpack_parser.c",
+ "src/core/ext/transport/chttp2/transport/hpack_parser.cc",
"src/core/ext/transport/chttp2/transport/hpack_parser.h",
- "src/core/ext/transport/chttp2/transport/hpack_table.c",
+ "src/core/ext/transport/chttp2/transport/hpack_table.cc",
"src/core/ext/transport/chttp2/transport/hpack_table.h",
- "src/core/ext/transport/chttp2/transport/http2_settings.c",
+ "src/core/ext/transport/chttp2/transport/http2_settings.cc",
"src/core/ext/transport/chttp2/transport/http2_settings.h",
- "src/core/ext/transport/chttp2/transport/huffsyms.c",
+ "src/core/ext/transport/chttp2/transport/huffsyms.cc",
"src/core/ext/transport/chttp2/transport/huffsyms.h",
- "src/core/ext/transport/chttp2/transport/incoming_metadata.c",
+ "src/core/ext/transport/chttp2/transport/incoming_metadata.cc",
"src/core/ext/transport/chttp2/transport/incoming_metadata.h",
"src/core/ext/transport/chttp2/transport/internal.h",
- "src/core/ext/transport/chttp2/transport/parsing.c",
- "src/core/ext/transport/chttp2/transport/stream_lists.c",
- "src/core/ext/transport/chttp2/transport/stream_map.c",
+ "src/core/ext/transport/chttp2/transport/parsing.cc",
+ "src/core/ext/transport/chttp2/transport/stream_lists.cc",
+ "src/core/ext/transport/chttp2/transport/stream_map.cc",
"src/core/ext/transport/chttp2/transport/stream_map.h",
- "src/core/ext/transport/chttp2/transport/varint.c",
+ "src/core/ext/transport/chttp2/transport/varint.cc",
"src/core/ext/transport/chttp2/transport/varint.h",
- "src/core/ext/transport/chttp2/transport/writing.c"
+ "src/core/ext/transport/chttp2/transport/writing.cc"
],
"third_party": false,
"type": "filegroup"
@@ -9072,7 +9075,7 @@
"language": "c",
"name": "grpc_transport_chttp2_alpn",
"src": [
- "src/core/ext/transport/chttp2/alpn/alpn.c",
+ "src/core/ext/transport/chttp2/alpn/alpn.cc",
"src/core/ext/transport/chttp2/alpn/alpn.h"
],
"third_party": false,
@@ -9092,7 +9095,7 @@
"language": "c",
"name": "grpc_transport_chttp2_client_connector",
"src": [
- "src/core/ext/transport/chttp2/client/chttp2_connector.c",
+ "src/core/ext/transport/chttp2/client/chttp2_connector.cc",
"src/core/ext/transport/chttp2/client/chttp2_connector.h"
],
"third_party": false,
@@ -9111,8 +9114,8 @@
"language": "c",
"name": "grpc_transport_chttp2_client_insecure",
"src": [
- "src/core/ext/transport/chttp2/client/insecure/channel_create.c",
- "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c"
+ "src/core/ext/transport/chttp2/client/insecure/channel_create.cc",
+ "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc"
],
"third_party": false,
"type": "filegroup"
@@ -9131,7 +9134,7 @@
"language": "c",
"name": "grpc_transport_chttp2_client_secure",
"src": [
- "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c"
+ "src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc"
],
"third_party": false,
"type": "filegroup"
@@ -9149,7 +9152,7 @@
"language": "c",
"name": "grpc_transport_chttp2_server",
"src": [
- "src/core/ext/transport/chttp2/server/chttp2_server.c",
+ "src/core/ext/transport/chttp2/server/chttp2_server.cc",
"src/core/ext/transport/chttp2/server/chttp2_server.h"
],
"third_party": false,
@@ -9167,8 +9170,8 @@
"language": "c",
"name": "grpc_transport_chttp2_server_insecure",
"src": [
- "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c",
- "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c"
+ "src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc",
+ "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc"
],
"third_party": false,
"type": "filegroup"
@@ -9186,7 +9189,7 @@
"language": "c",
"name": "grpc_transport_chttp2_server_secure",
"src": [
- "src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c"
+ "src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc"
],
"third_party": false,
"type": "filegroup"
@@ -9211,9 +9214,9 @@
"include/grpc/grpc_cronet.h",
"include/grpc/grpc_security.h",
"include/grpc/grpc_security_constants.h",
- "src/core/ext/transport/cronet/client/secure/cronet_channel_create.c",
- "src/core/ext/transport/cronet/transport/cronet_api_dummy.c",
- "src/core/ext/transport/cronet/transport/cronet_transport.c",
+ "src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc",
+ "src/core/ext/transport/cronet/transport/cronet_api_dummy.cc",
+ "src/core/ext/transport/cronet/transport/cronet_transport.cc",
"src/core/ext/transport/cronet/transport/cronet_transport.h"
],
"third_party": false,
@@ -9230,8 +9233,8 @@
"language": "c",
"name": "grpc_transport_inproc",
"src": [
- "src/core/ext/transport/inproc/inproc_plugin.c",
- "src/core/ext/transport/inproc/inproc_transport.c"
+ "src/core/ext/transport/inproc/inproc_plugin.cc",
+ "src/core/ext/transport/inproc/inproc_transport.cc"
],
"third_party": false,
"type": "filegroup"
@@ -9266,7 +9269,7 @@
"language": "c",
"name": "grpc_workaround_cronet_compression_filter",
"src": [
- "src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c",
+ "src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc",
"src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h"
],
"third_party": false,
@@ -9334,14 +9337,14 @@
"language": "c",
"name": "tsi",
"src": [
- "src/core/tsi/fake_transport_security.c",
+ "src/core/tsi/fake_transport_security.cc",
"src/core/tsi/fake_transport_security.h",
- "src/core/tsi/gts_transport_security.c",
+ "src/core/tsi/gts_transport_security.cc",
"src/core/tsi/gts_transport_security.h",
- "src/core/tsi/ssl_transport_security.c",
+ "src/core/tsi/ssl_transport_security.cc",
"src/core/tsi/ssl_transport_security.h",
"src/core/tsi/ssl_types.h",
- "src/core/tsi/transport_security_grpc.c",
+ "src/core/tsi/transport_security_grpc.cc",
"src/core/tsi/transport_security_grpc.h"
],
"third_party": false,
@@ -9361,9 +9364,9 @@
"language": "c",
"name": "tsi_interface",
"src": [
- "src/core/tsi/transport_security.c",
+ "src/core/tsi/transport_security.cc",
"src/core/tsi/transport_security.h",
- "src/core/tsi/transport_security_adapter.c",
+ "src/core/tsi/transport_security_adapter.cc",
"src/core/tsi/transport_security_adapter.h",
"src/core/tsi/transport_security_interface.h"
],
diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json
index 72dfbc0b98..83418423a2 100644
--- a/tools/run_tests/generated/tests.json
+++ b/tools/run_tests/generated/tests.json
@@ -121,6 +121,28 @@
],
"cpu_cost": 1.0,
"exclude_configs": [],
+ "exclude_iomgrs": [],
+ "flaky": false,
+ "gtest": false,
+ "language": "c",
+ "name": "backoff_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ]
+ },
+ {
+ "args": [],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
"exclude_iomgrs": [
"uv"
],
@@ -805,28 +827,6 @@
"flaky": false,
"gtest": false,
"language": "c",
- "name": "gpr_backoff_test",
- "platforms": [
- "linux",
- "mac",
- "posix",
- "windows"
- ]
- },
- {
- "args": [],
- "ci_platforms": [
- "linux",
- "mac",
- "posix",
- "windows"
- ],
- "cpu_cost": 1.0,
- "exclude_configs": [],
- "exclude_iomgrs": [],
- "flaky": false,
- "gtest": false,
- "language": "c",
"name": "gpr_cmdline_test",
"platforms": [
"linux",
@@ -49542,7 +49542,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_1channel_100rpcs_1MB",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -49567,7 +49567,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_client_1channel_1MB",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -49592,7 +49592,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_ping_pong_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -49617,7 +49617,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -49642,7 +49642,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_1mps_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -49667,7 +49667,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_10mps_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -49692,7 +49692,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_1channel_1MBmsg_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -49717,7 +49717,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_64KBmsg_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -49742,7 +49742,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_2waysharedcq_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -49767,7 +49767,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_2waysharedcq_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -49792,7 +49792,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_2waysharedcq_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -49817,7 +49817,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -49844,7 +49844,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -49869,7 +49869,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_client_unary_1channel_64wide_128Breq_8MBresp_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -49896,7 +49896,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_streaming_qps_unconstrained_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -49921,7 +49921,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_secure_1MB",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -49946,7 +49946,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_unary_ping_pong_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -49971,7 +49971,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -49996,7 +49996,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50021,7 +50021,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50046,7 +50046,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_ping_pong_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50071,7 +50071,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50096,7 +50096,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_1mps_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50121,7 +50121,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_10mps_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50146,7 +50146,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_ping_pong_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50171,7 +50171,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50196,7 +50196,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_1mps_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50221,7 +50221,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_10mps_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50246,7 +50246,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_client_ping_pong_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50271,7 +50271,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_client_qps_unconstrained_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50296,7 +50296,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_client_ping_pong_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50321,7 +50321,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_client_qps_unconstrained_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50346,7 +50346,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_server_ping_pong_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50371,7 +50371,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_server_qps_unconstrained_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50396,7 +50396,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_server_ping_pong_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50421,7 +50421,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_server_qps_unconstrained_secure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50446,7 +50446,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_ping_pong_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50471,7 +50471,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50496,7 +50496,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_1mps_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50521,7 +50521,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_10mps_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50546,7 +50546,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_1channel_1MBmsg_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50571,7 +50571,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_64KBmsg_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50596,7 +50596,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_2waysharedcq_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50621,7 +50621,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_2waysharedcq_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50646,7 +50646,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_2waysharedcq_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50671,7 +50671,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50698,7 +50698,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50723,7 +50723,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_client_unary_1channel_64wide_128Breq_8MBresp_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50750,7 +50750,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_streaming_qps_unconstrained_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50775,7 +50775,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_insecure_1MB",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50800,7 +50800,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_unary_ping_pong_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50825,7 +50825,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50850,7 +50850,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50875,7 +50875,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50900,7 +50900,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_ping_pong_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50925,7 +50925,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50950,7 +50950,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_1mps_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -50975,7 +50975,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_10mps_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51000,7 +51000,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_ping_pong_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51025,7 +51025,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51050,7 +51050,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_1mps_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51075,7 +51075,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_10mps_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51100,7 +51100,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_client_ping_pong_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51125,7 +51125,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_client_qps_unconstrained_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51150,7 +51150,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_client_ping_pong_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51175,7 +51175,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_client_qps_unconstrained_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51200,7 +51200,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_server_ping_pong_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51225,7 +51225,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_server_qps_unconstrained_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51250,7 +51250,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_server_ping_pong_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51275,7 +51275,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_server_qps_unconstrained_insecure",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51313,7 +51313,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_1channel_100rpcs_1MB_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51351,7 +51351,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_client_1channel_1MB_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51389,7 +51389,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_ping_pong_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51427,7 +51427,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51465,7 +51465,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_1mps_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51503,7 +51503,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_10mps_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51541,7 +51541,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_1channel_1MBmsg_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51579,7 +51579,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_64KBmsg_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51617,7 +51617,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_2waysharedcq_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51655,7 +51655,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_2waysharedcq_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51693,7 +51693,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_2waysharedcq_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51731,7 +51731,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51771,7 +51771,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51809,7 +51809,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_client_unary_1channel_64wide_128Breq_8MBresp_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51849,7 +51849,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_streaming_qps_unconstrained_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51887,7 +51887,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_secure_1MB_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51925,7 +51925,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_unary_ping_pong_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -51963,7 +51963,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52001,7 +52001,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52039,7 +52039,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52077,7 +52077,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_ping_pong_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52115,7 +52115,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52153,7 +52153,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_1mps_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52191,7 +52191,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_10mps_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52229,7 +52229,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_ping_pong_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52267,7 +52267,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52305,7 +52305,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_1mps_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52343,7 +52343,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_10mps_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52381,7 +52381,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_client_ping_pong_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52419,7 +52419,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_client_qps_unconstrained_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52457,7 +52457,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_client_ping_pong_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52495,7 +52495,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_client_qps_unconstrained_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52533,7 +52533,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_server_ping_pong_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52571,7 +52571,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_server_qps_unconstrained_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52609,7 +52609,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_server_ping_pong_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52647,7 +52647,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_server_qps_unconstrained_secure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52685,7 +52685,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_ping_pong_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52723,7 +52723,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52761,7 +52761,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_1mps_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52799,7 +52799,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_10mps_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52837,7 +52837,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_1channel_1MBmsg_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52875,7 +52875,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_64KBmsg_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52913,7 +52913,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_2waysharedcq_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52951,7 +52951,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_2waysharedcq_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -52989,7 +52989,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_2waysharedcq_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53027,7 +53027,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53067,7 +53067,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53105,7 +53105,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_client_unary_1channel_64wide_128Breq_8MBresp_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53145,7 +53145,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_streaming_qps_unconstrained_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53183,7 +53183,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_insecure_1MB_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53221,7 +53221,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_unary_ping_pong_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53259,7 +53259,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53297,7 +53297,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53335,7 +53335,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53373,7 +53373,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_ping_pong_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53411,7 +53411,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53449,7 +53449,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_1mps_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53487,7 +53487,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_10mps_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53525,7 +53525,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_ping_pong_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53563,7 +53563,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53601,7 +53601,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_1mps_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53639,7 +53639,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_10mps_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53677,7 +53677,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_client_ping_pong_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53715,7 +53715,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_client_qps_unconstrained_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53753,7 +53753,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_client_ping_pong_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53791,7 +53791,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_client_qps_unconstrained_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53829,7 +53829,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_server_ping_pong_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53867,7 +53867,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_sync_streaming_from_server_qps_unconstrained_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53905,7 +53905,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_server_ping_pong_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
@@ -53943,7 +53943,7 @@
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_from_server_qps_unconstrained_insecure_low_thread_count",
- "timeout_seconds": 360
+ "timeout_seconds": 120
},
{
"args": [
diff --git a/tools/run_tests/helper_scripts/build_python.sh b/tools/run_tests/helper_scripts/build_python.sh
index be650553dc..e3620821f3 100755
--- a/tools/run_tests/helper_scripts/build_python.sh
+++ b/tools/run_tests/helper_scripts/build_python.sh
@@ -152,7 +152,7 @@ pip_install_dir() {
cd $PWD
}
-$VENV_PYTHON -m pip install --upgrade pip
+$VENV_PYTHON -m pip install --upgrade pip==9.0.1
$VENV_PYTHON -m pip install setuptools
$VENV_PYTHON -m pip install cython
$VENV_PYTHON -m pip install six enum34 protobuf futures
diff --git a/tools/run_tests/helper_scripts/run_grpc-node.sh b/tools/run_tests/helper_scripts/run_grpc-node.sh
new file mode 100755
index 0000000000..25f149f579
--- /dev/null
+++ b/tools/run_tests/helper_scripts/run_grpc-node.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+# 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.
+#
+# This script runs grpc/grpc-node tests with their grpc submodule updated
+# to this reference
+
+# cd to gRPC root directory
+cd $(dirname $0)/../../..
+
+CURRENT_COMMIT=$(git rev-parse --verify HEAD)
+
+rm -rf ./../grpc-node
+git clone --recursive https://github.com/grpc/grpc-node ./../grpc-node
+cd ./../grpc-node
+
+./test-grpc-submodule.sh $CURRENT_COMMIT
diff --git a/tools/run_tests/helper_scripts/run_ruby_end2end_tests.sh b/tools/run_tests/helper_scripts/run_ruby_end2end_tests.sh
index 7914b0e29a..5cfab14fee 100755
--- a/tools/run_tests/helper_scripts/run_ruby_end2end_tests.sh
+++ b/tools/run_tests/helper_scripts/run_ruby_end2end_tests.sh
@@ -27,4 +27,5 @@ ruby src/ruby/end2end/killed_client_thread_driver.rb || EXIT_CODE=1
ruby src/ruby/end2end/forking_client_driver.rb || EXIT_CODE=1
ruby src/ruby/end2end/grpc_class_init_driver.rb || EXIT_CODE=1
ruby src/ruby/end2end/multiple_killed_watching_threads_driver.rb || EXIT_CODE=1
+ruby src/ruby/end2end/load_grpc_with_gc_stress_driver.rb || EXIT_CODE=1
exit $EXIT_CODE
diff --git a/tools/run_tests/performance/massage_qps_stats.py b/tools/run_tests/performance/massage_qps_stats.py
index e1620adad2..ebbfe6c26c 100644
--- a/tools/run_tests/performance/massage_qps_stats.py
+++ b/tools/run_tests/performance/massage_qps_stats.py
@@ -74,6 +74,7 @@ def massage_qps_stats(scenario_result):
stats["core_http2_initiate_write_due_to_transport_flow_control_unstalled"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_transport_flow_control_unstalled")
stats["core_http2_initiate_write_due_to_ping_response"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_ping_response")
stats["core_http2_initiate_write_due_to_force_rst_stream"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_force_rst_stream")
+ stats["core_http2_spurious_writes_begun"] = massage_qps_stats_helpers.counter(core_stats, "http2_spurious_writes_begun")
stats["core_hpack_recv_indexed"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_indexed")
stats["core_hpack_recv_lithdr_incidx"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_lithdr_incidx")
stats["core_hpack_recv_lithdr_incidx_v"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_lithdr_incidx_v")
@@ -106,8 +107,6 @@ def massage_qps_stats(scenario_result):
stats["core_executor_wakeup_initiated"] = massage_qps_stats_helpers.counter(core_stats, "executor_wakeup_initiated")
stats["core_executor_queue_drained"] = massage_qps_stats_helpers.counter(core_stats, "executor_queue_drained")
stats["core_executor_push_retries"] = massage_qps_stats_helpers.counter(core_stats, "executor_push_retries")
- stats["core_executor_threads_created"] = massage_qps_stats_helpers.counter(core_stats, "executor_threads_created")
- stats["core_executor_threads_used"] = massage_qps_stats_helpers.counter(core_stats, "executor_threads_used")
stats["core_server_requested_calls"] = massage_qps_stats_helpers.counter(core_stats, "server_requested_calls")
stats["core_server_slowpath_requests_queued"] = massage_qps_stats_helpers.counter(core_stats, "server_slowpath_requests_queued")
h = massage_qps_stats_helpers.histogram(core_stats, "call_initial_size")
@@ -182,12 +181,6 @@ def massage_qps_stats(scenario_result):
stats["core_http2_send_flowctl_per_write_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries)
stats["core_http2_send_flowctl_per_write_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries)
stats["core_http2_send_flowctl_per_write_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries)
- h = massage_qps_stats_helpers.histogram(core_stats, "executor_closures_per_wakeup")
- stats["core_executor_closures_per_wakeup"] = ",".join("%f" % x for x in h.buckets)
- stats["core_executor_closures_per_wakeup_bkts"] = ",".join("%f" % x for x in h.boundaries)
- stats["core_executor_closures_per_wakeup_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries)
- stats["core_executor_closures_per_wakeup_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries)
- stats["core_executor_closures_per_wakeup_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries)
h = massage_qps_stats_helpers.histogram(core_stats, "server_cqs_checked")
stats["core_server_cqs_checked"] = ",".join("%f" % x for x in h.buckets)
stats["core_server_cqs_checked_bkts"] = ",".join("%f" % x for x in h.boundaries)
diff --git a/tools/run_tests/performance/run_worker_php.sh b/tools/run_tests/performance/run_worker_php.sh
index 5d0c4fa4fd..e524d5286d 100755
--- a/tools/run_tests/performance/run_worker_php.sh
+++ b/tools/run_tests/performance/run_worker_php.sh
@@ -16,13 +16,18 @@
source ~/.rvm/scripts/rvm
set -ex
-repo=$(dirname $0)/../../..
-
+cd $(dirname $0)/../../..
+repo=$(pwd)
# First set up all dependences needed for PHP QPS test
cd $repo
cd src/php/tests/qps
composer install
+# Install protobuf C-extension for php
+cd vendor/google/protobuf/php/ext/google/protobuf
+phpize
+./configure
+make
# The proxy worker for PHP is implemented in Ruby
-cd ../../../..
+cd $repo
ruby src/ruby/qps/proxy-worker.rb $@
diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py
index 5efc9f5648..5019358ab3 100644
--- a/tools/run_tests/performance/scenario_config.py
+++ b/tools/run_tests/performance/scenario_config.py
@@ -802,25 +802,32 @@ class RubyLanguage:
class PhpLanguage:
- def __init__(self):
+ def __init__(self, use_protobuf_c_extension=False):
pass
+ self.use_protobuf_c_extension=use_protobuf_c_extension
self.safename = str(self)
def worker_cmdline(self):
+ if self.use_protobuf_c_extension:
+ return ['tools/run_tests/performance/run_worker_php.sh -c']
return ['tools/run_tests/performance/run_worker_php.sh']
def worker_port_offset(self):
return 800
def scenarios(self):
+ php_extension_mode='php_protobuf_php_extension'
+ if self.use_protobuf_c_extension:
+ php_extension_mode='php_protobuf_c_extension'
+
yield _ping_pong_scenario(
- 'php_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY',
- client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
+ '%s_to_cpp_protobuf_sync_unary_ping_pong' % php_extension_mode,
+ rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
server_language='c++', async_server_threads=1)
yield _ping_pong_scenario(
- 'php_to_cpp_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING',
- client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
+ '%s_to_cpp_protobuf_sync_streaming_ping_pong' % php_extension_mode,
+ rpc_type='STREAMING', client_type='SYNC_CLIENT', server_type='SYNC_SERVER',
server_language='c++', async_server_threads=1)
def __str__(self):
@@ -1024,7 +1031,8 @@ LANGUAGES = {
'node' : NodeLanguage(),
'node_express': NodeExpressLanguage(),
'ruby' : RubyLanguage(),
- 'php' : PhpLanguage(),
+ 'php_protobuf_php' : PhpLanguage(),
+ 'php_protobuf_c' : PhpLanguage(use_protobuf_c_extension=True),
'java' : JavaLanguage(),
'python' : PythonLanguage(),
'go' : GoLanguage(),
diff --git a/tools/run_tests/performance/scenario_result_schema.json b/tools/run_tests/performance/scenario_result_schema.json
index c7b1904bd1..169221d18c 100644
--- a/tools/run_tests/performance/scenario_result_schema.json
+++ b/tools/run_tests/performance/scenario_result_schema.json
@@ -382,6 +382,11 @@
},
{
"mode": "NULLABLE",
+ "name": "core_http2_spurious_writes_begun",
+ "type": "INTEGER"
+ },
+ {
+ "mode": "NULLABLE",
"name": "core_hpack_recv_indexed",
"type": "INTEGER"
},
@@ -542,16 +547,6 @@
},
{
"mode": "NULLABLE",
- "name": "core_executor_threads_created",
- "type": "INTEGER"
- },
- {
- "mode": "NULLABLE",
- "name": "core_executor_threads_used",
- "type": "INTEGER"
- },
- {
- "mode": "NULLABLE",
"name": "core_server_requested_calls",
"type": "INTEGER"
},
@@ -862,31 +857,6 @@
},
{
"mode": "NULLABLE",
- "name": "core_executor_closures_per_wakeup",
- "type": "STRING"
- },
- {
- "mode": "NULLABLE",
- "name": "core_executor_closures_per_wakeup_bkts",
- "type": "STRING"
- },
- {
- "mode": "NULLABLE",
- "name": "core_executor_closures_per_wakeup_50p",
- "type": "FLOAT"
- },
- {
- "mode": "NULLABLE",
- "name": "core_executor_closures_per_wakeup_95p",
- "type": "FLOAT"
- },
- {
- "mode": "NULLABLE",
- "name": "core_executor_closures_per_wakeup_99p",
- "type": "FLOAT"
- },
- {
- "mode": "NULLABLE",
"name": "core_server_cqs_checked",
"type": "STRING"
},
@@ -1209,6 +1179,11 @@
},
{
"mode": "NULLABLE",
+ "name": "core_http2_spurious_writes_begun",
+ "type": "INTEGER"
+ },
+ {
+ "mode": "NULLABLE",
"name": "core_hpack_recv_indexed",
"type": "INTEGER"
},
@@ -1369,16 +1344,6 @@
},
{
"mode": "NULLABLE",
- "name": "core_executor_threads_created",
- "type": "INTEGER"
- },
- {
- "mode": "NULLABLE",
- "name": "core_executor_threads_used",
- "type": "INTEGER"
- },
- {
- "mode": "NULLABLE",
"name": "core_server_requested_calls",
"type": "INTEGER"
},
@@ -1689,31 +1654,6 @@
},
{
"mode": "NULLABLE",
- "name": "core_executor_closures_per_wakeup",
- "type": "STRING"
- },
- {
- "mode": "NULLABLE",
- "name": "core_executor_closures_per_wakeup_bkts",
- "type": "STRING"
- },
- {
- "mode": "NULLABLE",
- "name": "core_executor_closures_per_wakeup_50p",
- "type": "FLOAT"
- },
- {
- "mode": "NULLABLE",
- "name": "core_executor_closures_per_wakeup_95p",
- "type": "FLOAT"
- },
- {
- "mode": "NULLABLE",
- "name": "core_executor_closures_per_wakeup_99p",
- "type": "FLOAT"
- },
- {
- "mode": "NULLABLE",
"name": "core_server_cqs_checked",
"type": "STRING"
},
diff --git a/tools/run_tests/python_utils/filter_pull_request_tests.py b/tools/run_tests/python_utils/filter_pull_request_tests.py
index f99143fdd7..393aef8662 100644
--- a/tools/run_tests/python_utils/filter_pull_request_tests.py
+++ b/tools/run_tests/python_utils/filter_pull_request_tests.py
@@ -47,7 +47,7 @@ class TestSuite:
_CORE_TEST_SUITE = TestSuite(['c'])
_CPP_TEST_SUITE = TestSuite(['c++'])
_CSHARP_TEST_SUITE = TestSuite(['csharp'])
-_NODE_TEST_SUITE = TestSuite(['node'])
+_NODE_TEST_SUITE = TestSuite(['node', 'grpc-node'])
_OBJC_TEST_SUITE = TestSuite(['objc'])
_PHP_TEST_SUITE = TestSuite(['php', 'php7'])
_PYTHON_TEST_SUITE = TestSuite(['python'])
diff --git a/tools/run_tests/python_utils/jobset.py b/tools/run_tests/python_utils/jobset.py
index 062c79a0de..d523095e70 100755
--- a/tools/run_tests/python_utils/jobset.py
+++ b/tools/run_tests/python_utils/jobset.py
@@ -306,8 +306,8 @@ class Job(object):
else:
self._state = _FAILURE
if not self._suppress_failure_message:
- message('FAILED', '%s [ret=%d, pid=%d]' % (
- self._spec.shortname, self._process.returncode, self._process.pid),
+ message('FAILED', '%s [ret=%d, pid=%d, time=%.1fsec]' % (
+ self._spec.shortname, self._process.returncode, self._process.pid, elapsed),
stdout(), do_newline=True)
self.result.state = 'FAILED'
self.result.num_failures += 1
@@ -326,7 +326,7 @@ class Job(object):
self.result.cpu_estimated = float('%.01f' % self._spec.cpu_cost)
measurement = '; cpu_cost=%.01f; estimated=%.01f' % (self.result.cpu_measured, self.result.cpu_estimated)
if not self._quiet_success:
- message('PASSED', '%s [time=%.1fsec; retries=%d:%d%s]' % (
+ message('PASSED', '%s [time=%.1fsec, retries=%d:%d%s]' % (
self._spec.shortname, elapsed, self._retries, self._timeout_retries, measurement),
stdout() if self._spec.verbose_success else None,
do_newline=self._newline_on_success or self._travis)
@@ -334,6 +334,8 @@ class Job(object):
elif (self._state == _RUNNING and
self._spec.timeout_seconds is not None and
time.time() - self._start > self._spec.timeout_seconds):
+ elapsed = time.time() - self._start
+ self.result.elapsed_time = elapsed
if self._timeout_retries < self._spec.timeout_retries:
message('TIMEOUT_FLAKE', '%s [pid=%d]' % (self._spec.shortname, self._process.pid), stdout(), do_newline=True)
self._timeout_retries += 1
@@ -344,7 +346,7 @@ class Job(object):
self._process.terminate()
self.start()
else:
- message('TIMEOUT', '%s [pid=%d]' % (self._spec.shortname, self._process.pid), stdout(), do_newline=True)
+ message('TIMEOUT', '%s [pid=%d, time=%.1fsec]' % (self._spec.shortname, self._process.pid, elapsed), stdout(), do_newline=True)
self.kill()
self.result.state = 'TIMEOUT'
self.result.num_failures += 1
@@ -364,7 +366,7 @@ class Job(object):
class Jobset(object):
"""Manages one run of jobs."""
- def __init__(self, check_cancelled, maxjobs, newline_on_success, travis,
+ def __init__(self, check_cancelled, maxjobs, maxjobs_cpu_agnostic, newline_on_success, travis,
stop_on_failure, add_env, quiet_success, max_time):
self._running = set()
self._check_cancelled = check_cancelled
@@ -372,6 +374,7 @@ class Jobset(object):
self._failures = 0
self._completed = 0
self._maxjobs = maxjobs
+ self._maxjobs_cpu_agnostic = maxjobs_cpu_agnostic
self._newline_on_success = newline_on_success
self._travis = travis
self._stop_on_failure = stop_on_failure
@@ -406,7 +409,9 @@ class Jobset(object):
if self.cancelled(): return False
current_cpu_cost = self.cpu_cost()
if current_cpu_cost == 0: break
- if current_cpu_cost + spec.cpu_cost <= self._maxjobs: break
+ if current_cpu_cost + spec.cpu_cost <= self._maxjobs:
+ if len(self._running) < self._maxjobs_cpu_agnostic:
+ break
self.reap()
if self.cancelled(): return False
job = Job(spec,
@@ -491,6 +496,7 @@ def tag_remaining(xs):
def run(cmdlines,
check_cancelled=_never_cancelled,
maxjobs=None,
+ maxjobs_cpu_agnostic=None,
newline_on_success=False,
travis=False,
infinite_runs=False,
@@ -509,6 +515,7 @@ def run(cmdlines,
return 0, resultset
js = Jobset(check_cancelled,
maxjobs if maxjobs is not None else _DEFAULT_MAX_JOBS,
+ maxjobs_cpu_agnostic if maxjobs_cpu_agnostic is not None else _DEFAULT_MAX_JOBS,
newline_on_success, travis, stop_on_failure, add_env,
quiet_success, max_time)
for cmdline, remaining in tag_remaining(cmdlines):
diff --git a/tools/run_tests/python_utils/upload_test_results.py b/tools/run_tests/python_utils/upload_test_results.py
index 580e7f7d81..15e827769e 100644
--- a/tools/run_tests/python_utils/upload_test_results.py
+++ b/tools/run_tests/python_utils/upload_test_results.py
@@ -102,6 +102,15 @@ def upload_results_to_bq(resultset, bq_table, args, platform):
test_results['timestamp'] = time.strftime('%Y-%m-%d %H:%M:%S')
row = big_query_utils.make_row(str(uuid.uuid4()), test_results)
- if not big_query_utils.insert_rows(bq, _PROJECT_ID, _DATASET_ID, bq_table, [row]):
- print('Error uploading result to bigquery.')
- sys.exit(1)
+
+ # TODO(jtattermusch): rows are inserted one by one, very inefficient
+ max_retries = 3
+ for attempt in range(max_retries):
+ if big_query_utils.insert_rows(bq, _PROJECT_ID, _DATASET_ID, bq_table, [row]):
+ break
+ else:
+ if attempt < max_retries - 1:
+ print('Error uploading result to bigquery, will retry.')
+ else:
+ print('Error uploading result to bigquery, all attempts failed.')
+ sys.exit(1)
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index b38108d456..7c65067857 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -117,6 +117,13 @@ def run_shell_command(cmd, env=None, cwd=None):
e.cmd, e.returncode, e.output)
raise
+def max_parallel_tests_for_current_platform():
+ # Too much test parallelization has only been seen to be a problem
+ # so far on windows.
+ if jobset.platform_string() == 'windows':
+ return 64
+ return 128
+
# SimpleConfig: just compile with CONFIG=config, and run the binary to test
class Config(object):
@@ -444,6 +451,67 @@ class CLanguage(object):
return self.make_target
+# This tests Node on grpc/grpc-node and will become the standard for Node testing
+class RemoteNodeLanguage(object):
+
+ def __init__(self):
+ self.platform = platform_string()
+
+ def configure(self, config, args):
+ self.config = config
+ self.args = args
+ # Note: electron ABI only depends on major and minor version, so that's all
+ # we should specify in the compiler argument
+ _check_compiler(self.args.compiler, ['default', 'node0.12',
+ 'node4', 'node5', 'node6',
+ 'node7', 'node8',
+ 'electron1.3', 'electron1.6'])
+ if self.args.compiler == 'default':
+ self.runtime = 'node'
+ self.node_version = '8'
+ else:
+ if self.args.compiler.startswith('electron'):
+ self.runtime = 'electron'
+ self.node_version = self.args.compiler[8:]
+ else:
+ self.runtime = 'node'
+ # Take off the word "node"
+ self.node_version = self.args.compiler[4:]
+
+ # TODO: update with Windows/electron scripts when available for grpc/grpc-node
+ def test_specs(self):
+ if self.platform == 'windows':
+ return [self.config.job_spec(['tools\\run_tests\\helper_scripts\\run_node.bat'])]
+ else:
+ return [self.config.job_spec(['tools/run_tests/helper_scripts/run_grpc-node.sh'],
+ None,
+ environ=_FORCE_ENVIRON_FOR_WRAPPERS)]
+
+ def pre_build_steps(self):
+ return []
+
+ def make_targets(self):
+ return []
+
+ def make_options(self):
+ return []
+
+ def build_steps(self):
+ return []
+
+ def post_tests_steps(self):
+ return []
+
+ def makefile_name(self):
+ return 'Makefile'
+
+ def dockerfile_dir(self):
+ return 'tools/dockerfile/test/node_jessie_%s' % _docker_arch_suffix(self.args.arch)
+
+ def __str__(self):
+ return 'grpc-node'
+
+
class NodeLanguage(object):
def __init__(self):
@@ -640,7 +708,7 @@ class PythonLanguage(object):
return [config.build for config in self.pythons]
def post_tests_steps(self):
- if self.config != 'gcov':
+ if self.config.build_config != 'gcov':
return []
else:
return [['tools/run_tests/helper_scripts/post_tests_python.sh']]
@@ -717,6 +785,9 @@ class PythonLanguage(object):
return (pypy32_config,)
elif args.compiler == 'python_alpine':
return (python27_config,)
+ elif args.compiler == 'all_the_cpythons':
+ return (python27_config, python34_config, python35_config,
+ python36_config,)
else:
raise Exception('Compiler %s not supported.' % args.compiler)
@@ -1064,6 +1135,7 @@ with open('tools/run_tests/generated/configs.json') as f:
_LANGUAGES = {
'c++': CLanguage('cxx', 'c++'),
'c': CLanguage('c', 'c'),
+ 'grpc-node': RemoteNodeLanguage(),
'node': NodeLanguage(),
'node_express': NodeExpressLanguage(),
'php': PhpLanguage(),
@@ -1214,7 +1286,7 @@ argp.add_argument('--compiler',
choices=['default',
'gcc4.4', 'gcc4.6', 'gcc4.8', 'gcc4.9', 'gcc5.3', 'gcc_musl',
'clang3.4', 'clang3.5', 'clang3.6', 'clang3.7',
- 'python2.7', 'python3.4', 'python3.5', 'python3.6', 'pypy', 'pypy3', 'python_alpine',
+ 'python2.7', 'python3.4', 'python3.5', 'python3.6', 'pypy', 'pypy3', 'python_alpine', 'all_the_cpythons',
'node0.12', 'node4', 'node5', 'node6', 'node7', 'node8',
'electron1.3', 'electron1.6',
'coreclr',
@@ -1479,8 +1551,11 @@ class BuildAndRunError(object):
def _has_epollexclusive():
+ binary = 'bins/%s/check_epollexclusive' % args.config
+ if not os.path.exists(binary):
+ return False
try:
- subprocess.check_call('bins/%s/check_epollexclusive' % args.config)
+ subprocess.check_call(binary)
return True
except subprocess.CalledProcessError, e:
return False
@@ -1553,7 +1628,7 @@ def _build_and_run(
jobset.message('START', 'Running tests quietly, only failing tests will be reported', do_newline=True)
num_test_failures, resultset = jobset.run(
all_runs, check_cancelled, newline_on_success=newline_on_success,
- travis=args.travis, maxjobs=args.jobs,
+ travis=args.travis, maxjobs=args.jobs, maxjobs_cpu_agnostic=max_parallel_tests_for_current_platform(),
stop_on_failure=args.stop_on_failure,
quiet_success=args.quiet_success, max_time=args.max_time)
if resultset:
@@ -1576,7 +1651,7 @@ def _build_and_run(
suite_name=args.report_suite_name)
number_failures, _ = jobset.run(
- post_tests_steps, maxjobs=1, stop_on_failure=True,
+ post_tests_steps, maxjobs=1, stop_on_failure=False,
newline_on_success=newline_on_success, travis=args.travis)
out = []
diff --git a/tools/run_tests/run_tests_matrix.py b/tools/run_tests/run_tests_matrix.py
index 2417c5ae55..34d839e0b8 100755
--- a/tools/run_tests/run_tests_matrix.py
+++ b/tools/run_tests/run_tests_matrix.py
@@ -169,7 +169,7 @@ def _create_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS):
inner_jobs=inner_jobs,
timeout_seconds=_CPP_RUNTESTS_TIMEOUT)
- test_jobs += _generate_jobs(languages=['ruby', 'php'],
+ test_jobs += _generate_jobs(languages=['grpc-node', 'ruby', 'php'],
configs=['dbg', 'opt'],
platforms=['linux', 'macos'],
labels=['basictests', 'multilang'],
diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh
index 7c934b1ba7..97324f0a3a 100755
--- a/tools/run_tests/sanity/check_submodules.sh
+++ b/tools/run_tests/sanity/check_submodules.sh
@@ -34,6 +34,7 @@ cat << EOF | awk '{ print $1 }' | sort > $want_submodules
80a37e0782d2d702d52234b62dd4b9ec74fd2c95 third_party/protobuf (v3.4.0)
cacf7f1d4e3d44d871b605da3b647f07d718623f third_party/zlib (v1.2.11)
3be1924221e1326df520f8498d704a5c4c8d0cce third_party/cares/cares (cares-1_13_0)
+ 73594cde8c9a52a102c4341c244c833aa61b9c06 third_party/bloaty
EOF
diff -u $submodules $want_submodules
diff --git a/tools/run_tests/sanity/check_test_filtering.py b/tools/run_tests/sanity/check_test_filtering.py
index bea8125fb9..3ebb9389f7 100755
--- a/tools/run_tests/sanity/check_test_filtering.py
+++ b/tools/run_tests/sanity/check_test_filtering.py
@@ -25,7 +25,7 @@ sys.path.insert(0, os.path.abspath('tools/run_tests/'))
from run_tests_matrix import _create_test_jobs, _create_portability_test_jobs
import python_utils.filter_pull_request_tests as filter_pull_request_tests
-_LIST_OF_LANGUAGE_LABELS = ['c', 'c++', 'csharp', 'node', 'objc', 'php', 'php7', 'python', 'ruby']
+_LIST_OF_LANGUAGE_LABELS = ['c', 'c++', 'csharp', 'grpc-node', 'node', 'objc', 'php', 'php7', 'python', 'ruby']
_LIST_OF_PLATFORM_LABELS = ['linux', 'macos', 'windows']
class TestFilteringTest(unittest.TestCase):
diff --git a/tools/ubsan_suppressions.txt b/tools/ubsan_suppressions.txt
index 6ccc306cf0..2268adc169 100644
--- a/tools/ubsan_suppressions.txt
+++ b/tools/ubsan_suppressions.txt
@@ -9,3 +9,9 @@ alignment:poly1305_block_copy
nonnull-attribute:google::protobuf::*
alignment:google::protobuf::*
nonnull-attribute:_tr_stored_block
+# The following 5 suppressors should be removed as part of C++ cleanup
+enum:client_fuzzer_one_entry
+enum:message_compress_test
+enum:transport_security_test
+enum:algorithm_test
+alignment:transport_security_test