grpc 1.52.0 → 1.53.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of grpc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Makefile +50 -5
- data/include/grpc/event_engine/event_engine.h +24 -2
- data/include/grpc/event_engine/slice_buffer.h +13 -1
- data/include/grpc/impl/grpc_types.h +3 -0
- data/include/grpc/support/time.h +6 -4
- data/src/core/ext/filters/backend_metrics/backend_metric_filter.cc +148 -0
- data/src/core/ext/filters/backend_metrics/backend_metric_filter.h +52 -0
- data/src/core/ext/filters/backend_metrics/backend_metric_provider.h +29 -0
- data/src/core/ext/filters/channel_idle/channel_idle_filter.h +3 -3
- data/src/core/ext/filters/channel_idle/idle_filter_state.h +3 -3
- data/src/core/ext/filters/client_channel/backend_metric.h +3 -3
- data/src/core/ext/filters/client_channel/backup_poller.h +3 -3
- data/src/core/ext/filters/client_channel/channel_connectivity.cc +1 -1
- data/src/core/ext/filters/client_channel/client_channel.cc +29 -33
- data/src/core/ext/filters/client_channel/client_channel.h +3 -3
- data/src/core/ext/filters/client_channel/client_channel_channelz.h +3 -3
- data/src/core/ext/filters/client_channel/client_channel_factory.h +3 -3
- data/src/core/ext/filters/client_channel/client_channel_service_config.h +3 -3
- data/src/core/ext/filters/client_channel/config_selector.h +3 -3
- data/src/core/ext/filters/client_channel/connector.h +8 -4
- data/src/core/ext/filters/client_channel/dynamic_filters.h +3 -3
- data/src/core/ext/filters/client_channel/global_subchannel_pool.h +3 -3
- data/src/core/ext/filters/client_channel/health/health_check_client.h +3 -3
- data/src/core/ext/filters/client_channel/http_proxy.h +3 -3
- data/src/core/ext/filters/client_channel/lb_call_state_internal.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/address_filtering.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +14 -7
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +1 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc +1 -78
- data/src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h +117 -0
- data/src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc +1 -0
- data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc +128 -0
- data/src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h +71 -0
- data/src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc +972 -0
- data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +2 -2
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +3 -6
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_attributes.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc +12 -7
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc +275 -107
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.h +10 -3
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc +5 -0
- data/src/core/ext/filters/client_channel/local_subchannel_pool.h +3 -3
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +3 -3
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +6 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +1 -2
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +3 -3
- data/src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.h +3 -3
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +3 -3
- data/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc +1 -0
- data/src/core/ext/filters/client_channel/resolver/polling_resolver.h +3 -3
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +3 -7
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h +3 -3
- data/src/core/ext/filters/client_channel/retry_filter.cc +10 -13
- data/src/core/ext/filters/client_channel/retry_filter.h +3 -3
- data/src/core/ext/filters/client_channel/retry_service_config.h +3 -3
- data/src/core/ext/filters/client_channel/retry_throttle.h +3 -3
- data/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc +4 -4
- data/src/core/ext/filters/client_channel/subchannel.cc +5 -1
- data/src/core/ext/filters/client_channel/subchannel.h +3 -3
- data/src/core/ext/filters/client_channel/subchannel_interface_internal.h +3 -3
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.h +3 -3
- data/src/core/ext/filters/client_channel/subchannel_stream_client.h +3 -3
- data/src/core/ext/filters/deadline/deadline_filter.cc +40 -48
- data/src/core/ext/filters/deadline/deadline_filter.h +6 -10
- data/src/core/ext/filters/fault_injection/fault_injection_filter.h +3 -3
- data/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h +3 -3
- data/src/core/ext/filters/http/client/http_client_filter.cc +26 -21
- data/src/core/ext/filters/http/client/http_client_filter.h +3 -3
- data/src/core/ext/filters/http/client_authority_filter.h +3 -3
- data/src/core/ext/filters/http/message_compress/compression_filter.cc +109 -117
- data/src/core/ext/filters/http/message_compress/compression_filter.h +17 -10
- data/src/core/ext/filters/http/server/http_server_filter.cc +25 -24
- data/src/core/ext/filters/http/server/http_server_filter.h +3 -3
- data/src/core/ext/filters/message_size/message_size_filter.cc +2 -1
- data/src/core/ext/filters/message_size/message_size_filter.h +3 -3
- data/src/core/ext/filters/rbac/rbac_filter.cc +4 -3
- data/src/core/ext/filters/rbac/rbac_filter.h +3 -3
- data/src/core/ext/filters/rbac/rbac_service_config_parser.h +3 -3
- data/src/core/ext/filters/server_config_selector/server_config_selector.h +3 -3
- data/src/core/ext/filters/server_config_selector/server_config_selector_filter.h +3 -3
- data/src/core/ext/filters/stateful_session/stateful_session_filter.cc +27 -37
- data/src/core/ext/filters/stateful_session/stateful_session_filter.h +5 -5
- data/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h +3 -3
- data/src/core/ext/transport/chttp2/alpn/alpn.h +3 -3
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +2 -7
- data/src/core/ext/transport/chttp2/client/chttp2_connector.h +3 -3
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +1 -0
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +3 -3
- data/src/core/ext/transport/chttp2/transport/bin_decoder.h +3 -3
- data/src/core/ext/transport/chttp2/transport/bin_encoder.h +3 -3
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +195 -111
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +3 -3
- data/src/core/ext/transport/chttp2/transport/context_list.h +3 -3
- data/src/core/ext/transport/chttp2/transport/decode_huff.h +3 -3
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +1 -0
- data/src/core/ext/transport/chttp2/transport/flow_control.h +3 -3
- data/src/core/ext/transport/chttp2/transport/frame.h +3 -3
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +2 -0
- data/src/core/ext/transport/chttp2/transport/frame_data.h +3 -3
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +2 -0
- data/src/core/ext/transport/chttp2/transport/frame_goaway.h +3 -3
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +1 -0
- data/src/core/ext/transport/chttp2/transport/frame_ping.h +3 -3
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +2 -0
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +3 -3
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +1 -0
- data/src/core/ext/transport/chttp2/transport/frame_settings.h +3 -3
- data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +2 -0
- data/src/core/ext/transport/chttp2/transport/frame_window_update.h +3 -3
- data/src/core/ext/transport/chttp2/transport/hpack_constants.h +3 -3
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +3 -3
- data/src/core/ext/transport/chttp2/transport/hpack_encoder_table.h +3 -3
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +18 -407
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +3 -3
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc +1 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.h +3 -3
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +3 -3
- data/src/core/ext/transport/chttp2/transport/http_trace.h +3 -3
- data/src/core/ext/transport/chttp2/transport/huffsyms.h +3 -3
- data/src/core/ext/transport/chttp2/transport/internal.h +28 -23
- data/src/core/ext/transport/chttp2/transport/parsing.cc +111 -31
- data/src/core/ext/transport/chttp2/transport/stream_map.h +3 -3
- data/src/core/ext/transport/chttp2/transport/varint.h +3 -3
- data/src/core/ext/transport/chttp2/transport/writing.cc +9 -8
- data/src/core/ext/transport/inproc/inproc_transport.h +3 -3
- data/src/core/ext/upb-generated/envoy/admin/v3/clusters.upb.c +3 -2
- data/src/core/ext/upb-generated/envoy/admin/v3/clusters.upb.h +9 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump_shared.upb.c +38 -2
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump_shared.upb.h +185 -0
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c +7 -3
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.h +44 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c +16 -25
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h +48 -74
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c +30 -7
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h +137 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c +15 -12
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h +83 -51
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c +3 -2
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h +15 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.c +17 -2
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h +61 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c +11 -5
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h +37 -6
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c +5 -3
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h +24 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.c +5 -3
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.h +22 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c +6 -3
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h +24 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c +24 -5
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h +50 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c +57 -16
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h +254 -17
- data/src/core/ext/upb-generated/envoy/config/trace/v3/datadog.upb.c +3 -2
- data/src/core/ext/upb-generated/envoy/config/trace/v3/datadog.upb.h +9 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/opentelemetry.upb.c +3 -2
- data/src/core/ext/upb-generated/envoy/config/trace/v3/opentelemetry.upb.h +9 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/zipkin.upb.c +7 -6
- data/src/core/ext/upb-generated/envoy/config/trace/v3/zipkin.upb.h +21 -12
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c +6 -3
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.h +23 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c +10 -7
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +42 -12
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb.c +54 -0
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb.h +188 -0
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/common/v3/common.upb.c +111 -0
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/common/v3/common.upb.h +444 -0
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb.c +7 -3
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb.h +24 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c +8 -6
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +31 -9
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c +5 -3
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h +24 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/filter_state.upb.c +47 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/filter_state.upb.h +113 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/status_code_input.upb.c +43 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/status_code_input.upb.h +114 -0
- data/src/core/ext/upb-generated/envoy/type/v3/ratelimit_unit.upb.h +3 -1
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/clusters.upbdefs.c +54 -53
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump_shared.upbdefs.c +34 -13
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump_shared.upbdefs.h +10 -0
- data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.c +195 -187
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c +232 -224
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.h +0 -5
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c +95 -75
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c +94 -93
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c +81 -75
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c +189 -187
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c +7 -3
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c +71 -66
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c +137 -133
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/quic_config.upbdefs.c +16 -12
- data/src/core/ext/upbdefs-generated/envoy/config/rbac/v3/rbac.upbdefs.c +140 -133
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c +81 -70
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c +771 -741
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.h +10 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/datadog.upbdefs.c +16 -14
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/opentelemetry.upbdefs.c +14 -13
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/zipkin.upbdefs.c +20 -18
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.c +53 -42
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +363 -356
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c +149 -145
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c +16 -13
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/filter_state.upbdefs.c +48 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/filter_state.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c +14 -14
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/status_code_input.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/status_code_input.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/ratelimit_unit.upbdefs.c +10 -9
- data/src/core/ext/xds/certificate_provider_store.h +3 -3
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.cc +1 -0
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.h +3 -3
- data/src/core/ext/xds/upb_utils.h +3 -3
- data/src/core/ext/xds/xds_api.h +3 -3
- data/src/core/ext/xds/xds_bootstrap.h +3 -3
- data/src/core/ext/xds/xds_bootstrap_grpc.cc +1 -0
- data/src/core/ext/xds/xds_bootstrap_grpc.h +3 -3
- data/src/core/ext/xds/xds_certificate_provider.h +3 -3
- data/src/core/ext/xds/xds_channel_args.h +3 -3
- data/src/core/ext/xds/xds_channel_stack_modifier.h +3 -3
- data/src/core/ext/xds/xds_client.cc +8 -3
- data/src/core/ext/xds/xds_client.h +3 -3
- data/src/core/ext/xds/xds_client_grpc.cc +0 -1
- data/src/core/ext/xds/xds_client_grpc.h +3 -3
- data/src/core/ext/xds/xds_client_stats.h +4 -3
- data/src/core/ext/xds/xds_cluster.cc +11 -7
- data/src/core/ext/xds/xds_cluster.h +6 -6
- data/src/core/ext/xds/xds_cluster_specifier_plugin.h +3 -3
- data/src/core/ext/xds/xds_common_types.cc +1 -0
- data/src/core/ext/xds/xds_common_types.h +3 -3
- data/src/core/ext/xds/xds_endpoint.cc +1 -1
- data/src/core/ext/xds/xds_endpoint.h +3 -3
- data/src/core/ext/xds/xds_health_status.h +30 -3
- data/src/core/ext/xds/xds_http_fault_filter.h +3 -3
- data/src/core/ext/xds/xds_http_filters.cc +1 -1
- data/src/core/ext/xds/xds_http_filters.h +3 -3
- data/src/core/ext/xds/xds_http_rbac_filter.h +3 -3
- data/src/core/ext/xds/xds_http_stateful_session_filter.h +3 -3
- data/src/core/ext/xds/xds_lb_policy_registry.cc +95 -0
- data/src/core/ext/xds/xds_lb_policy_registry.h +3 -3
- data/src/core/ext/xds/xds_listener.cc +1 -0
- data/src/core/ext/xds/xds_listener.h +3 -3
- data/src/core/ext/xds/xds_resource_type.h +3 -3
- data/src/core/ext/xds/xds_resource_type_impl.h +3 -3
- data/src/core/ext/xds/xds_route_config.cc +6 -0
- data/src/core/ext/xds/xds_route_config.h +3 -3
- data/src/core/ext/xds/xds_routing.h +3 -3
- data/src/core/ext/xds/xds_transport.h +3 -3
- data/src/core/ext/xds/xds_transport_grpc.h +3 -3
- data/src/core/lib/address_utils/parse_address.h +3 -3
- data/src/core/lib/address_utils/sockaddr_utils.cc +1 -0
- data/src/core/lib/address_utils/sockaddr_utils.h +3 -3
- data/src/core/lib/avl/avl.h +3 -3
- data/src/core/lib/backoff/backoff.h +3 -3
- data/src/core/lib/channel/call_finalization.h +3 -3
- data/src/core/lib/channel/call_tracer.h +3 -3
- data/src/core/lib/channel/channel_args.cc +1 -0
- data/src/core/lib/channel/channel_args.h +11 -5
- data/src/core/lib/channel/channel_args_preconditioning.h +3 -3
- data/src/core/lib/channel/channel_fwd.h +3 -3
- data/src/core/lib/channel/channel_stack.cc +1 -2
- data/src/core/lib/channel/channel_stack.h +4 -4
- data/src/core/lib/channel/channel_stack_builder.h +3 -3
- data/src/core/lib/channel/channel_stack_builder_impl.cc +14 -1
- data/src/core/lib/channel/channel_stack_builder_impl.h +3 -3
- data/src/core/lib/channel/channel_trace.h +3 -3
- data/src/core/lib/channel/channelz.h +3 -3
- data/src/core/lib/channel/channelz_registry.h +3 -3
- data/src/core/lib/channel/connected_channel.cc +883 -354
- data/src/core/lib/channel/connected_channel.h +3 -3
- data/src/core/lib/channel/context.h +7 -3
- data/src/core/lib/channel/promise_based_filter.cc +532 -260
- data/src/core/lib/channel/promise_based_filter.h +124 -44
- data/src/core/lib/channel/status_util.h +3 -3
- data/src/core/lib/compression/compression_internal.h +3 -3
- data/src/core/lib/compression/message_compress.h +3 -3
- data/src/core/lib/config/core_configuration.h +3 -3
- data/src/core/lib/debug/event_log.h +3 -3
- data/src/core/lib/debug/histogram_view.h +3 -3
- data/src/core/lib/debug/stats.h +3 -3
- data/src/core/lib/debug/stats_data.cc +66 -65
- data/src/core/lib/debug/stats_data.h +42 -33
- data/src/core/lib/debug/trace.h +4 -26
- data/src/core/lib/event_engine/channel_args_endpoint_config.cc +5 -0
- data/src/core/lib/event_engine/channel_args_endpoint_config.h +3 -3
- data/src/core/lib/event_engine/common_closures.h +3 -3
- data/src/core/lib/event_engine/default_event_engine.cc +9 -4
- data/src/core/lib/event_engine/default_event_engine.h +30 -6
- data/src/core/lib/event_engine/default_event_engine_factory.h +3 -3
- data/src/core/lib/event_engine/event_engine.cc +25 -0
- data/src/core/lib/event_engine/executor/executor.h +3 -3
- data/src/core/lib/event_engine/forkable.cc +11 -6
- data/src/core/lib/event_engine/forkable.h +3 -3
- data/src/core/lib/event_engine/handle_containers.h +10 -3
- data/src/core/lib/event_engine/poller.h +3 -3
- data/src/core/lib/event_engine/posix.h +158 -0
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +44 -16
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h +14 -4
- data/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc +6 -7
- data/src/core/lib/event_engine/posix_engine/ev_poll_posix.h +3 -3
- data/src/core/lib/event_engine/posix_engine/event_poller.h +3 -3
- data/src/core/lib/event_engine/posix_engine/event_poller_posix_default.h +3 -3
- data/src/core/lib/event_engine/posix_engine/internal_errqueue.h +3 -3
- data/src/core/lib/event_engine/posix_engine/lockfree_event.h +3 -3
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +52 -55
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.h +46 -13
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +82 -12
- data/src/core/lib/event_engine/posix_engine/posix_engine.h +23 -9
- data/src/core/lib/event_engine/posix_engine/posix_engine_closure.h +3 -3
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc +60 -7
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener.h +65 -14
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc +0 -1
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.h +6 -6
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h +3 -3
- data/src/core/lib/event_engine/posix_engine/timer.h +3 -3
- data/src/core/lib/event_engine/posix_engine/timer_heap.h +3 -3
- data/src/core/lib/event_engine/posix_engine/timer_manager.h +3 -3
- data/src/core/lib/event_engine/posix_engine/traced_buffer_list.h +3 -3
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h +3 -3
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h +3 -3
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h +3 -3
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.h +3 -3
- data/src/core/lib/event_engine/resolved_address.cc +19 -0
- data/src/core/lib/event_engine/resolved_address_internal.h +34 -0
- data/src/core/lib/event_engine/shim.cc +56 -0
- data/src/core/lib/event_engine/shim.h +33 -0
- data/src/core/lib/event_engine/slice.cc +1 -1
- data/src/core/lib/event_engine/tcp_socket_utils.cc +18 -2
- data/src/core/lib/event_engine/tcp_socket_utils.h +8 -3
- data/src/core/lib/event_engine/thread_local.cc +29 -0
- data/src/core/lib/event_engine/thread_local.h +32 -0
- data/src/core/lib/event_engine/thread_pool.cc +41 -65
- data/src/core/lib/event_engine/thread_pool.h +21 -17
- data/src/core/lib/event_engine/time_util.h +3 -3
- data/src/core/lib/event_engine/trace.cc +6 -0
- data/src/core/lib/event_engine/trace.h +16 -3
- data/src/core/lib/event_engine/utils.cc +2 -2
- data/src/core/lib/event_engine/utils.h +12 -4
- data/src/core/lib/event_engine/windows/iocp.cc +24 -40
- data/src/core/lib/event_engine/windows/iocp.h +3 -3
- data/src/core/lib/event_engine/windows/win_socket.cc +56 -33
- data/src/core/lib/event_engine/windows/win_socket.h +34 -25
- data/src/core/lib/event_engine/windows/windows_endpoint.cc +331 -0
- data/src/core/lib/event_engine/windows/windows_endpoint.h +103 -0
- data/src/core/lib/event_engine/windows/windows_engine.cc +243 -20
- data/src/core/lib/event_engine/windows/windows_engine.h +62 -23
- data/src/core/lib/experiments/config.cc +16 -1
- data/src/core/lib/experiments/config.h +13 -3
- data/src/core/lib/experiments/experiments.cc +14 -8
- data/src/core/lib/experiments/experiments.h +80 -21
- data/src/core/lib/gpr/alloc.h +3 -3
- data/src/core/lib/gpr/spinlock.h +3 -3
- data/src/core/lib/gpr/string.h +3 -3
- data/src/core/lib/gpr/sync_abseil.cc +15 -7
- data/src/core/lib/gpr/time_precise.h +3 -3
- data/src/core/lib/gpr/tmpfile.h +3 -3
- data/src/core/lib/gpr/useful.h +3 -3
- data/src/core/lib/gprpp/atomic_utils.h +3 -3
- data/src/core/lib/gprpp/bitset.h +3 -3
- data/src/core/lib/gprpp/chunked_vector.h +3 -3
- data/src/core/lib/gprpp/construct_destruct.h +3 -3
- data/src/core/lib/gprpp/cpp_impl_of.h +3 -3
- data/src/core/lib/gprpp/crash.h +3 -3
- data/src/core/lib/gprpp/debug_location.h +3 -6
- data/src/core/lib/gprpp/dual_ref_counted.h +3 -3
- data/src/core/lib/gprpp/env.h +3 -3
- data/src/core/lib/gprpp/examine_stack.h +3 -3
- data/src/core/lib/gprpp/fork.cc +21 -4
- data/src/core/lib/gprpp/fork.h +7 -5
- data/src/core/lib/gprpp/global_config.h +3 -3
- data/src/core/lib/gprpp/global_config_custom.h +3 -3
- data/src/core/lib/gprpp/global_config_env.cc +1 -0
- data/src/core/lib/gprpp/global_config_env.h +3 -3
- data/src/core/lib/gprpp/global_config_generic.h +3 -3
- data/src/core/lib/gprpp/host_port.cc +2 -0
- data/src/core/lib/gprpp/host_port.h +3 -3
- data/src/core/lib/gprpp/load_file.h +3 -3
- data/src/core/lib/gprpp/manual_constructor.h +3 -3
- data/src/core/lib/gprpp/match.h +3 -3
- data/src/core/lib/gprpp/memory.h +3 -3
- data/src/core/lib/gprpp/mpscq.h +3 -3
- data/src/core/lib/gprpp/no_destruct.h +3 -3
- data/src/core/lib/gprpp/notification.h +3 -3
- data/src/core/lib/gprpp/orphanable.h +3 -3
- data/src/core/lib/gprpp/overload.h +3 -3
- data/src/core/lib/gprpp/packed_table.h +3 -3
- data/src/core/lib/gprpp/per_cpu.h +3 -3
- data/src/core/lib/gprpp/ref_counted.h +3 -3
- data/src/core/lib/gprpp/ref_counted_ptr.h +3 -3
- data/src/core/lib/gprpp/single_set_ptr.h +3 -3
- data/src/core/lib/gprpp/sorted_pack.h +3 -3
- data/src/core/lib/gprpp/stat.h +3 -3
- data/src/core/lib/gprpp/status_helper.h +3 -3
- data/src/core/lib/gprpp/strerror.cc +2 -0
- data/src/core/lib/gprpp/strerror.h +3 -3
- data/src/core/lib/gprpp/sync.h +3 -3
- data/src/core/lib/gprpp/table.h +3 -3
- data/src/core/lib/gprpp/tchar.h +3 -3
- data/src/core/lib/gprpp/thd.h +3 -3
- data/src/core/lib/gprpp/time.cc +1 -0
- data/src/core/lib/gprpp/time.h +3 -3
- data/src/core/lib/gprpp/time_averaged_stats.h +3 -3
- data/src/core/lib/gprpp/time_util.h +3 -3
- data/src/core/lib/gprpp/unique_type_name.h +3 -3
- data/src/core/lib/gprpp/validation_errors.h +3 -3
- data/src/core/lib/gprpp/work_serializer.h +3 -3
- data/src/core/lib/handshaker/proxy_mapper.h +3 -3
- data/src/core/lib/handshaker/proxy_mapper_registry.h +3 -3
- data/src/core/lib/http/format_request.cc +1 -0
- data/src/core/lib/http/format_request.h +3 -3
- data/src/core/lib/http/httpcli.cc +1 -0
- data/src/core/lib/http/httpcli.h +3 -3
- data/src/core/lib/http/httpcli_ssl_credentials.h +3 -3
- data/src/core/lib/http/parser.h +3 -3
- data/src/core/lib/iomgr/block_annotate.h +3 -3
- data/src/core/lib/iomgr/buffer_list.h +3 -3
- data/src/core/lib/iomgr/call_combiner.cc +4 -4
- data/src/core/lib/iomgr/call_combiner.h +3 -3
- data/src/core/lib/iomgr/cfstream_handle.h +3 -3
- data/src/core/lib/iomgr/closure.cc +27 -0
- data/src/core/lib/iomgr/closure.h +5 -3
- data/src/core/lib/iomgr/combiner.h +3 -3
- data/src/core/lib/iomgr/dynamic_annotations.h +3 -3
- data/src/core/lib/iomgr/endpoint.h +3 -3
- data/src/core/lib/iomgr/endpoint_cfstream.h +3 -3
- data/src/core/lib/iomgr/endpoint_pair.h +3 -3
- data/src/core/lib/iomgr/endpoint_pair_windows.cc +10 -2
- data/src/core/lib/iomgr/error.h +3 -3
- data/src/core/lib/iomgr/error_cfstream.h +3 -3
- data/src/core/lib/iomgr/ev_apple.h +3 -3
- data/src/core/lib/iomgr/ev_epoll1_linux.h +3 -3
- data/src/core/lib/iomgr/ev_poll_posix.h +3 -3
- data/src/core/lib/iomgr/ev_posix.h +3 -3
- data/src/core/lib/iomgr/event_engine_shims/closure.cc +62 -0
- data/src/core/lib/iomgr/event_engine_shims/closure.h +39 -0
- data/src/core/lib/iomgr/event_engine_shims/endpoint.cc +430 -0
- data/src/core/lib/iomgr/event_engine_shims/endpoint.h +43 -0
- data/src/core/lib/iomgr/event_engine_shims/tcp_client.cc +91 -0
- data/src/core/lib/iomgr/event_engine_shims/tcp_client.h +44 -0
- data/src/core/lib/iomgr/exec_ctx.h +3 -3
- data/src/core/lib/iomgr/executor.h +3 -3
- data/src/core/lib/iomgr/fork_posix.cc +5 -4
- data/src/core/lib/iomgr/gethostname.h +3 -3
- data/src/core/lib/iomgr/grpc_if_nametoindex.h +3 -3
- data/src/core/lib/iomgr/internal_errqueue.h +3 -3
- data/src/core/lib/iomgr/iocp_windows.h +3 -3
- data/src/core/lib/iomgr/iomgr.h +3 -3
- data/src/core/lib/iomgr/iomgr_fwd.h +3 -3
- data/src/core/lib/iomgr/iomgr_internal.h +3 -3
- data/src/core/lib/iomgr/load_file.h +3 -3
- data/src/core/lib/iomgr/lockfree_event.h +3 -3
- data/src/core/lib/iomgr/nameser.h +3 -3
- data/src/core/lib/iomgr/polling_entity.h +3 -3
- data/src/core/lib/iomgr/pollset.h +3 -3
- data/src/core/lib/iomgr/pollset_set.h +3 -3
- data/src/core/lib/iomgr/pollset_set_windows.h +3 -3
- data/src/core/lib/iomgr/pollset_windows.cc +2 -2
- data/src/core/lib/iomgr/pollset_windows.h +3 -3
- data/src/core/lib/iomgr/port.h +3 -3
- data/src/core/lib/iomgr/python_util.h +3 -3
- data/src/core/lib/iomgr/resolve_address.h +3 -3
- data/src/core/lib/iomgr/resolve_address_impl.h +3 -3
- data/src/core/lib/iomgr/resolve_address_posix.h +3 -3
- data/src/core/lib/iomgr/resolve_address_windows.h +3 -3
- data/src/core/lib/iomgr/resolved_address.h +3 -3
- data/src/core/lib/iomgr/sockaddr.h +3 -3
- data/src/core/lib/iomgr/sockaddr_posix.h +3 -3
- data/src/core/lib/iomgr/sockaddr_windows.h +3 -3
- data/src/core/lib/iomgr/socket_factory_posix.h +3 -3
- data/src/core/lib/iomgr/socket_mutator.h +3 -3
- data/src/core/lib/iomgr/socket_utils.h +3 -3
- data/src/core/lib/iomgr/socket_utils_posix.h +3 -3
- data/src/core/lib/iomgr/socket_windows.h +3 -3
- data/src/core/lib/iomgr/systemd_utils.cc +19 -19
- data/src/core/lib/iomgr/systemd_utils.h +24 -24
- data/src/core/lib/iomgr/tcp_client.h +3 -3
- data/src/core/lib/iomgr/tcp_client_posix.cc +12 -0
- data/src/core/lib/iomgr/tcp_client_posix.h +3 -3
- data/src/core/lib/iomgr/tcp_client_windows.cc +13 -1
- data/src/core/lib/iomgr/tcp_posix.cc +49 -65
- data/src/core/lib/iomgr/tcp_posix.h +3 -3
- data/src/core/lib/iomgr/tcp_server.h +3 -3
- data/src/core/lib/iomgr/tcp_server_posix.cc +219 -4
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +13 -3
- data/src/core/lib/iomgr/tcp_server_windows.cc +4 -6
- data/src/core/lib/iomgr/tcp_windows.h +3 -3
- data/src/core/lib/iomgr/timer.h +3 -3
- data/src/core/lib/iomgr/timer_generic.h +3 -3
- data/src/core/lib/iomgr/timer_heap.h +3 -3
- data/src/core/lib/iomgr/timer_manager.h +3 -3
- data/src/core/lib/iomgr/unix_sockets_posix.h +3 -3
- data/src/core/lib/iomgr/wakeup_fd_pipe.h +3 -3
- data/src/core/lib/iomgr/wakeup_fd_posix.h +3 -3
- data/src/core/lib/json/json.h +3 -3
- data/src/core/lib/json/json_args.h +3 -3
- data/src/core/lib/json/json_channel_args.h +3 -3
- data/src/core/lib/json/json_object_loader.h +3 -3
- data/src/core/lib/json/json_reader.cc +1 -0
- data/src/core/lib/json/json_util.h +3 -3
- data/src/core/lib/load_balancing/lb_policy.cc +9 -0
- data/src/core/lib/load_balancing/lb_policy.h +9 -5
- data/src/core/lib/load_balancing/lb_policy_factory.h +3 -3
- data/src/core/lib/load_balancing/lb_policy_registry.cc +1 -0
- data/src/core/lib/load_balancing/lb_policy_registry.h +3 -3
- data/src/core/lib/load_balancing/subchannel_interface.h +8 -6
- data/src/core/lib/matchers/matchers.cc +1 -0
- data/src/core/lib/matchers/matchers.h +3 -3
- data/src/core/lib/promise/activity.cc +8 -6
- data/src/core/lib/promise/activity.h +52 -66
- data/src/core/lib/promise/arena_promise.h +3 -3
- data/src/core/lib/promise/context.h +3 -3
- data/src/core/lib/promise/detail/basic_join.h +197 -0
- data/src/core/lib/promise/detail/basic_seq.h +10 -16
- data/src/core/lib/promise/detail/promise_factory.h +3 -3
- data/src/core/lib/promise/detail/promise_like.h +3 -3
- data/src/core/lib/promise/detail/status.h +3 -3
- data/src/core/lib/promise/detail/switch.h +3 -3
- data/src/core/lib/promise/exec_ctx_wakeup_scheduler.h +3 -3
- data/src/core/lib/promise/if.h +195 -0
- data/src/core/lib/promise/interceptor_list.h +308 -0
- data/src/core/lib/promise/intra_activity_waiter.h +9 -3
- data/src/core/lib/promise/latch.h +99 -5
- data/src/core/lib/promise/loop.h +4 -4
- data/src/core/lib/promise/map.h +4 -6
- data/src/core/lib/promise/pipe.h +296 -193
- data/src/core/lib/promise/poll.h +113 -14
- data/src/core/lib/promise/promise.h +4 -5
- data/src/core/lib/promise/race.h +6 -9
- data/src/core/lib/promise/seq.h +3 -3
- data/src/core/lib/promise/sleep.h +3 -3
- data/src/core/lib/promise/{pipe.cc → trace.cc} +3 -2
- data/src/core/lib/promise/trace.h +24 -0
- data/src/core/lib/promise/try_join.h +82 -0
- data/src/core/lib/promise/try_seq.h +3 -3
- data/src/core/lib/resolver/resolver.h +3 -3
- data/src/core/lib/resolver/resolver_factory.h +4 -4
- data/src/core/lib/resolver/resolver_registry.cc +15 -0
- data/src/core/lib/resolver/resolver_registry.h +3 -3
- data/src/core/lib/resolver/server_address.cc +1 -0
- data/src/core/lib/resolver/server_address.h +3 -3
- data/src/core/lib/resource_quota/api.h +3 -3
- data/src/core/lib/resource_quota/arena.cc +36 -9
- data/src/core/lib/resource_quota/arena.h +84 -22
- data/src/core/lib/resource_quota/memory_quota.h +3 -3
- data/src/core/lib/resource_quota/periodic_update.h +3 -3
- data/src/core/lib/resource_quota/resource_quota.h +3 -3
- data/src/core/lib/resource_quota/thread_quota.h +3 -3
- data/src/core/lib/resource_quota/trace.h +3 -3
- data/src/core/lib/security/authorization/authorization_engine.h +3 -3
- data/src/core/lib/security/authorization/authorization_policy_provider.h +3 -3
- data/src/core/lib/security/authorization/evaluate_args.h +3 -3
- data/src/core/lib/security/authorization/grpc_authorization_engine.h +3 -3
- data/src/core/lib/security/authorization/grpc_server_authz_filter.h +3 -3
- data/src/core/lib/security/authorization/matchers.h +3 -3
- data/src/core/lib/security/authorization/rbac_policy.cc +1 -0
- data/src/core/lib/security/authorization/rbac_policy.h +3 -3
- data/src/core/lib/security/certificate_provider/certificate_provider_factory.h +3 -3
- data/src/core/lib/security/certificate_provider/certificate_provider_registry.h +3 -3
- data/src/core/lib/security/context/security_context.h +3 -3
- data/src/core/lib/security/credentials/alts/alts_credentials.h +3 -3
- data/src/core/lib/security/credentials/alts/check_gcp_environment.h +3 -3
- data/src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h +3 -3
- data/src/core/lib/security/credentials/call_creds_util.h +3 -3
- data/src/core/lib/security/credentials/channel_creds_registry.h +3 -3
- data/src/core/lib/security/credentials/composite/composite_credentials.h +3 -3
- data/src/core/lib/security/credentials/credentials.h +3 -3
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +1 -0
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.h +3 -3
- data/src/core/lib/security/credentials/external/aws_request_signer.cc +1 -0
- data/src/core/lib/security/credentials/external/aws_request_signer.h +3 -3
- data/src/core/lib/security/credentials/external/external_account_credentials.cc +1 -0
- data/src/core/lib/security/credentials/external/external_account_credentials.h +3 -3
- data/src/core/lib/security/credentials/external/file_external_account_credentials.h +3 -3
- data/src/core/lib/security/credentials/external/url_external_account_credentials.cc +1 -0
- data/src/core/lib/security/credentials/external/url_external_account_credentials.h +3 -3
- data/src/core/lib/security/credentials/fake/fake_credentials.h +3 -3
- data/src/core/lib/security/credentials/google_default/google_default_credentials.h +3 -3
- data/src/core/lib/security/credentials/iam/iam_credentials.cc +1 -0
- data/src/core/lib/security/credentials/iam/iam_credentials.h +3 -3
- data/src/core/lib/security/credentials/insecure/insecure_credentials.h +3 -3
- data/src/core/lib/security/credentials/jwt/json_token.h +3 -3
- data/src/core/lib/security/credentials/jwt/jwt_credentials.h +4 -3
- data/src/core/lib/security/credentials/jwt/jwt_verifier.h +3 -3
- data/src/core/lib/security/credentials/local/local_credentials.h +3 -3
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +4 -3
- data/src/core/lib/security/credentials/plugin/plugin_credentials.h +3 -3
- data/src/core/lib/security/credentials/ssl/ssl_credentials.h +3 -3
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h +3 -3
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +1 -1
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h +3 -3
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h +3 -3
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +3 -3
- data/src/core/lib/security/credentials/tls/tls_credentials.h +3 -3
- data/src/core/lib/security/credentials/tls/tls_utils.h +3 -3
- data/src/core/lib/security/credentials/xds/xds_credentials.h +3 -3
- data/src/core/lib/security/security_connector/alts/alts_security_connector.h +3 -3
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +1 -0
- data/src/core/lib/security/security_connector/fake/fake_security_connector.h +3 -3
- data/src/core/lib/security/security_connector/insecure/insecure_security_connector.h +3 -3
- data/src/core/lib/security/security_connector/load_system_roots.h +3 -3
- data/src/core/lib/security/security_connector/load_system_roots_supported.h +3 -3
- data/src/core/lib/security/security_connector/local/local_security_connector.h +3 -3
- data/src/core/lib/security/security_connector/security_connector.h +3 -3
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +1 -0
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.h +3 -3
- data/src/core/lib/security/security_connector/ssl_utils.h +3 -3
- data/src/core/lib/security/security_connector/ssl_utils_config.h +3 -3
- data/src/core/lib/security/security_connector/tls/tls_security_connector.h +3 -3
- data/src/core/lib/security/transport/auth_filters.h +27 -5
- data/src/core/lib/security/transport/secure_endpoint.h +3 -3
- data/src/core/lib/security/transport/security_handshaker.cc +9 -0
- data/src/core/lib/security/transport/security_handshaker.h +3 -3
- data/src/core/lib/security/transport/server_auth_filter.cc +120 -251
- data/src/core/lib/security/transport/tsi_error.h +3 -3
- data/src/core/lib/security/util/json_util.h +3 -3
- data/src/core/lib/service_config/service_config.h +3 -3
- data/src/core/lib/service_config/service_config_call_data.h +3 -3
- data/src/core/lib/service_config/service_config_impl.h +3 -3
- data/src/core/lib/service_config/service_config_parser.h +3 -3
- data/src/core/lib/slice/b64.h +3 -3
- data/src/core/lib/slice/percent_encoding.h +3 -3
- data/src/core/lib/slice/slice.cc +3 -3
- data/src/core/lib/slice/slice.h +14 -21
- data/src/core/lib/slice/slice_buffer.h +10 -4
- data/src/core/lib/slice/slice_internal.h +3 -3
- data/src/core/lib/slice/slice_refcount.cc +20 -0
- data/src/core/lib/slice/slice_refcount.h +26 -6
- data/src/core/lib/slice/slice_string_helpers.h +3 -3
- data/src/core/lib/surface/api_trace.h +3 -3
- data/src/core/lib/surface/builtins.h +3 -3
- data/src/core/lib/surface/call.cc +866 -252
- data/src/core/lib/surface/call.h +31 -3
- data/src/core/lib/surface/call_log_batch.cc +1 -0
- data/src/core/lib/surface/call_test_only.h +3 -3
- data/src/core/lib/surface/call_trace.cc +21 -11
- data/src/core/lib/surface/call_trace.h +3 -3
- data/src/core/lib/surface/channel.h +3 -3
- data/src/core/lib/surface/channel_init.h +3 -3
- data/src/core/lib/surface/channel_stack_type.h +3 -3
- data/src/core/lib/surface/completion_queue.cc +1 -0
- data/src/core/lib/surface/completion_queue.h +3 -3
- data/src/core/lib/surface/completion_queue_factory.h +3 -3
- data/src/core/lib/surface/event_string.cc +1 -0
- data/src/core/lib/surface/event_string.h +3 -3
- data/src/core/lib/surface/init.cc +1 -1
- data/src/core/lib/surface/init.h +3 -3
- data/src/core/lib/surface/init_internally.h +3 -3
- data/src/core/lib/surface/lame_client.cc +3 -1
- data/src/core/lib/surface/lame_client.h +3 -3
- data/src/core/lib/surface/server.cc +273 -27
- data/src/core/lib/surface/server.h +6 -3
- data/src/core/lib/surface/validate_metadata.h +3 -3
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/bdp_estimator.h +3 -3
- data/src/core/lib/transport/connectivity_state.h +3 -3
- data/src/core/lib/transport/error_utils.h +3 -3
- data/src/core/lib/transport/handshaker.cc +11 -0
- data/src/core/lib/transport/handshaker.h +4 -4
- data/src/core/lib/transport/handshaker_factory.h +3 -3
- data/src/core/lib/transport/handshaker_registry.h +3 -3
- data/src/core/lib/transport/http2_errors.h +3 -3
- data/src/core/lib/transport/http_connect_handshaker.h +3 -3
- data/src/core/lib/transport/metadata_batch.cc +11 -0
- data/src/core/lib/transport/metadata_batch.h +24 -3
- data/src/core/lib/transport/parsed_metadata.h +3 -3
- data/src/core/lib/transport/pid_controller.h +3 -3
- data/src/core/lib/transport/status_conversion.h +3 -3
- data/src/core/lib/transport/tcp_connect_handshaker.cc +0 -1
- data/src/core/lib/transport/tcp_connect_handshaker.h +3 -3
- data/src/core/lib/transport/timeout_encoding.h +3 -3
- data/src/core/lib/transport/transport.cc +3 -8
- data/src/core/lib/transport/transport.h +16 -8
- data/src/core/lib/transport/transport_fwd.h +3 -3
- data/src/core/lib/transport/transport_impl.h +3 -3
- data/src/core/lib/transport/transport_op_string.cc +1 -0
- data/src/core/lib/uri/uri_parser.cc +1 -1
- data/src/core/lib/uri/uri_parser.h +3 -3
- data/src/core/plugin_registry/grpc_plugin_registry.cc +5 -0
- data/src/core/tsi/alts/crypt/gsec.h +3 -3
- data/src/core/tsi/alts/frame_protector/alts_counter.h +3 -3
- data/src/core/tsi/alts/frame_protector/alts_crypter.h +3 -3
- data/src/core/tsi/alts/frame_protector/alts_frame_protector.h +3 -3
- data/src/core/tsi/alts/frame_protector/alts_record_protocol_crypter_common.h +3 -3
- data/src/core/tsi/alts/frame_protector/frame_handler.h +3 -3
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.h +3 -3
- data/src/core/tsi/alts/handshaker/alts_shared_resource.h +3 -3
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +3 -3
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h +3 -3
- data/src/core/tsi/alts/handshaker/alts_tsi_utils.h +3 -3
- data/src/core/tsi/alts/handshaker/transport_security_common_api.h +3 -3
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.h +3 -3
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.h +3 -3
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol.h +3 -3
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.h +3 -3
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h +3 -3
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h +3 -3
- data/src/core/tsi/fake_transport_security.h +3 -3
- data/src/core/tsi/local_transport_security.h +3 -3
- data/src/core/tsi/ssl/key_logging/ssl_key_logging.cc +1 -1
- data/src/core/tsi/ssl/key_logging/ssl_key_logging.h +3 -3
- data/src/core/tsi/ssl/session_cache/ssl_session.h +3 -3
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.h +3 -3
- data/src/core/tsi/ssl_transport_security.cc +113 -24
- data/src/core/tsi/ssl_transport_security.h +5 -3
- data/src/core/tsi/ssl_transport_security_utils.h +3 -3
- data/src/core/tsi/ssl_types.h +3 -3
- data/src/core/tsi/transport_security.h +3 -3
- data/src/core/tsi/transport_security_grpc.h +3 -3
- data/src/core/tsi/transport_security_interface.h +3 -3
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/pb/generate_proto_ruby.sh +0 -6
- data/third_party/abseil-cpp/absl/algorithm/container.h +56 -57
- data/third_party/abseil-cpp/absl/base/attributes.h +39 -19
- data/third_party/abseil-cpp/absl/base/config.h +44 -3
- data/third_party/abseil-cpp/absl/base/internal/cycleclock.h +3 -18
- data/third_party/abseil-cpp/absl/base/internal/cycleclock_config.h +55 -0
- data/third_party/abseil-cpp/absl/base/internal/direct_mmap.h +2 -1
- data/third_party/abseil-cpp/absl/base/internal/inline_variable.h +3 -3
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc +2 -2
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.h +1 -1
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +10 -6
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.h +23 -24
- data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +3 -3
- data/third_party/abseil-cpp/absl/base/internal/spinlock.h +2 -6
- data/third_party/abseil-cpp/absl/base/internal/spinlock_win32.inc +4 -1
- data/third_party/abseil-cpp/absl/base/internal/strerror.cc +4 -4
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.cc +14 -10
- data/third_party/abseil-cpp/absl/base/internal/thread_annotations.h +9 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_identity.h +4 -0
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +3 -40
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h +62 -0
- data/third_party/abseil-cpp/absl/base/macros.h +4 -21
- data/third_party/abseil-cpp/absl/base/optimization.h +58 -6
- data/third_party/abseil-cpp/absl/base/options.h +1 -7
- data/third_party/abseil-cpp/absl/base/policy_checks.h +15 -13
- data/third_party/abseil-cpp/absl/container/fixed_array.h +7 -5
- data/third_party/abseil-cpp/absl/container/flat_hash_set.h +0 -7
- data/third_party/abseil-cpp/absl/container/inlined_vector.h +66 -18
- data/third_party/abseil-cpp/absl/container/internal/common.h +3 -3
- data/third_party/abseil-cpp/absl/container/internal/common_policy_traits.h +132 -0
- data/third_party/abseil-cpp/absl/container/internal/container_memory.h +13 -1
- data/third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h +4 -55
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +50 -5
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +14 -46
- data/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +110 -32
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +155 -4
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +661 -341
- data/third_party/abseil-cpp/absl/crc/crc32c.cc +99 -0
- data/third_party/abseil-cpp/absl/crc/crc32c.h +183 -0
- data/third_party/abseil-cpp/absl/crc/internal/cpu_detect.cc +256 -0
- data/third_party/abseil-cpp/absl/crc/internal/cpu_detect.h +57 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc.cc +468 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc.h +91 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc32_x86_arm_combined_simd.h +269 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc32c.h +39 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc32c_inline.h +72 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc_cord_state.cc +130 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc_cord_state.h +159 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc_internal.h +179 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc_memcpy.h +119 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc_memcpy_fallback.cc +75 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc_memcpy_x86_64.cc +434 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc_non_temporal_memcpy.cc +93 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc_x86_arm_combined.cc +725 -0
- data/third_party/abseil-cpp/absl/crc/internal/non_temporal_arm_intrinsics.h +79 -0
- data/third_party/abseil-cpp/absl/crc/internal/non_temporal_memcpy.h +180 -0
- data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc +1 -1
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +67 -38
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.h +1 -1
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc +12 -13
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +11 -9
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc +1 -1
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_riscv-inl.inc +40 -85
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc +5 -4
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +33 -8
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc +3 -2
- data/third_party/abseil-cpp/absl/debugging/symbolize_darwin.inc +3 -2
- data/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +118 -94
- data/third_party/abseil-cpp/absl/debugging/symbolize_win32.inc +7 -6
- data/third_party/abseil-cpp/absl/functional/any_invocable.h +5 -2
- data/third_party/abseil-cpp/absl/functional/internal/any_invocable.h +47 -26
- data/third_party/abseil-cpp/absl/hash/internal/city.cc +10 -10
- data/third_party/abseil-cpp/absl/hash/internal/hash.h +18 -4
- data/third_party/abseil-cpp/absl/hash/internal/low_level_hash.cc +3 -14
- data/third_party/abseil-cpp/absl/memory/memory.h +26 -447
- data/third_party/abseil-cpp/absl/meta/type_traits.h +104 -12
- data/third_party/abseil-cpp/absl/numeric/bits.h +2 -3
- data/third_party/abseil-cpp/absl/numeric/int128.cc +10 -8
- data/third_party/abseil-cpp/absl/profiling/internal/sample_recorder.h +14 -6
- data/third_party/abseil-cpp/absl/random/internal/fast_uniform_bits.h +2 -1
- data/third_party/abseil-cpp/absl/random/internal/nonsecure_base.h +1 -1
- data/third_party/abseil-cpp/absl/random/internal/pcg_engine.h +2 -23
- data/third_party/abseil-cpp/absl/random/internal/pool_urbg.cc +9 -9
- data/third_party/abseil-cpp/absl/random/internal/seed_material.cc +2 -2
- data/third_party/abseil-cpp/absl/random/random.h +6 -6
- data/third_party/abseil-cpp/absl/status/internal/status_internal.h +1 -0
- data/third_party/abseil-cpp/absl/status/status.cc +19 -12
- data/third_party/abseil-cpp/absl/status/status.h +2 -2
- data/third_party/abseil-cpp/absl/strings/ascii.cc +5 -5
- data/third_party/abseil-cpp/absl/strings/charconv.cc +534 -96
- data/third_party/abseil-cpp/absl/strings/cord.cc +92 -40
- data/third_party/abseil-cpp/absl/strings/cord.h +71 -80
- data/third_party/abseil-cpp/absl/strings/cord_buffer.h +8 -5
- data/third_party/abseil-cpp/absl/strings/escaping.cc +73 -62
- data/third_party/abseil-cpp/absl/strings/escaping.h +24 -19
- data/third_party/abseil-cpp/absl/strings/internal/char_map.h +14 -12
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +4 -4
- data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc +2 -2
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +326 -70
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.cc +8 -4
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.h +26 -14
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.cc +5 -5
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_crc.cc +9 -7
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_crc.h +5 -4
- data/third_party/abseil-cpp/absl/strings/internal/cordz_functions.h +7 -15
- data/third_party/abseil-cpp/absl/strings/internal/cordz_handle.h +3 -3
- data/third_party/abseil-cpp/absl/strings/internal/cordz_info.cc +8 -5
- data/third_party/abseil-cpp/absl/strings/internal/cordz_info.h +7 -7
- data/third_party/abseil-cpp/absl/strings/internal/cordz_statistics.h +4 -4
- data/third_party/abseil-cpp/absl/strings/internal/damerau_levenshtein_distance.cc +93 -0
- data/third_party/abseil-cpp/absl/strings/internal/damerau_levenshtein_distance.h +34 -0
- data/third_party/abseil-cpp/absl/strings/internal/escaping.cc +12 -10
- data/third_party/abseil-cpp/absl/strings/internal/escaping.h +7 -9
- data/third_party/abseil-cpp/absl/strings/internal/has_absl_stringify.h +55 -0
- data/third_party/abseil-cpp/absl/strings/internal/memutil.cc +9 -6
- data/third_party/abseil-cpp/absl/strings/internal/ostringstream.cc +14 -7
- data/third_party/abseil-cpp/absl/strings/internal/ostringstream.h +35 -10
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +113 -46
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +126 -29
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc +3 -2
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +4 -3
- data/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +49 -287
- data/third_party/abseil-cpp/absl/strings/internal/str_format/constexpr_parser.h +351 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +2 -1
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +4 -2
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +215 -181
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc +10 -209
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +10 -101
- data/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h +2 -1
- data/third_party/abseil-cpp/absl/strings/internal/stringify_sink.cc +28 -0
- data/third_party/abseil-cpp/absl/strings/internal/stringify_sink.h +57 -0
- data/third_party/abseil-cpp/absl/strings/numbers.cc +34 -31
- data/third_party/abseil-cpp/absl/strings/str_cat.cc +9 -6
- data/third_party/abseil-cpp/absl/strings/str_cat.h +50 -3
- data/third_party/abseil-cpp/absl/strings/str_format.h +71 -9
- data/third_party/abseil-cpp/absl/strings/string_view.cc +6 -6
- data/third_party/abseil-cpp/absl/strings/string_view.h +3 -10
- data/third_party/abseil-cpp/absl/strings/substitute.cc +8 -6
- data/third_party/abseil-cpp/absl/strings/substitute.h +46 -20
- data/third_party/abseil-cpp/absl/synchronization/internal/futex.h +20 -17
- data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +37 -31
- data/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.h +22 -8
- data/third_party/abseil-cpp/absl/synchronization/mutex.cc +104 -55
- data/third_party/abseil-cpp/absl/synchronization/mutex.h +85 -46
- data/third_party/abseil-cpp/absl/synchronization/notification.cc +0 -1
- data/third_party/abseil-cpp/absl/synchronization/notification.h +0 -1
- data/third_party/abseil-cpp/absl/time/civil_time.cc +26 -0
- data/third_party/abseil-cpp/absl/time/civil_time.h +25 -0
- data/third_party/abseil-cpp/absl/time/clock.cc +17 -11
- data/third_party/abseil-cpp/absl/time/duration.cc +7 -7
- data/third_party/abseil-cpp/absl/time/format.cc +2 -1
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc +1 -1
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.cc +26 -5
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc +7 -6
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc +36 -35
- data/third_party/abseil-cpp/absl/time/time.cc +2 -2
- data/third_party/abseil-cpp/absl/time/time.h +253 -158
- data/third_party/abseil-cpp/absl/types/internal/span.h +30 -19
- data/third_party/abseil-cpp/absl/types/internal/variant.h +28 -40
- data/third_party/abseil-cpp/absl/types/span.h +29 -7
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_genn.c +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +1 -2
- metadata +73 -8
- data/src/core/lib/event_engine/socket_notifier.h +0 -55
- data/src/core/lib/promise/for_each.h +0 -155
- data/src/core/lib/promise/map_pipe.h +0 -88
- data/src/core/lib/promise/try_concurrently.h +0 -342
@@ -40,7 +40,8 @@ void SubstituteAndAppendArray(std::string* output, absl::string_view format,
|
|
40
40
|
absl::CEscape(format).c_str());
|
41
41
|
#endif
|
42
42
|
return;
|
43
|
-
} else if (absl::ascii_isdigit(
|
43
|
+
} else if (absl::ascii_isdigit(
|
44
|
+
static_cast<unsigned char>(format[i + 1]))) {
|
44
45
|
int index = format[i + 1] - '0';
|
45
46
|
if (static_cast<size_t>(index) >= num_args) {
|
46
47
|
#ifndef NDEBUG
|
@@ -80,7 +81,7 @@ void SubstituteAndAppendArray(std::string* output, absl::string_view format,
|
|
80
81
|
char* target = &(*output)[original_size];
|
81
82
|
for (size_t i = 0; i < format.size(); i++) {
|
82
83
|
if (format[i] == '$') {
|
83
|
-
if (absl::ascii_isdigit(format[i + 1])) {
|
84
|
+
if (absl::ascii_isdigit(static_cast<unsigned char>(format[i + 1]))) {
|
84
85
|
const absl::string_view src = args_array[format[i + 1] - '0'];
|
85
86
|
target = std::copy(src.begin(), src.end(), target);
|
86
87
|
++i; // Skip next char.
|
@@ -110,7 +111,8 @@ Arg::Arg(const void* value) {
|
|
110
111
|
} while (num != 0);
|
111
112
|
*--ptr = 'x';
|
112
113
|
*--ptr = '0';
|
113
|
-
piece_ = absl::string_view(
|
114
|
+
piece_ = absl::string_view(
|
115
|
+
ptr, static_cast<size_t>(scratch_ + sizeof(scratch_) - ptr));
|
114
116
|
}
|
115
117
|
}
|
116
118
|
|
@@ -132,7 +134,7 @@ Arg::Arg(Hex hex) {
|
|
132
134
|
beg = writer;
|
133
135
|
}
|
134
136
|
|
135
|
-
piece_ = absl::string_view(beg, end - beg);
|
137
|
+
piece_ = absl::string_view(beg, static_cast<size_t>(end - beg));
|
136
138
|
}
|
137
139
|
|
138
140
|
// TODO(jorg): Don't duplicate so much code between here and str_cat.cc
|
@@ -147,7 +149,7 @@ Arg::Arg(Dec dec) {
|
|
147
149
|
*--writer = '0' + (value % 10);
|
148
150
|
value /= 10;
|
149
151
|
}
|
150
|
-
*--writer = '0' + value;
|
152
|
+
*--writer = '0' + static_cast<char>(value);
|
151
153
|
if (neg) *--writer = '-';
|
152
154
|
|
153
155
|
ptrdiff_t fillers = writer - minfill;
|
@@ -164,7 +166,7 @@ Arg::Arg(Dec dec) {
|
|
164
166
|
if (add_sign_again) *--writer = '-';
|
165
167
|
}
|
166
168
|
|
167
|
-
piece_ = absl::string_view(writer, end - writer);
|
169
|
+
piece_ = absl::string_view(writer, static_cast<size_t>(end - writer));
|
168
170
|
}
|
169
171
|
|
170
172
|
} // namespace substitute_internal
|
@@ -55,6 +55,8 @@
|
|
55
55
|
// * bool (Printed as "true" or "false")
|
56
56
|
// * pointer types other than char* (Printed as "0x<lower case hex string>",
|
57
57
|
// except that null is printed as "NULL")
|
58
|
+
// * user-defined types via the `AbslStringify()` customization point. See the
|
59
|
+
// documentation for `absl::StrCat` for an explanation on how to use this.
|
58
60
|
//
|
59
61
|
// If an invalid format string is provided, Substitute returns an empty string
|
60
62
|
// and SubstituteAndAppend does not change the provided output string.
|
@@ -79,6 +81,7 @@
|
|
79
81
|
#include "absl/base/port.h"
|
80
82
|
#include "absl/strings/ascii.h"
|
81
83
|
#include "absl/strings/escaping.h"
|
84
|
+
#include "absl/strings/internal/stringify_sink.h"
|
82
85
|
#include "absl/strings/numbers.h"
|
83
86
|
#include "absl/strings/str_cat.h"
|
84
87
|
#include "absl/strings/str_split.h"
|
@@ -102,14 +105,14 @@ class Arg {
|
|
102
105
|
// Overloads for string-y things
|
103
106
|
//
|
104
107
|
// Explicitly overload `const char*` so the compiler doesn't cast to `bool`.
|
105
|
-
Arg(const char* value) // NOLINT(
|
108
|
+
Arg(const char* value) // NOLINT(google-explicit-constructor)
|
106
109
|
: piece_(absl::NullSafeStringView(value)) {}
|
107
110
|
template <typename Allocator>
|
108
111
|
Arg( // NOLINT
|
109
112
|
const std::basic_string<char, std::char_traits<char>, Allocator>&
|
110
113
|
value) noexcept
|
111
114
|
: piece_(value) {}
|
112
|
-
Arg(absl::string_view value) // NOLINT(
|
115
|
+
Arg(absl::string_view value) // NOLINT(google-explicit-constructor)
|
113
116
|
: piece_(value) {}
|
114
117
|
|
115
118
|
// Overloads for primitives
|
@@ -119,45 +122,67 @@ class Arg {
|
|
119
122
|
// probably using them as 8-bit integers and would probably prefer an integer
|
120
123
|
// representation. However, we can't really know, so we make the caller decide
|
121
124
|
// what to do.
|
122
|
-
Arg(char value) // NOLINT(
|
125
|
+
Arg(char value) // NOLINT(google-explicit-constructor)
|
123
126
|
: piece_(scratch_, 1) {
|
124
127
|
scratch_[0] = value;
|
125
128
|
}
|
126
129
|
Arg(short value) // NOLINT(*)
|
127
130
|
: piece_(scratch_,
|
128
|
-
|
131
|
+
static_cast<size_t>(
|
132
|
+
numbers_internal::FastIntToBuffer(value, scratch_) -
|
133
|
+
scratch_)) {}
|
129
134
|
Arg(unsigned short value) // NOLINT(*)
|
130
135
|
: piece_(scratch_,
|
131
|
-
|
132
|
-
|
136
|
+
static_cast<size_t>(
|
137
|
+
numbers_internal::FastIntToBuffer(value, scratch_) -
|
138
|
+
scratch_)) {}
|
139
|
+
Arg(int value) // NOLINT(google-explicit-constructor)
|
133
140
|
: piece_(scratch_,
|
134
|
-
|
135
|
-
|
141
|
+
static_cast<size_t>(
|
142
|
+
numbers_internal::FastIntToBuffer(value, scratch_) -
|
143
|
+
scratch_)) {}
|
144
|
+
Arg(unsigned int value) // NOLINT(google-explicit-constructor)
|
136
145
|
: piece_(scratch_,
|
137
|
-
|
146
|
+
static_cast<size_t>(
|
147
|
+
numbers_internal::FastIntToBuffer(value, scratch_) -
|
148
|
+
scratch_)) {}
|
138
149
|
Arg(long value) // NOLINT(*)
|
139
150
|
: piece_(scratch_,
|
140
|
-
|
151
|
+
static_cast<size_t>(
|
152
|
+
numbers_internal::FastIntToBuffer(value, scratch_) -
|
153
|
+
scratch_)) {}
|
141
154
|
Arg(unsigned long value) // NOLINT(*)
|
142
155
|
: piece_(scratch_,
|
143
|
-
|
156
|
+
static_cast<size_t>(
|
157
|
+
numbers_internal::FastIntToBuffer(value, scratch_) -
|
158
|
+
scratch_)) {}
|
144
159
|
Arg(long long value) // NOLINT(*)
|
145
160
|
: piece_(scratch_,
|
146
|
-
|
161
|
+
static_cast<size_t>(
|
162
|
+
numbers_internal::FastIntToBuffer(value, scratch_) -
|
163
|
+
scratch_)) {}
|
147
164
|
Arg(unsigned long long value) // NOLINT(*)
|
148
165
|
: piece_(scratch_,
|
149
|
-
|
150
|
-
|
166
|
+
static_cast<size_t>(
|
167
|
+
numbers_internal::FastIntToBuffer(value, scratch_) -
|
168
|
+
scratch_)) {}
|
169
|
+
Arg(float value) // NOLINT(google-explicit-constructor)
|
151
170
|
: piece_(scratch_, numbers_internal::SixDigitsToBuffer(value, scratch_)) {
|
152
171
|
}
|
153
|
-
Arg(double value) // NOLINT(
|
172
|
+
Arg(double value) // NOLINT(google-explicit-constructor)
|
154
173
|
: piece_(scratch_, numbers_internal::SixDigitsToBuffer(value, scratch_)) {
|
155
174
|
}
|
156
|
-
Arg(bool value) // NOLINT(
|
175
|
+
Arg(bool value) // NOLINT(google-explicit-constructor)
|
157
176
|
: piece_(value ? "true" : "false") {}
|
158
177
|
|
159
|
-
|
160
|
-
|
178
|
+
template <typename T, typename = typename std::enable_if<
|
179
|
+
strings_internal::HasAbslStringify<T>::value>::type>
|
180
|
+
Arg( // NOLINT(google-explicit-constructor)
|
181
|
+
const T& v, strings_internal::StringifySink&& sink = {})
|
182
|
+
: piece_(strings_internal::ExtractStringification(sink, v)) {}
|
183
|
+
|
184
|
+
Arg(Hex hex); // NOLINT(google-explicit-constructor)
|
185
|
+
Arg(Dec dec); // NOLINT(google-explicit-constructor)
|
161
186
|
|
162
187
|
// vector<bool>::reference and const_reference require special help to convert
|
163
188
|
// to `Arg` because it requires two user defined conversions.
|
@@ -172,13 +197,14 @@ class Arg {
|
|
172
197
|
|
173
198
|
// `void*` values, with the exception of `char*`, are printed as
|
174
199
|
// "0x<hex value>". However, in the case of `nullptr`, "NULL" is printed.
|
175
|
-
Arg(const void* value); // NOLINT(
|
200
|
+
Arg(const void* value); // NOLINT(google-explicit-constructor)
|
176
201
|
|
177
202
|
// Normal enums are already handled by the integer formatters.
|
178
203
|
// This overload matches only scoped enums.
|
179
204
|
template <typename T,
|
180
205
|
typename = typename std::enable_if<
|
181
|
-
std::is_enum<T>{} && !std::is_convertible<T, int>{}
|
206
|
+
std::is_enum<T>{} && !std::is_convertible<T, int>{} &&
|
207
|
+
!strings_internal::HasAbslStringify<T>::value>::type>
|
182
208
|
Arg(T value) // NOLINT(google-explicit-constructor)
|
183
209
|
: Arg(static_cast<typename std::underlying_type<T>::type>(value)) {}
|
184
210
|
|
@@ -87,7 +87,7 @@ class FutexImpl {
|
|
87
87
|
public:
|
88
88
|
static int WaitUntil(std::atomic<int32_t> *v, int32_t val,
|
89
89
|
KernelTimeout t) {
|
90
|
-
|
90
|
+
long err = 0; // NOLINT(runtime/int)
|
91
91
|
if (t.has_timeout()) {
|
92
92
|
// https://locklessinc.com/articles/futex_cheat_sheet/
|
93
93
|
// Unlike FUTEX_WAIT, FUTEX_WAIT_BITSET uses absolute time.
|
@@ -105,41 +105,44 @@ class FutexImpl {
|
|
105
105
|
FUTEX_WAIT | FUTEX_PRIVATE_FLAG, val, nullptr);
|
106
106
|
}
|
107
107
|
if (ABSL_PREDICT_FALSE(err != 0)) {
|
108
|
-
|
108
|
+
return -errno;
|
109
109
|
}
|
110
|
-
return
|
110
|
+
return 0;
|
111
111
|
}
|
112
112
|
|
113
113
|
static int WaitBitsetAbsoluteTimeout(std::atomic<int32_t> *v, int32_t val,
|
114
114
|
int32_t bits,
|
115
115
|
const struct timespec *abstime) {
|
116
|
-
|
117
|
-
|
118
|
-
|
116
|
+
// NOLINTNEXTLINE(runtime/int)
|
117
|
+
long err = syscall(SYS_futex, reinterpret_cast<int32_t*>(v),
|
118
|
+
FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG, val, abstime,
|
119
|
+
nullptr, bits);
|
119
120
|
if (ABSL_PREDICT_FALSE(err != 0)) {
|
120
|
-
|
121
|
+
return -errno;
|
121
122
|
}
|
122
|
-
return
|
123
|
+
return 0;
|
123
124
|
}
|
124
125
|
|
125
126
|
static int Wake(std::atomic<int32_t> *v, int32_t count) {
|
126
|
-
|
127
|
-
|
127
|
+
// NOLINTNEXTLINE(runtime/int)
|
128
|
+
long err = syscall(SYS_futex, reinterpret_cast<int32_t*>(v),
|
129
|
+
FUTEX_WAKE | FUTEX_PRIVATE_FLAG, count);
|
128
130
|
if (ABSL_PREDICT_FALSE(err < 0)) {
|
129
|
-
|
131
|
+
return -errno;
|
130
132
|
}
|
131
|
-
return
|
133
|
+
return 0;
|
132
134
|
}
|
133
135
|
|
134
136
|
// FUTEX_WAKE_BITSET
|
135
137
|
static int WakeBitset(std::atomic<int32_t> *v, int32_t count, int32_t bits) {
|
136
|
-
|
137
|
-
|
138
|
-
|
138
|
+
// NOLINTNEXTLINE(runtime/int)
|
139
|
+
long err = syscall(SYS_futex, reinterpret_cast<int32_t*>(v),
|
140
|
+
FUTEX_WAKE_BITSET | FUTEX_PRIVATE_FLAG, count, nullptr,
|
141
|
+
nullptr, bits);
|
139
142
|
if (ABSL_PREDICT_FALSE(err < 0)) {
|
140
|
-
|
143
|
+
return -errno;
|
141
144
|
}
|
142
|
-
return
|
145
|
+
return 0;
|
143
146
|
}
|
144
147
|
};
|
145
148
|
|
@@ -181,9 +181,9 @@ class NodeSet {
|
|
181
181
|
return true;
|
182
182
|
}
|
183
183
|
|
184
|
-
void erase(
|
184
|
+
void erase(int32_t v) {
|
185
185
|
uint32_t i = FindIndex(v);
|
186
|
-
if (
|
186
|
+
if (table_[i] == v) {
|
187
187
|
table_[i] = kDel;
|
188
188
|
}
|
189
189
|
}
|
@@ -195,7 +195,7 @@ class NodeSet {
|
|
195
195
|
for (int32_t elem, _cursor = 0; (eset).Next(&_cursor, &elem); )
|
196
196
|
bool Next(int32_t* cursor, int32_t* elem) {
|
197
197
|
while (static_cast<uint32_t>(*cursor) < table_.size()) {
|
198
|
-
int32_t v = table_[*cursor];
|
198
|
+
int32_t v = table_[static_cast<uint32_t>(*cursor)];
|
199
199
|
(*cursor)++;
|
200
200
|
if (v >= 0) {
|
201
201
|
*elem = v;
|
@@ -210,24 +210,26 @@ class NodeSet {
|
|
210
210
|
Vec<int32_t> table_;
|
211
211
|
uint32_t occupied_; // Count of non-empty slots (includes deleted slots)
|
212
212
|
|
213
|
-
static uint32_t Hash(
|
213
|
+
static uint32_t Hash(int32_t a) { return static_cast<uint32_t>(a * 41); }
|
214
214
|
|
215
215
|
// Return index for storing v. May return an empty index or deleted index
|
216
|
-
|
216
|
+
uint32_t FindIndex(int32_t v) const {
|
217
217
|
// Search starting at hash index.
|
218
218
|
const uint32_t mask = table_.size() - 1;
|
219
219
|
uint32_t i = Hash(v) & mask;
|
220
|
-
|
220
|
+
uint32_t deleted_index = 0; // index of first deleted element we see
|
221
|
+
bool seen_deleted_element = false;
|
221
222
|
while (true) {
|
222
223
|
int32_t e = table_[i];
|
223
224
|
if (v == e) {
|
224
225
|
return i;
|
225
226
|
} else if (e == kEmpty) {
|
226
227
|
// Return any previously encountered deleted slot.
|
227
|
-
return
|
228
|
-
} else if (e == kDel &&
|
228
|
+
return seen_deleted_element ? deleted_index : i;
|
229
|
+
} else if (e == kDel && !seen_deleted_element) {
|
229
230
|
// Keep searching since v might be present later.
|
230
231
|
deleted_index = i;
|
232
|
+
seen_deleted_element = true;
|
231
233
|
}
|
232
234
|
i = (i + 1) & mask; // Linear probing; quadratic is slightly slower.
|
233
235
|
}
|
@@ -268,7 +270,7 @@ inline GraphId MakeId(int32_t index, uint32_t version) {
|
|
268
270
|
}
|
269
271
|
|
270
272
|
inline int32_t NodeIndex(GraphId id) {
|
271
|
-
return static_cast<
|
273
|
+
return static_cast<int32_t>(id.handle);
|
272
274
|
}
|
273
275
|
|
274
276
|
inline uint32_t NodeVersion(GraphId id) {
|
@@ -298,7 +300,7 @@ class PointerMap {
|
|
298
300
|
int32_t Find(void* ptr) {
|
299
301
|
auto masked = base_internal::HidePtr(ptr);
|
300
302
|
for (int32_t i = table_[Hash(ptr)]; i != -1;) {
|
301
|
-
Node* n = (*nodes_)[i];
|
303
|
+
Node* n = (*nodes_)[static_cast<uint32_t>(i)];
|
302
304
|
if (n->masked_ptr == masked) return i;
|
303
305
|
i = n->next_hash;
|
304
306
|
}
|
@@ -307,7 +309,7 @@ class PointerMap {
|
|
307
309
|
|
308
310
|
void Add(void* ptr, int32_t i) {
|
309
311
|
int32_t* head = &table_[Hash(ptr)];
|
310
|
-
(*nodes_)[i]->next_hash = *head;
|
312
|
+
(*nodes_)[static_cast<uint32_t>(i)]->next_hash = *head;
|
311
313
|
*head = i;
|
312
314
|
}
|
313
315
|
|
@@ -317,7 +319,7 @@ class PointerMap {
|
|
317
319
|
auto masked = base_internal::HidePtr(ptr);
|
318
320
|
for (int32_t* slot = &table_[Hash(ptr)]; *slot != -1; ) {
|
319
321
|
int32_t index = *slot;
|
320
|
-
Node* n = (*nodes_)[index];
|
322
|
+
Node* n = (*nodes_)[static_cast<uint32_t>(index)];
|
321
323
|
if (n->masked_ptr == masked) {
|
322
324
|
*slot = n->next_hash; // Remove n from linked list
|
323
325
|
n->next_hash = -1;
|
@@ -358,7 +360,7 @@ struct GraphCycles::Rep {
|
|
358
360
|
};
|
359
361
|
|
360
362
|
static Node* FindNode(GraphCycles::Rep* rep, GraphId id) {
|
361
|
-
Node* n = rep->nodes_[NodeIndex(id)];
|
363
|
+
Node* n = rep->nodes_[static_cast<uint32_t>(NodeIndex(id))];
|
362
364
|
return (n->version == NodeVersion(id)) ? n : nullptr;
|
363
365
|
}
|
364
366
|
|
@@ -393,7 +395,7 @@ bool GraphCycles::CheckInvariants() const {
|
|
393
395
|
ABSL_RAW_LOG(FATAL, "Duplicate occurrence of rank %d", nx->rank);
|
394
396
|
}
|
395
397
|
HASH_FOR_EACH(y, nx->out) {
|
396
|
-
Node* ny = r->nodes_[y];
|
398
|
+
Node* ny = r->nodes_[static_cast<uint32_t>(y)];
|
397
399
|
if (nx->rank >= ny->rank) {
|
398
400
|
ABSL_RAW_LOG(FATAL, "Edge %u->%d has bad rank assignment %d->%d", x, y,
|
399
401
|
nx->rank, ny->rank);
|
@@ -406,14 +408,14 @@ bool GraphCycles::CheckInvariants() const {
|
|
406
408
|
GraphId GraphCycles::GetId(void* ptr) {
|
407
409
|
int32_t i = rep_->ptrmap_.Find(ptr);
|
408
410
|
if (i != -1) {
|
409
|
-
return MakeId(i, rep_->nodes_[i]->version);
|
411
|
+
return MakeId(i, rep_->nodes_[static_cast<uint32_t>(i)]->version);
|
410
412
|
} else if (rep_->free_nodes_.empty()) {
|
411
413
|
Node* n =
|
412
414
|
new (base_internal::LowLevelAlloc::AllocWithArena(sizeof(Node), arena))
|
413
415
|
Node;
|
414
416
|
n->version = 1; // Avoid 0 since it is used by InvalidGraphId()
|
415
417
|
n->visited = false;
|
416
|
-
n->rank = rep_->nodes_.size();
|
418
|
+
n->rank = static_cast<int32_t>(rep_->nodes_.size());
|
417
419
|
n->masked_ptr = base_internal::HidePtr(ptr);
|
418
420
|
n->nstack = 0;
|
419
421
|
n->priority = 0;
|
@@ -425,7 +427,7 @@ GraphId GraphCycles::GetId(void* ptr) {
|
|
425
427
|
// a permutation of [0,rep_->nodes_.size()-1].
|
426
428
|
int32_t r = rep_->free_nodes_.back();
|
427
429
|
rep_->free_nodes_.pop_back();
|
428
|
-
Node* n = rep_->nodes_[r];
|
430
|
+
Node* n = rep_->nodes_[static_cast<uint32_t>(r)];
|
429
431
|
n->masked_ptr = base_internal::HidePtr(ptr);
|
430
432
|
n->nstack = 0;
|
431
433
|
n->priority = 0;
|
@@ -439,12 +441,12 @@ void GraphCycles::RemoveNode(void* ptr) {
|
|
439
441
|
if (i == -1) {
|
440
442
|
return;
|
441
443
|
}
|
442
|
-
Node* x = rep_->nodes_[i];
|
444
|
+
Node* x = rep_->nodes_[static_cast<uint32_t>(i)];
|
443
445
|
HASH_FOR_EACH(y, x->out) {
|
444
|
-
rep_->nodes_[y]->in.erase(i);
|
446
|
+
rep_->nodes_[static_cast<uint32_t>(y)]->in.erase(i);
|
445
447
|
}
|
446
448
|
HASH_FOR_EACH(y, x->in) {
|
447
|
-
rep_->nodes_[y]->out.erase(i);
|
449
|
+
rep_->nodes_[static_cast<uint32_t>(y)]->out.erase(i);
|
448
450
|
}
|
449
451
|
x->in.clear();
|
450
452
|
x->out.clear();
|
@@ -520,7 +522,7 @@ bool GraphCycles::InsertEdge(GraphId idx, GraphId idy) {
|
|
520
522
|
// Since we do not call Reorder() on this path, clear any visited
|
521
523
|
// markers left by ForwardDFS.
|
522
524
|
for (const auto& d : r->deltaf_) {
|
523
|
-
r->nodes_[d]->visited = false;
|
525
|
+
r->nodes_[static_cast<uint32_t>(d)]->visited = false;
|
524
526
|
}
|
525
527
|
return false;
|
526
528
|
}
|
@@ -538,14 +540,14 @@ static bool ForwardDFS(GraphCycles::Rep* r, int32_t n, int32_t upper_bound) {
|
|
538
540
|
while (!r->stack_.empty()) {
|
539
541
|
n = r->stack_.back();
|
540
542
|
r->stack_.pop_back();
|
541
|
-
Node* nn = r->nodes_[n];
|
543
|
+
Node* nn = r->nodes_[static_cast<uint32_t>(n)];
|
542
544
|
if (nn->visited) continue;
|
543
545
|
|
544
546
|
nn->visited = true;
|
545
547
|
r->deltaf_.push_back(n);
|
546
548
|
|
547
549
|
HASH_FOR_EACH(w, nn->out) {
|
548
|
-
Node* nw = r->nodes_[w];
|
550
|
+
Node* nw = r->nodes_[static_cast<uint32_t>(w)];
|
549
551
|
if (nw->rank == upper_bound) {
|
550
552
|
return false; // Cycle
|
551
553
|
}
|
@@ -564,14 +566,14 @@ static void BackwardDFS(GraphCycles::Rep* r, int32_t n, int32_t lower_bound) {
|
|
564
566
|
while (!r->stack_.empty()) {
|
565
567
|
n = r->stack_.back();
|
566
568
|
r->stack_.pop_back();
|
567
|
-
Node* nn = r->nodes_[n];
|
569
|
+
Node* nn = r->nodes_[static_cast<uint32_t>(n)];
|
568
570
|
if (nn->visited) continue;
|
569
571
|
|
570
572
|
nn->visited = true;
|
571
573
|
r->deltab_.push_back(n);
|
572
574
|
|
573
575
|
HASH_FOR_EACH(w, nn->in) {
|
574
|
-
Node* nw = r->nodes_[w];
|
576
|
+
Node* nw = r->nodes_[static_cast<uint32_t>(w)];
|
575
577
|
if (!nw->visited && lower_bound < nw->rank) {
|
576
578
|
r->stack_.push_back(w);
|
577
579
|
}
|
@@ -596,7 +598,7 @@ static void Reorder(GraphCycles::Rep* r) {
|
|
596
598
|
|
597
599
|
// Assign the ranks in order to the collected list.
|
598
600
|
for (uint32_t i = 0; i < r->list_.size(); i++) {
|
599
|
-
r->nodes_[r->list_[i]]->rank = r->merged_[i];
|
601
|
+
r->nodes_[static_cast<uint32_t>(r->list_[i])]->rank = r->merged_[i];
|
600
602
|
}
|
601
603
|
}
|
602
604
|
|
@@ -604,7 +606,8 @@ static void Sort(const Vec<Node*>& nodes, Vec<int32_t>* delta) {
|
|
604
606
|
struct ByRank {
|
605
607
|
const Vec<Node*>* nodes;
|
606
608
|
bool operator()(int32_t a, int32_t b) const {
|
607
|
-
return (*nodes)[a]->rank <
|
609
|
+
return (*nodes)[static_cast<uint32_t>(a)]->rank <
|
610
|
+
(*nodes)[static_cast<uint32_t>(b)]->rank;
|
608
611
|
}
|
609
612
|
};
|
610
613
|
ByRank cmp;
|
@@ -616,8 +619,10 @@ static void MoveToList(
|
|
616
619
|
GraphCycles::Rep* r, Vec<int32_t>* src, Vec<int32_t>* dst) {
|
617
620
|
for (auto& v : *src) {
|
618
621
|
int32_t w = v;
|
619
|
-
|
620
|
-
r->nodes_[w]->
|
622
|
+
// Replace v entry with its rank
|
623
|
+
v = r->nodes_[static_cast<uint32_t>(w)]->rank;
|
624
|
+
// Prepare for future DFS calls
|
625
|
+
r->nodes_[static_cast<uint32_t>(w)]->visited = false;
|
621
626
|
dst->push_back(w);
|
622
627
|
}
|
623
628
|
}
|
@@ -647,7 +652,8 @@ int GraphCycles::FindPath(GraphId idx, GraphId idy, int max_path_len,
|
|
647
652
|
}
|
648
653
|
|
649
654
|
if (path_len < max_path_len) {
|
650
|
-
path[path_len] =
|
655
|
+
path[path_len] =
|
656
|
+
MakeId(n, rep_->nodes_[static_cast<uint32_t>(n)]->version);
|
651
657
|
}
|
652
658
|
path_len++;
|
653
659
|
r->stack_.push_back(-1); // Will remove tentative path entry
|
@@ -656,7 +662,7 @@ int GraphCycles::FindPath(GraphId idx, GraphId idy, int max_path_len,
|
|
656
662
|
return path_len;
|
657
663
|
}
|
658
664
|
|
659
|
-
HASH_FOR_EACH(w, r->nodes_[n]->out) {
|
665
|
+
HASH_FOR_EACH(w, r->nodes_[static_cast<uint32_t>(n)]->out) {
|
660
666
|
if (seen.insert(w)) {
|
661
667
|
r->stack_.push_back(w);
|
662
668
|
}
|
@@ -19,8 +19,8 @@
|
|
19
19
|
// Constructible from a absl::Time (for a timeout to be respected) or {}
|
20
20
|
// (for "no timeout".)
|
21
21
|
// This is a private low-level API for use by a handful of low-level
|
22
|
-
// components
|
23
|
-
//
|
22
|
+
// components. Higher-level components should build APIs based on
|
23
|
+
// absl::Time and absl::Duration.
|
24
24
|
|
25
25
|
#ifndef ABSL_SYNCHRONIZATION_INTERNAL_KERNEL_TIMEOUT_H_
|
26
26
|
#define ABSL_SYNCHRONIZATION_INTERNAL_KERNEL_TIMEOUT_H_
|
@@ -28,6 +28,7 @@
|
|
28
28
|
#include <time.h>
|
29
29
|
|
30
30
|
#include <algorithm>
|
31
|
+
#include <cstdint>
|
31
32
|
#include <limits>
|
32
33
|
|
33
34
|
#include "absl/base/internal/raw_logging.h"
|
@@ -38,7 +39,6 @@ namespace absl {
|
|
38
39
|
ABSL_NAMESPACE_BEGIN
|
39
40
|
namespace synchronization_internal {
|
40
41
|
|
41
|
-
class Futex;
|
42
42
|
class Waiter;
|
43
43
|
|
44
44
|
class KernelTimeout {
|
@@ -60,7 +60,10 @@ class KernelTimeout {
|
|
60
60
|
|
61
61
|
// Convert to parameter for sem_timedwait/futex/similar. Only for approved
|
62
62
|
// users. Do not call if !has_timeout.
|
63
|
-
struct timespec MakeAbsTimespec();
|
63
|
+
struct timespec MakeAbsTimespec() const;
|
64
|
+
|
65
|
+
// Convert to unix epoch nanos. Do not call if !has_timeout.
|
66
|
+
int64_t MakeAbsNanos() const;
|
64
67
|
|
65
68
|
private:
|
66
69
|
// internal rep, not user visible: ns after unix epoch.
|
@@ -111,7 +114,8 @@ class KernelTimeout {
|
|
111
114
|
constexpr uint64_t max_nanos =
|
112
115
|
(std::numeric_limits<int64_t>::max)() - 999999u;
|
113
116
|
uint64_t ms_from_now =
|
114
|
-
(std::min<uint64_t>(
|
117
|
+
((std::min)(max_nanos, static_cast<uint64_t>(ns_ - now)) + 999999u) /
|
118
|
+
1000000u;
|
115
119
|
if (ms_from_now > kInfinite) {
|
116
120
|
return kInfinite;
|
117
121
|
}
|
@@ -119,13 +123,12 @@ class KernelTimeout {
|
|
119
123
|
}
|
120
124
|
return 0;
|
121
125
|
}
|
122
|
-
#endif
|
123
126
|
|
124
|
-
friend class Futex;
|
125
127
|
friend class Waiter;
|
128
|
+
#endif
|
126
129
|
};
|
127
130
|
|
128
|
-
inline struct timespec KernelTimeout::MakeAbsTimespec() {
|
131
|
+
inline struct timespec KernelTimeout::MakeAbsTimespec() const {
|
129
132
|
int64_t n = ns_;
|
130
133
|
static const int64_t kNanosPerSecond = 1000 * 1000 * 1000;
|
131
134
|
if (n == 0) {
|
@@ -149,6 +152,17 @@ inline struct timespec KernelTimeout::MakeAbsTimespec() {
|
|
149
152
|
return abstime;
|
150
153
|
}
|
151
154
|
|
155
|
+
inline int64_t KernelTimeout::MakeAbsNanos() const {
|
156
|
+
if (ns_ == 0) {
|
157
|
+
ABSL_RAW_LOG(
|
158
|
+
ERROR, "Tried to create a timeout from a non-timeout; never do this.");
|
159
|
+
// But we'll try to continue sanely. no-timeout ~= saturated timeout.
|
160
|
+
return (std::numeric_limits<int64_t>::max)();
|
161
|
+
}
|
162
|
+
|
163
|
+
return ns_;
|
164
|
+
}
|
165
|
+
|
152
166
|
} // namespace synchronization_internal
|
153
167
|
ABSL_NAMESPACE_END
|
154
168
|
} // namespace absl
|