grpc 1.73.0 → 1.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Makefile +38 -17
- data/include/grpc/create_channel_from_endpoint.h +54 -0
- data/include/grpc/credentials.h +11 -5
- data/include/grpc/event_engine/event_engine.h +74 -17
- data/include/grpc/grpc_posix.h +20 -1
- data/include/grpc/impl/channel_arg_names.h +2 -4
- data/include/grpc/module.modulemap +1 -0
- data/include/grpc/support/json.h +24 -0
- data/src/core/call/interception_chain.h +7 -11
- data/src/core/channelz/channel_trace.cc +213 -115
- data/src/core/channelz/channel_trace.h +380 -86
- data/src/core/channelz/channelz.cc +270 -181
- data/src/core/channelz/channelz.h +168 -55
- data/src/core/channelz/channelz_registry.cc +2 -1
- data/src/core/channelz/channelz_registry.h +24 -0
- data/src/core/channelz/property_list.cc +357 -0
- data/src/core/channelz/property_list.h +202 -0
- data/src/core/channelz/ztrace_collector.h +3 -2
- data/src/core/client_channel/backup_poller.cc +17 -2
- data/src/core/client_channel/client_channel.cc +17 -28
- data/src/core/client_channel/client_channel_filter.cc +19 -29
- data/src/core/client_channel/config_selector.h +8 -2
- data/src/core/client_channel/dynamic_filters.cc +5 -6
- data/src/core/client_channel/dynamic_filters.h +1 -1
- data/src/core/client_channel/global_subchannel_pool.cc +4 -1
- data/src/core/client_channel/retry_filter.cc +21 -27
- data/src/core/client_channel/retry_filter.h +10 -7
- data/src/core/client_channel/retry_filter_legacy_call_data.cc +5 -5
- data/src/core/client_channel/retry_filter_legacy_call_data.h +1 -1
- data/src/core/client_channel/retry_interceptor.cc +30 -44
- data/src/core/client_channel/retry_interceptor.h +18 -17
- data/src/core/client_channel/retry_throttle.cc +46 -61
- data/src/core/client_channel/retry_throttle.h +17 -39
- data/src/core/client_channel/subchannel.cc +43 -19
- data/src/core/client_channel/subchannel.h +8 -0
- data/src/core/config/config_vars.cc +2 -0
- data/src/core/config/core_configuration.cc +1 -0
- data/src/core/config/core_configuration.h +11 -0
- data/src/core/credentials/call/call_creds_registry.h +125 -0
- data/src/core/credentials/call/call_creds_registry_init.cc +91 -0
- data/src/core/credentials/call/gcp_service_account_identity/gcp_service_account_identity_credentials.cc +6 -48
- data/src/core/credentials/call/jwt_token_file/jwt_token_file_call_credentials.cc +86 -0
- data/src/core/credentials/call/jwt_token_file/jwt_token_file_call_credentials.h +74 -0
- data/src/core/credentials/call/jwt_util.cc +70 -0
- data/src/core/credentials/call/jwt_util.h +32 -0
- data/src/core/credentials/transport/channel_creds_registry_init.cc +1 -1
- data/src/core/credentials/transport/google_default/google_default_credentials.cc +72 -4
- data/src/core/credentials/transport/ssl/ssl_credentials.cc +0 -1
- data/src/core/credentials/transport/tls/load_system_roots_supported.cc +1 -0
- data/src/core/credentials/transport/xds/xds_credentials.cc +0 -3
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc +8 -8
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h +16 -16
- data/src/core/ext/filters/http/client_authority_filter.cc +2 -4
- data/src/core/ext/filters/http/message_compress/compression_filter.h +25 -22
- data/src/core/ext/filters/http/server/http_server_filter.h +12 -11
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +120 -35
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +6 -5
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +162 -115
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +0 -3
- data/src/core/ext/transport/chttp2/transport/decode_huff.cc +1239 -3514
- data/src/core/ext/transport/chttp2/transport/decode_huff.h +1008 -1486
- data/src/core/ext/transport/chttp2/transport/flow_control.h +22 -17
- data/src/core/ext/transport/chttp2/transport/frame.cc +10 -0
- data/src/core/ext/transport/chttp2/transport/frame.h +2 -2
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +7 -8
- data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +4 -5
- data/src/core/ext/transport/chttp2/transport/header_assembler.h +299 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc +11 -5
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.h +12 -1
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.cc +1017 -0
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.h +593 -0
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +19 -22
- data/{third_party/abseil-cpp/absl/strings/cord_buffer.cc → src/core/ext/transport/chttp2/transport/http2_stats_collector.cc} +14 -14
- data/src/core/ext/transport/chttp2/transport/http2_stats_collector.h +33 -0
- data/src/core/ext/transport/chttp2/transport/http2_status.h +6 -1
- data/src/core/ext/transport/chttp2/transport/http2_transport.cc +43 -0
- data/src/core/ext/transport/chttp2/transport/http2_transport.h +65 -0
- data/src/core/ext/transport/chttp2/transport/http2_ztrace_collector.h +0 -29
- data/src/core/ext/transport/chttp2/transport/internal.h +18 -8
- data/src/core/ext/transport/chttp2/transport/keepalive.cc +105 -0
- data/src/core/ext/transport/chttp2/transport/keepalive.h +138 -0
- data/src/core/ext/transport/chttp2/transport/message_assembler.h +185 -0
- data/src/core/ext/transport/chttp2/transport/parsing.cc +2 -4
- data/src/core/ext/transport/chttp2/transport/ping_callbacks.h +19 -0
- data/src/core/ext/transport/chttp2/transport/ping_promise.cc +151 -0
- data/src/core/ext/transport/chttp2/transport/ping_promise.h +180 -0
- data/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc +5 -9
- data/src/core/ext/transport/chttp2/transport/ping_rate_policy.h +11 -0
- data/src/core/ext/transport/chttp2/transport/stream_lists.cc +39 -1
- data/src/core/ext/transport/chttp2/transport/transport_common.cc +19 -0
- data/src/core/ext/transport/chttp2/transport/transport_common.h +27 -0
- data/src/core/ext/transport/chttp2/transport/writing.cc +37 -11
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb.h +571 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb_minitable.c +120 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb_minitable.h +36 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb.h +1272 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb_minitable.c +312 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb_minitable.h +50 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/property_list.upb.h +984 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/property_list.upb_minitable.c +226 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/property_list.upb_minitable.h +44 -0
- data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/promise.upbdefs.c +175 -0
- data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/promise.upbdefs.h +82 -0
- data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/property_list.upbdefs.c +135 -0
- data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/property_list.upbdefs.h +67 -0
- data/src/core/filter/auth/auth_filters.h +0 -25
- data/src/core/filter/auth/client_auth_filter.cc +0 -118
- data/src/core/filter/filter_args.h +9 -23
- data/src/core/handshaker/handshaker.cc +23 -14
- data/src/core/handshaker/handshaker.h +3 -0
- data/src/core/handshaker/http_connect/http_connect_handshaker.cc +3 -1
- data/src/core/handshaker/security/legacy_secure_endpoint.cc +6 -5
- data/src/core/handshaker/security/secure_endpoint.cc +70 -25
- data/src/core/handshaker/security/security_handshaker.cc +4 -1
- data/src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc +7 -1
- data/src/core/lib/channel/channel_args.cc +15 -0
- data/src/core/lib/channel/channel_args.h +3 -0
- data/src/core/lib/channel/channel_stack.cc +22 -23
- data/src/core/lib/channel/channel_stack.h +9 -7
- data/src/core/lib/channel/channel_stack_builder_impl.cc +1 -1
- data/src/core/lib/channel/channel_stack_builder_impl.h +2 -7
- data/src/core/lib/channel/promise_based_filter.h +5 -5
- data/src/core/lib/debug/trace_impl.h +0 -1
- data/src/core/lib/event_engine/ares_resolver.cc +165 -46
- data/src/core/lib/event_engine/ares_resolver.h +48 -2
- data/src/core/lib/event_engine/cf_engine/cf_engine.cc +3 -1
- data/src/core/lib/event_engine/cf_engine/cf_engine.h +1 -4
- data/src/core/lib/event_engine/cf_engine/cfstream_endpoint.h +2 -6
- data/src/core/lib/event_engine/endpoint_channel_arg_wrapper.cc +40 -0
- data/src/core/lib/event_engine/endpoint_channel_arg_wrapper.h +60 -0
- data/src/core/lib/event_engine/event_engine.cc +7 -0
- data/src/core/lib/event_engine/extensions/channelz.h +10 -6
- data/src/core/lib/event_engine/grpc_polled_fd.h +5 -0
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +130 -162
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h +11 -15
- data/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc +75 -117
- data/src/core/lib/event_engine/posix_engine/ev_poll_posix.h +7 -9
- data/src/core/lib/event_engine/posix_engine/event_poller.h +18 -15
- data/src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc +0 -18
- data/src/core/lib/event_engine/posix_engine/file_descriptor_collection.cc +124 -0
- data/src/core/lib/event_engine/posix_engine/file_descriptor_collection.h +243 -0
- data/src/core/lib/event_engine/posix_engine/grpc_polled_fd_posix.h +29 -19
- data/src/core/lib/event_engine/posix_engine/internal_errqueue.cc +6 -2
- data/src/core/lib/event_engine/posix_engine/internal_errqueue.h +6 -1
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +145 -92
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.h +9 -19
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +333 -116
- data/src/core/lib/event_engine/posix_engine/posix_engine.h +61 -18
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc +45 -37
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener.h +6 -4
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc +32 -142
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.h +6 -5
- data/src/core/lib/event_engine/posix_engine/posix_interface.h +211 -0
- data/src/core/lib/event_engine/posix_engine/posix_interface_posix.cc +1083 -0
- data/src/core/lib/event_engine/posix_engine/posix_interface_windows.cc +281 -0
- data/src/core/lib/event_engine/posix_engine/posix_write_event_sink.cc +154 -0
- data/src/core/lib/event_engine/posix_engine/posix_write_event_sink.h +174 -0
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc +3 -719
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h +10 -170
- data/src/core/lib/event_engine/posix_engine/timer_manager.cc +33 -22
- data/src/core/lib/event_engine/posix_engine/timer_manager.h +13 -11
- data/src/core/lib/event_engine/posix_engine/traced_buffer_list.cc +117 -151
- data/src/core/lib/event_engine/posix_engine/traced_buffer_list.h +26 -94
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc +26 -25
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h +6 -2
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc +36 -62
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h +6 -2
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h +7 -6
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc +12 -6
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.h +3 -1
- data/src/core/lib/event_engine/shim.cc +9 -0
- data/src/core/lib/event_engine/shim.h +3 -0
- data/src/core/lib/event_engine/thread_pool/thread_pool.h +7 -3
- data/src/core/lib/event_engine/thread_pool/thread_pool_factory.cc +0 -17
- data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc +4 -2
- data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h +3 -2
- data/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc +4 -0
- data/src/core/lib/event_engine/windows/grpc_polled_fd_windows.h +4 -0
- data/src/core/lib/event_engine/windows/windows_endpoint.h +2 -6
- data/src/core/lib/event_engine/windows/windows_engine.cc +0 -1
- data/src/core/lib/event_engine/windows/windows_engine.h +1 -3
- data/src/core/lib/event_engine/windows/windows_listener.cc +14 -2
- data/src/core/lib/experiments/experiments.cc +45 -93
- data/src/core/lib/experiments/experiments.h +21 -51
- data/src/core/lib/iomgr/endpoint.cc +4 -3
- data/src/core/lib/iomgr/endpoint.h +7 -4
- data/src/core/lib/iomgr/endpoint_cfstream.cc +3 -2
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +7 -2
- data/src/core/lib/iomgr/ev_poll_posix.cc +7 -2
- data/src/core/lib/iomgr/event_engine_shims/endpoint.cc +4 -6
- data/src/core/lib/iomgr/tcp_posix.cc +12 -6
- data/src/core/lib/iomgr/tcp_windows.cc +3 -2
- data/src/core/lib/promise/activity.h +1 -0
- data/src/core/lib/promise/arena_promise.h +23 -7
- data/src/core/lib/promise/detail/promise_factory.h +10 -0
- data/src/core/lib/promise/detail/promise_like.h +118 -11
- data/src/core/lib/promise/detail/promise_variant.h +50 -0
- data/src/core/lib/promise/detail/seq_state.h +687 -548
- data/src/core/lib/promise/if.h +20 -0
- data/src/core/lib/promise/inter_activity_latch.h +147 -0
- data/src/core/lib/promise/inter_activity_mutex.h +547 -0
- data/src/core/lib/promise/loop.h +65 -3
- data/src/core/lib/promise/map.h +24 -0
- data/src/core/lib/promise/match_promise.h +103 -0
- data/src/core/lib/promise/mpsc.cc +425 -0
- data/src/core/lib/promise/mpsc.h +490 -0
- data/src/core/lib/promise/party.cc +50 -1
- data/src/core/lib/promise/party.h +66 -1
- data/src/core/lib/promise/race.h +31 -0
- data/src/core/lib/promise/seq.h +4 -1
- data/src/core/lib/promise/status_flag.h +7 -0
- data/src/core/lib/promise/try_seq.h +4 -1
- data/src/core/lib/promise/wait_set.cc +28 -0
- data/src/core/lib/promise/wait_set.h +86 -0
- data/src/core/lib/resource_quota/arena.h +19 -0
- data/src/core/lib/slice/slice.h +5 -0
- data/src/core/lib/surface/channel_create.cc +88 -13
- data/src/core/lib/surface/channel_create.h +4 -0
- data/src/core/lib/surface/channel_init.cc +164 -47
- data/src/core/lib/surface/channel_init.h +64 -1
- data/src/core/lib/surface/filter_stack_call.cc +18 -9
- data/src/core/lib/surface/init.cc +6 -15
- data/src/core/lib/surface/legacy_channel.cc +3 -5
- data/src/core/lib/surface/legacy_channel.h +3 -1
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/promise_endpoint.cc +110 -0
- data/src/core/lib/transport/promise_endpoint.h +307 -0
- data/src/core/load_balancing/child_policy_handler.cc +2 -4
- data/src/core/load_balancing/delegating_helper.h +2 -3
- data/src/core/load_balancing/health_check_client.cc +1 -5
- data/src/core/load_balancing/lb_policy.h +1 -3
- data/src/core/load_balancing/oob_backend_metric.cc +1 -5
- data/src/core/load_balancing/pick_first/pick_first.cc +3 -0
- data/src/core/load_balancing/xds/cds.cc +10 -1
- data/src/core/plugin_registry/grpc_plugin_registry_extra.cc +2 -0
- data/src/core/resolver/xds/xds_config.cc +6 -3
- data/src/core/resolver/xds/xds_config.h +9 -4
- data/src/core/resolver/xds/xds_dependency_manager.cc +21 -6
- data/src/core/resolver/xds/xds_dependency_manager.h +2 -1
- data/src/core/resolver/xds/xds_resolver.cc +31 -11
- data/src/core/server/server.cc +83 -12
- data/src/core/server/server.h +21 -2
- data/src/core/server/xds_server_config_fetcher.cc +63 -25
- data/src/core/service_config/service_config.h +1 -1
- data/src/core/service_config/service_config_impl.h +1 -1
- data/src/core/telemetry/context_list_entry.cc +38 -0
- data/src/core/telemetry/context_list_entry.h +42 -12
- data/src/core/telemetry/stats_data.cc +233 -207
- data/src/core/telemetry/stats_data.h +250 -153
- data/src/core/telemetry/tcp_tracer.h +1 -1
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +11 -3
- data/src/core/tsi/fake_transport_security.cc +17 -0
- data/src/core/tsi/ssl_transport_security.cc +2 -0
- data/src/core/tsi/transport_security_grpc.cc +8 -0
- data/src/core/tsi/transport_security_grpc.h +15 -0
- data/src/core/util/backoff.cc +1 -5
- data/src/core/util/backoff.h +1 -0
- data/src/core/util/down_cast.h +1 -1
- data/src/core/util/function_signature.h +15 -1
- data/src/core/util/http_client/httpcli.cc +12 -5
- data/src/core/util/http_client/httpcli.h +4 -1
- data/src/core/util/latent_see.h +8 -5
- data/src/core/util/log.cc +4 -0
- data/src/core/util/memory_usage.h +268 -0
- data/src/core/util/per_cpu.cc +2 -0
- data/src/core/util/per_cpu.h +7 -0
- data/src/core/util/shared_bit_gen.h +20 -0
- data/src/core/util/single_set_ptr.h +2 -2
- data/src/core/util/upb_utils.h +42 -0
- data/src/core/util/uri.cc +3 -2
- data/src/core/util/useful.h +53 -2
- data/src/core/util/wait_for_single_owner.cc +31 -0
- data/src/core/util/wait_for_single_owner.h +24 -0
- data/src/core/xds/grpc/xds_bootstrap_grpc.cc +2 -0
- data/src/core/xds/grpc/xds_bootstrap_grpc.h +5 -0
- data/src/core/xds/grpc/xds_client_grpc.cc +6 -2
- data/src/core/xds/grpc/xds_common_types_parser.cc +138 -50
- data/src/core/xds/grpc/xds_common_types_parser.h +12 -0
- data/src/core/xds/grpc/xds_http_filter.h +7 -0
- data/src/core/xds/grpc/xds_http_gcp_authn_filter.cc +22 -0
- data/src/core/xds/grpc/xds_http_gcp_authn_filter.h +3 -0
- data/src/core/xds/grpc/xds_route_config_parser.cc +15 -38
- data/src/core/xds/grpc/xds_server_grpc.cc +63 -13
- data/src/core/xds/grpc/xds_server_grpc.h +10 -2
- data/src/core/xds/grpc/xds_server_grpc_interface.h +4 -0
- data/src/core/xds/grpc/xds_transport_grpc.cc +18 -0
- data/src/core/xds/xds_client/xds_bootstrap.h +2 -0
- data/src/core/xds/xds_client/xds_client.cc +26 -5
- data/src/ruby/ext/grpc/extconf.rb +2 -0
- data/src/ruby/ext/grpc/rb_call.c +1 -8
- data/src/ruby/ext/grpc/rb_channel.c +72 -568
- data/src/ruby/ext/grpc/rb_channel.h +0 -3
- data/src/ruby/ext/grpc/rb_completion_queue.c +26 -14
- data/src/ruby/ext/grpc/rb_completion_queue.h +1 -7
- data/src/ruby/ext/grpc/rb_grpc.c +9 -5
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +1 -1
- data/src/ruby/ext/grpc/rb_loader.c +0 -4
- data/src/ruby/ext/grpc/rb_server.c +31 -50
- data/src/ruby/lib/grpc/generic/client_stub.rb +4 -4
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/spec/core_spec.rb +22 -0
- data/src/ruby/spec/generic/active_call_spec.rb +1 -1
- data/third_party/abseil-cpp/absl/algorithm/container.h +2 -19
- data/third_party/abseil-cpp/absl/base/attributes.h +76 -7
- data/third_party/abseil-cpp/absl/base/call_once.h +11 -12
- data/third_party/abseil-cpp/absl/base/config.h +20 -129
- data/third_party/abseil-cpp/absl/base/{internal/fast_type_id.h → fast_type_id.h} +11 -16
- data/third_party/abseil-cpp/absl/base/internal/cycleclock.cc +0 -5
- data/third_party/abseil-cpp/absl/base/internal/cycleclock_config.h +7 -7
- data/third_party/abseil-cpp/absl/base/internal/endian.h +34 -38
- data/third_party/abseil-cpp/absl/base/internal/iterator_traits.h +71 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc +6 -5
- data/third_party/abseil-cpp/absl/base/internal/{nullability_impl.h → nullability_deprecated.h} +45 -8
- data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +0 -9
- data/third_party/abseil-cpp/absl/base/internal/spinlock.h +3 -13
- data/third_party/abseil-cpp/absl/base/internal/unaligned_access.h +6 -6
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +8 -3
- data/third_party/abseil-cpp/absl/base/no_destructor.h +11 -32
- data/third_party/abseil-cpp/absl/base/nullability.h +84 -72
- data/third_party/abseil-cpp/absl/base/options.h +3 -80
- data/third_party/abseil-cpp/absl/base/policy_checks.h +7 -7
- data/third_party/abseil-cpp/absl/cleanup/cleanup.h +1 -3
- data/third_party/abseil-cpp/absl/cleanup/internal/cleanup.h +3 -4
- data/third_party/abseil-cpp/absl/container/btree_map.h +4 -2
- data/third_party/abseil-cpp/absl/container/btree_set.h +4 -2
- data/third_party/abseil-cpp/absl/container/fixed_array.h +7 -14
- data/third_party/abseil-cpp/absl/container/flat_hash_map.h +5 -0
- data/third_party/abseil-cpp/absl/container/flat_hash_set.h +6 -1
- data/third_party/abseil-cpp/absl/container/inlined_vector.h +8 -5
- data/third_party/abseil-cpp/absl/container/internal/btree.h +132 -29
- data/third_party/abseil-cpp/absl/container/internal/btree_container.h +175 -71
- data/third_party/abseil-cpp/absl/container/internal/common.h +43 -0
- data/third_party/abseil-cpp/absl/container/internal/common_policy_traits.h +1 -2
- data/third_party/abseil-cpp/absl/container/internal/container_memory.h +9 -10
- data/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h +1 -8
- data/third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h +0 -4
- data/third_party/abseil-cpp/absl/container/internal/hashtable_control_bytes.h +527 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +20 -4
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +31 -12
- data/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +2 -7
- data/third_party/abseil-cpp/absl/container/internal/layout.h +26 -42
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_map.h +199 -68
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +1354 -183
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +881 -1424
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set_resize_impl.h +80 -0
- data/third_party/abseil-cpp/absl/crc/crc32c.cc +0 -4
- data/third_party/abseil-cpp/absl/crc/crc32c.h +7 -5
- data/third_party/abseil-cpp/absl/crc/internal/crc32_x86_arm_combined_simd.h +0 -22
- data/third_party/abseil-cpp/absl/crc/internal/crc_x86_arm_combined.cc +45 -74
- data/third_party/abseil-cpp/absl/debugging/internal/addresses.h +57 -0
- data/third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.cc +1 -1
- data/third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.h +5 -5
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +8 -35
- data/third_party/abseil-cpp/absl/debugging/internal/demangle_rust.cc +16 -16
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +40 -37
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_arm-inl.inc +16 -7
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_emscripten-inl.inc +14 -5
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc +10 -4
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc +27 -16
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_riscv-inl.inc +13 -4
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_unimplemented-inl.inc +4 -3
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc +15 -28
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +19 -9
- data/third_party/abseil-cpp/absl/debugging/stacktrace.cc +144 -27
- data/third_party/abseil-cpp/absl/debugging/stacktrace.h +73 -5
- data/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +19 -9
- data/third_party/abseil-cpp/absl/debugging/symbolize_emscripten.inc +3 -2
- data/third_party/abseil-cpp/absl/debugging/symbolize_win32.inc +25 -6
- data/third_party/abseil-cpp/absl/flags/commandlineflag.h +2 -2
- data/third_party/abseil-cpp/absl/flags/flag.h +4 -3
- data/third_party/abseil-cpp/absl/flags/internal/commandlineflag.h +2 -2
- data/third_party/abseil-cpp/absl/flags/internal/flag.cc +2 -1
- data/third_party/abseil-cpp/absl/flags/internal/flag.h +7 -6
- data/third_party/abseil-cpp/absl/flags/internal/registry.h +4 -3
- data/third_party/abseil-cpp/absl/flags/reflection.cc +2 -3
- data/third_party/abseil-cpp/absl/functional/any_invocable.h +8 -10
- data/third_party/abseil-cpp/absl/functional/function_ref.h +2 -9
- data/third_party/abseil-cpp/absl/functional/internal/any_invocable.h +110 -226
- data/third_party/abseil-cpp/absl/functional/internal/front_binder.h +10 -12
- data/third_party/abseil-cpp/absl/functional/internal/function_ref.h +2 -5
- data/third_party/abseil-cpp/absl/hash/hash.h +18 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.cc +1 -5
- data/third_party/abseil-cpp/absl/hash/internal/hash.h +86 -61
- data/third_party/abseil-cpp/absl/hash/internal/low_level_hash.cc +25 -68
- data/third_party/abseil-cpp/absl/hash/internal/low_level_hash.h +2 -6
- data/third_party/abseil-cpp/absl/hash/internal/weakly_mixed_integer.h +38 -0
- data/third_party/abseil-cpp/absl/log/check.h +2 -1
- data/third_party/abseil-cpp/absl/log/globals.h +4 -5
- data/third_party/abseil-cpp/absl/log/internal/append_truncated.h +28 -0
- data/third_party/abseil-cpp/absl/log/internal/check_op.cc +22 -22
- data/third_party/abseil-cpp/absl/log/internal/check_op.h +65 -62
- data/third_party/abseil-cpp/absl/log/internal/conditions.cc +5 -3
- data/third_party/abseil-cpp/absl/log/internal/conditions.h +7 -2
- data/third_party/abseil-cpp/absl/log/internal/log_message.cc +85 -43
- data/third_party/abseil-cpp/absl/log/internal/log_message.h +84 -59
- data/third_party/abseil-cpp/absl/log/internal/nullstream.h +1 -0
- data/third_party/abseil-cpp/absl/log/internal/proto.cc +3 -2
- data/third_party/abseil-cpp/absl/log/internal/proto.h +3 -3
- data/third_party/abseil-cpp/absl/log/internal/strip.h +4 -12
- data/third_party/abseil-cpp/absl/log/internal/vlog_config.h +8 -6
- data/third_party/abseil-cpp/absl/log/internal/voidify.h +10 -4
- data/third_party/abseil-cpp/absl/log/log.h +48 -35
- data/third_party/abseil-cpp/absl/log/log_sink_registry.h +2 -2
- data/third_party/abseil-cpp/absl/meta/type_traits.h +46 -175
- data/third_party/abseil-cpp/absl/numeric/bits.h +68 -2
- data/third_party/abseil-cpp/absl/numeric/int128.cc +0 -52
- data/third_party/abseil-cpp/absl/numeric/internal/bits.h +7 -3
- data/third_party/abseil-cpp/absl/profiling/internal/exponential_biased.cc +1 -1
- data/third_party/abseil-cpp/absl/random/bit_gen_ref.h +10 -11
- data/third_party/abseil-cpp/absl/random/distributions.h +6 -8
- data/third_party/abseil-cpp/absl/random/gaussian_distribution.h +1 -1
- data/third_party/abseil-cpp/absl/random/internal/distribution_caller.h +5 -6
- data/third_party/abseil-cpp/absl/random/internal/{pool_urbg.cc → entropy_pool.cc} +22 -90
- data/third_party/abseil-cpp/absl/random/internal/entropy_pool.h +35 -0
- data/third_party/abseil-cpp/absl/random/internal/nonsecure_base.h +5 -6
- data/third_party/abseil-cpp/absl/random/internal/randen_detect.cc +1 -1
- data/third_party/abseil-cpp/absl/random/internal/seed_material.cc +20 -12
- data/third_party/abseil-cpp/absl/random/internal/seed_material.h +5 -5
- data/third_party/abseil-cpp/absl/random/random.h +88 -53
- data/third_party/abseil-cpp/absl/random/seed_sequences.cc +6 -2
- data/third_party/abseil-cpp/absl/status/internal/status_internal.cc +3 -4
- data/third_party/abseil-cpp/absl/status/internal/status_internal.h +3 -4
- data/third_party/abseil-cpp/absl/status/internal/statusor_internal.h +4 -3
- data/third_party/abseil-cpp/absl/status/status.cc +4 -8
- data/third_party/abseil-cpp/absl/status/status.h +8 -8
- data/third_party/abseil-cpp/absl/status/status_payload_printer.h +2 -2
- data/third_party/abseil-cpp/absl/status/statusor.cc +2 -2
- data/third_party/abseil-cpp/absl/status/statusor.h +6 -6
- data/third_party/abseil-cpp/absl/strings/ascii.cc +9 -9
- data/third_party/abseil-cpp/absl/strings/ascii.h +18 -18
- data/third_party/abseil-cpp/absl/strings/charconv.cc +21 -22
- data/third_party/abseil-cpp/absl/strings/charconv.h +5 -5
- data/third_party/abseil-cpp/absl/strings/cord.cc +54 -58
- data/third_party/abseil-cpp/absl/strings/cord.h +94 -83
- data/third_party/abseil-cpp/absl/strings/cord_analysis.cc +11 -11
- data/third_party/abseil-cpp/absl/strings/cord_analysis.h +3 -3
- data/third_party/abseil-cpp/absl/strings/escaping.cc +130 -149
- data/third_party/abseil-cpp/absl/strings/escaping.h +9 -10
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +1 -1
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +6 -8
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.cc +0 -4
- data/third_party/abseil-cpp/absl/strings/internal/cordz_info.cc +0 -4
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +7 -63
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +1 -11
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +0 -22
- data/third_party/abseil-cpp/absl/strings/internal/str_format/output.cc +5 -3
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +4 -2
- data/third_party/abseil-cpp/absl/strings/internal/str_join_internal.h +3 -3
- data/third_party/abseil-cpp/absl/strings/internal/string_constant.h +0 -5
- data/third_party/abseil-cpp/absl/strings/internal/utf8.cc +96 -1
- data/third_party/abseil-cpp/absl/strings/internal/utf8.h +15 -1
- data/third_party/abseil-cpp/absl/strings/numbers.cc +53 -32
- data/third_party/abseil-cpp/absl/strings/numbers.h +87 -58
- data/third_party/abseil-cpp/absl/strings/str_cat.cc +6 -7
- data/third_party/abseil-cpp/absl/strings/str_cat.h +32 -32
- data/third_party/abseil-cpp/absl/strings/str_format.h +18 -18
- data/third_party/abseil-cpp/absl/strings/str_replace.cc +3 -3
- data/third_party/abseil-cpp/absl/strings/str_replace.h +6 -6
- data/third_party/abseil-cpp/absl/strings/string_view.cc +4 -9
- data/third_party/abseil-cpp/absl/strings/string_view.h +27 -32
- data/third_party/abseil-cpp/absl/strings/strip.h +4 -4
- data/third_party/abseil-cpp/absl/strings/substitute.cc +5 -4
- data/third_party/abseil-cpp/absl/strings/substitute.h +66 -64
- data/third_party/abseil-cpp/absl/synchronization/internal/futex_waiter.cc +0 -4
- data/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.cc +0 -5
- data/third_party/abseil-cpp/absl/synchronization/internal/pthread_waiter.cc +0 -4
- data/third_party/abseil-cpp/absl/synchronization/internal/sem_waiter.cc +0 -4
- data/third_party/abseil-cpp/absl/synchronization/internal/stdcpp_waiter.cc +0 -4
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter_base.cc +0 -4
- data/third_party/abseil-cpp/absl/synchronization/internal/win32_waiter.cc +0 -4
- data/third_party/abseil-cpp/absl/synchronization/mutex.cc +1 -1
- data/third_party/abseil-cpp/absl/synchronization/mutex.h +97 -69
- data/third_party/abseil-cpp/absl/synchronization/notification.h +1 -1
- data/third_party/abseil-cpp/absl/time/civil_time.cc +1 -0
- data/third_party/abseil-cpp/absl/time/duration.cc +12 -7
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h +1 -1
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc +90 -111
- data/third_party/abseil-cpp/absl/time/time.h +20 -15
- data/third_party/abseil-cpp/absl/types/optional.h +7 -747
- data/third_party/abseil-cpp/absl/types/span.h +13 -11
- data/third_party/abseil-cpp/absl/types/variant.h +5 -784
- data/third_party/abseil-cpp/absl/utility/utility.h +10 -185
- metadata +72 -20
- data/src/core/lib/event_engine/forkable.cc +0 -105
- data/src/core/lib/event_engine/forkable.h +0 -67
- data/src/core/lib/iomgr/python_util.h +0 -46
- data/third_party/abseil-cpp/absl/base/internal/inline_variable.h +0 -108
- data/third_party/abseil-cpp/absl/base/internal/invoke.h +0 -241
- data/third_party/abseil-cpp/absl/log/log_entry.cc +0 -41
- data/third_party/abseil-cpp/absl/random/internal/pool_urbg.h +0 -131
- data/third_party/abseil-cpp/absl/types/bad_optional_access.cc +0 -66
- data/third_party/abseil-cpp/absl/types/bad_optional_access.h +0 -78
- data/third_party/abseil-cpp/absl/types/bad_variant_access.cc +0 -82
- data/third_party/abseil-cpp/absl/types/bad_variant_access.h +0 -82
- data/third_party/abseil-cpp/absl/types/internal/optional.h +0 -352
- data/third_party/abseil-cpp/absl/types/internal/variant.h +0 -1622
@@ -15,7 +15,8 @@
|
|
15
15
|
// -----------------------------------------------------------------------------
|
16
16
|
// File: log/internal/strip.h
|
17
17
|
// -----------------------------------------------------------------------------
|
18
|
-
|
18
|
+
|
19
|
+
// SKIP_ABSL_INLINE_NAMESPACE_CHECK
|
19
20
|
|
20
21
|
#ifndef ABSL_LOG_INTERNAL_STRIP_H_
|
21
22
|
#define ABSL_LOG_INTERNAL_STRIP_H_
|
@@ -31,15 +32,6 @@
|
|
31
32
|
// logging in subtly different ways for subtly different reasons (see below).
|
32
33
|
#if defined(STRIP_LOG) && STRIP_LOG
|
33
34
|
|
34
|
-
// Attribute for marking variables used in implementation details of logging
|
35
|
-
// macros as unused, but only when `STRIP_LOG` is defined.
|
36
|
-
// With `STRIP_LOG` on, not marking them triggers `-Wunused-but-set-variable`,
|
37
|
-
// With `STRIP_LOG` off, marking them triggers `-Wused-but-marked-unused`.
|
38
|
-
//
|
39
|
-
// TODO(b/290784225): Replace this macro with attribute [[maybe_unused]] when
|
40
|
-
// Abseil stops supporting C++14.
|
41
|
-
#define ABSL_LOG_INTERNAL_ATTRIBUTE_UNUSED_IF_STRIP_LOG ABSL_ATTRIBUTE_UNUSED
|
42
|
-
|
43
35
|
#define ABSL_LOGGING_INTERNAL_LOG_INFO ::absl::log_internal::NullStream()
|
44
36
|
#define ABSL_LOGGING_INTERNAL_LOG_WARNING ::absl::log_internal::NullStream()
|
45
37
|
#define ABSL_LOGGING_INTERNAL_LOG_ERROR ::absl::log_internal::NullStream()
|
@@ -62,8 +54,6 @@
|
|
62
54
|
|
63
55
|
#else // !defined(STRIP_LOG) || !STRIP_LOG
|
64
56
|
|
65
|
-
#define ABSL_LOG_INTERNAL_ATTRIBUTE_UNUSED_IF_STRIP_LOG
|
66
|
-
|
67
57
|
#define ABSL_LOGGING_INTERNAL_LOG_INFO \
|
68
58
|
::absl::log_internal::LogMessage( \
|
69
59
|
__FILE__, __LINE__, ::absl::log_internal::LogMessage::InfoTag{})
|
@@ -105,4 +95,6 @@
|
|
105
95
|
#define ABSL_LOGGING_INTERNAL_DLOG_DFATAL ABSL_LOGGING_INTERNAL_LOG_DFATAL
|
106
96
|
#define ABSL_LOGGING_INTERNAL_DLOG_LEVEL ABSL_LOGGING_INTERNAL_LOG_LEVEL
|
107
97
|
|
98
|
+
#define ABSL_LOGGING_INTERNAL_LOG_DO_NOT_SUBMIT ABSL_LOGGING_INTERNAL_LOG_ERROR
|
99
|
+
|
108
100
|
#endif // ABSL_LOG_INTERNAL_STRIP_H_
|
@@ -34,6 +34,7 @@
|
|
34
34
|
|
35
35
|
#include "absl/base/attributes.h"
|
36
36
|
#include "absl/base/config.h"
|
37
|
+
#include "absl/base/nullability.h"
|
37
38
|
#include "absl/base/optimization.h"
|
38
39
|
#include "absl/base/thread_annotations.h"
|
39
40
|
#include "absl/strings/string_view.h"
|
@@ -45,7 +46,7 @@ namespace log_internal {
|
|
45
46
|
class SyntheticBinary;
|
46
47
|
class VLogSite;
|
47
48
|
|
48
|
-
int RegisterAndInitialize(VLogSite* v);
|
49
|
+
int RegisterAndInitialize(VLogSite* absl_nonnull v);
|
49
50
|
void UpdateVLogSites();
|
50
51
|
constexpr int kUseFlag = (std::numeric_limits<int16_t>::min)();
|
51
52
|
|
@@ -60,7 +61,7 @@ constexpr int kUseFlag = (std::numeric_limits<int16_t>::min)();
|
|
60
61
|
class VLogSite final {
|
61
62
|
public:
|
62
63
|
// `f` must not be destroyed until the program exits.
|
63
|
-
explicit constexpr VLogSite(const char* f)
|
64
|
+
explicit constexpr VLogSite(const char* absl_nonnull f)
|
64
65
|
: file_(f), v_(kUninitialized), next_(nullptr) {}
|
65
66
|
VLogSite(const VLogSite&) = delete;
|
66
67
|
VLogSite& operator=(const VLogSite&) = delete;
|
@@ -93,7 +94,7 @@ class VLogSite final {
|
|
93
94
|
}
|
94
95
|
|
95
96
|
private:
|
96
|
-
friend int log_internal::RegisterAndInitialize(VLogSite* v);
|
97
|
+
friend int log_internal::RegisterAndInitialize(VLogSite* absl_nonnull v);
|
97
98
|
friend void log_internal::UpdateVLogSites();
|
98
99
|
friend class log_internal::SyntheticBinary;
|
99
100
|
static constexpr int kUninitialized = (std::numeric_limits<int>::max)();
|
@@ -116,7 +117,7 @@ class VLogSite final {
|
|
116
117
|
ABSL_ATTRIBUTE_NOINLINE bool SlowIsEnabled5(int stale_v);
|
117
118
|
|
118
119
|
// This object is too size-sensitive to use absl::string_view.
|
119
|
-
const char* const file_;
|
120
|
+
const char* absl_nonnull const file_;
|
120
121
|
std::atomic<int> v_;
|
121
122
|
std::atomic<VLogSite*> next_;
|
122
123
|
};
|
@@ -130,7 +131,7 @@ int VLogLevel(absl::string_view file);
|
|
130
131
|
// Registers a site `v` to get updated as `vmodule` and `v` change. Also
|
131
132
|
// initializes the site based on their current values, and returns that result.
|
132
133
|
// Does not allocate memory.
|
133
|
-
int RegisterAndInitialize(VLogSite* v);
|
134
|
+
int RegisterAndInitialize(VLogSite* absl_nonnull v);
|
134
135
|
|
135
136
|
// Allocates memory.
|
136
137
|
void UpdateVLogSites();
|
@@ -154,7 +155,8 @@ int PrependVModule(absl::string_view module_pattern, int log_level);
|
|
154
155
|
void OnVLogVerbosityUpdate(std::function<void()> cb);
|
155
156
|
|
156
157
|
// Does not allocate memory.
|
157
|
-
VLogSite* SetVModuleListHeadForTestOnly(
|
158
|
+
VLogSite* absl_nullable SetVModuleListHeadForTestOnly(
|
159
|
+
VLogSite* absl_nullable v);
|
158
160
|
|
159
161
|
} // namespace log_internal
|
160
162
|
ABSL_NAMESPACE_END
|
@@ -16,13 +16,15 @@
|
|
16
16
|
// File: log/internal/voidify.h
|
17
17
|
// -----------------------------------------------------------------------------
|
18
18
|
//
|
19
|
-
// This class
|
20
|
-
//
|
21
|
-
//
|
19
|
+
// This class does the dispatching of the completed `absl::LogEntry` to
|
20
|
+
// applicable `absl::LogSink`s, and is used to explicitly ignore values in the
|
21
|
+
// conditional logging macros. This avoids compiler warnings like "value
|
22
|
+
// computed is not used" and "statement has no effect".
|
22
23
|
|
23
24
|
#ifndef ABSL_LOG_INTERNAL_VOIDIFY_H_
|
24
25
|
#define ABSL_LOG_INTERNAL_VOIDIFY_H_
|
25
26
|
|
27
|
+
#include "absl/base/attributes.h"
|
26
28
|
#include "absl/base/config.h"
|
27
29
|
|
28
30
|
namespace absl {
|
@@ -34,7 +36,11 @@ class Voidify final {
|
|
34
36
|
// This has to be an operator with a precedence lower than << but higher than
|
35
37
|
// ?:
|
36
38
|
template <typename T>
|
37
|
-
void operator&&(
|
39
|
+
ABSL_ATTRIBUTE_COLD void operator&&(T&& message) const&& {
|
40
|
+
// The dispatching of the completed `absl::LogEntry` to applicable
|
41
|
+
// `absl::LogSink`s happens here.
|
42
|
+
message.Flush();
|
43
|
+
}
|
38
44
|
};
|
39
45
|
|
40
46
|
} // namespace log_internal
|
@@ -34,6 +34,13 @@
|
|
34
34
|
// running registered error handlers.
|
35
35
|
// * The `DFATAL` pseudo-severity level is defined as `FATAL` in debug mode and
|
36
36
|
// as `ERROR` otherwise.
|
37
|
+
// * The `DO_NOT_SUBMIT` pseudo-severity level is an alias for `ERROR`, and is
|
38
|
+
// intended for debugging statements that won't be submitted. The name is
|
39
|
+
// chosen to be easy to spot in review and with tools in order to ensure that
|
40
|
+
// such statements aren't inadvertently checked in.
|
41
|
+
// The contract is that **it may not be checked in**, meaning that no
|
42
|
+
// in-contract uses will be affected if we decide in the future to remove it
|
43
|
+
// or change what it does.
|
37
44
|
// Some preprocessor shenanigans are used to ensure that e.g. `LOG(INFO)` has
|
38
45
|
// the same meaning even if a local symbol or preprocessor macro named `INFO` is
|
39
46
|
// defined. To specify a severity level using an expression instead of a
|
@@ -194,6 +201,8 @@
|
|
194
201
|
// LOG(INFO) << std::hex << 0xdeadbeef; // logs "0xdeadbeef"
|
195
202
|
// LOG(INFO) << 0xdeadbeef; // logs "3735928559"
|
196
203
|
|
204
|
+
// SKIP_ABSL_INLINE_NAMESPACE_CHECK
|
205
|
+
|
197
206
|
#ifndef ABSL_LOG_LOG_H_
|
198
207
|
#define ABSL_LOG_LOG_H_
|
199
208
|
|
@@ -260,44 +269,55 @@
|
|
260
269
|
ABSL_LOG_INTERNAL_DLOG_IF_IMPL(_##severity, condition)
|
261
270
|
|
262
271
|
// LOG_EVERY_N
|
272
|
+
// LOG_FIRST_N
|
273
|
+
// LOG_EVERY_POW_2
|
274
|
+
// LOG_EVERY_N_SEC
|
263
275
|
//
|
264
|
-
//
|
265
|
-
//
|
266
|
-
//
|
267
|
-
//
|
268
|
-
// the
|
269
|
-
//
|
276
|
+
// These "stateful" macros log conditionally based on a hidden counter or timer.
|
277
|
+
// When the condition is false and no logging is done, streamed operands aren't
|
278
|
+
// evaluated either. Each instance has its own state (i.e. counter, timer)
|
279
|
+
// that's independent of other instances of the macros. The macros in this
|
280
|
+
// family are thread-safe in the sense that they are meant to be called
|
281
|
+
// concurrently and will not invoke undefined behavior, however their
|
282
|
+
// implementation prioritizes efficiency over exactness and may occasionally log
|
283
|
+
// more or less often than specified.
|
284
|
+
//
|
285
|
+
// * `LOG_EVERY_N` logs the first time and once every `n` times thereafter.
|
286
|
+
// * `LOG_FIRST_N` logs the first `n` times and then stops.
|
287
|
+
// * `LOG_EVERY_POW_2` logs the first, second, fourth, eighth, etc. times.
|
288
|
+
// * `LOG_EVERY_N_SEC` logs the first time and no more than once every `n`
|
289
|
+
// seconds thereafter. `n` is passed as a floating point value.
|
290
|
+
//
|
291
|
+
// The `LOG_IF`... variations with an extra condition evaluate the specified
|
292
|
+
// condition first and short-circuit if it is false. For example, an evaluation
|
293
|
+
// of `LOG_IF_FIRST_N` does not count against the first `n` if the specified
|
294
|
+
// condition is false. Stateful `VLOG`... variations likewise short-circuit
|
295
|
+
// if `VLOG` is disabled.
|
296
|
+
//
|
297
|
+
// An approximate count of the number of times a particular instance's stateful
|
298
|
+
// condition has been evaluated (i.e. excluding those where a specified `LOG_IF`
|
299
|
+
// condition was false) can be included in the logged message by streaming the
|
300
|
+
// symbol `COUNTER`.
|
301
|
+
//
|
302
|
+
// The `n` parameter need not be a constant. Conditional logging following a
|
303
|
+
// change to `n` isn't fully specified, but it should converge on the new value
|
304
|
+
// within roughly `max(old_n, new_n)` evaluations or seconds.
|
305
|
+
//
|
306
|
+
// Examples:
|
270
307
|
//
|
271
308
|
// LOG_EVERY_N(WARNING, 1000) << "Got a packet with a bad CRC (" << COUNTER
|
272
309
|
// << " total)";
|
310
|
+
//
|
311
|
+
// LOG_EVERY_N_SEC(INFO, 2.5) << "Got " << COUNTER << " cookies so far";
|
312
|
+
//
|
313
|
+
// LOG_IF_EVERY_N(INFO, (size > 1024), 10) << "Got the " << COUNTER
|
314
|
+
// << "th big cookie";
|
273
315
|
#define LOG_EVERY_N(severity, n) \
|
274
316
|
ABSL_LOG_INTERNAL_LOG_EVERY_N_IMPL(_##severity, n)
|
275
|
-
|
276
|
-
// LOG_FIRST_N
|
277
|
-
//
|
278
|
-
// `LOG_FIRST_N` behaves like `LOG_EVERY_N` except that the specified message is
|
279
|
-
// logged when the counter's value is less than `n`. `LOG_FIRST_N` is
|
280
|
-
// thread-safe.
|
281
317
|
#define LOG_FIRST_N(severity, n) \
|
282
318
|
ABSL_LOG_INTERNAL_LOG_FIRST_N_IMPL(_##severity, n)
|
283
|
-
|
284
|
-
// LOG_EVERY_POW_2
|
285
|
-
//
|
286
|
-
// `LOG_EVERY_POW_2` behaves like `LOG_EVERY_N` except that the specified
|
287
|
-
// message is logged when the counter's value is a power of 2.
|
288
|
-
// `LOG_EVERY_POW_2` is thread-safe.
|
289
319
|
#define LOG_EVERY_POW_2(severity) \
|
290
320
|
ABSL_LOG_INTERNAL_LOG_EVERY_POW_2_IMPL(_##severity)
|
291
|
-
|
292
|
-
// LOG_EVERY_N_SEC
|
293
|
-
//
|
294
|
-
// An instance of `LOG_EVERY_N_SEC` uses a hidden state variable to log the
|
295
|
-
// specified message at most once every `n_seconds`. A hidden counter of
|
296
|
-
// executions (whether a message is logged or not) is also maintained and can be
|
297
|
-
// logged by streaming the symbol `COUNTER`. `LOG_EVERY_N_SEC` is thread-safe.
|
298
|
-
// Example:
|
299
|
-
//
|
300
|
-
// LOG_EVERY_N_SEC(INFO, 2.5) << "Got " << COUNTER << " cookies so far";
|
301
321
|
#define LOG_EVERY_N_SEC(severity, n_seconds) \
|
302
322
|
ABSL_LOG_INTERNAL_LOG_EVERY_N_SEC_IMPL(_##severity, n_seconds)
|
303
323
|
|
@@ -328,13 +348,6 @@
|
|
328
348
|
#define VLOG_EVERY_N_SEC(severity, n_seconds) \
|
329
349
|
ABSL_LOG_INTERNAL_VLOG_EVERY_N_SEC_IMPL(severity, n_seconds)
|
330
350
|
|
331
|
-
// `LOG_IF_EVERY_N` and friends behave as the corresponding `LOG_EVERY_N`
|
332
|
-
// but neither increment a counter nor log a message if condition is false (as
|
333
|
-
// `LOG_IF`).
|
334
|
-
// Example:
|
335
|
-
//
|
336
|
-
// LOG_IF_EVERY_N(INFO, (size > 1024), 10) << "Got the " << COUNTER
|
337
|
-
// << "th big cookie";
|
338
351
|
#define LOG_IF_EVERY_N(severity, condition, n) \
|
339
352
|
ABSL_LOG_INTERNAL_LOG_IF_EVERY_N_IMPL(_##severity, condition, n)
|
340
353
|
#define LOG_IF_FIRST_N(severity, condition, n) \
|
@@ -44,10 +44,10 @@ ABSL_NAMESPACE_BEGIN
|
|
44
44
|
// sink instead which writes them to `stderr`.
|
45
45
|
//
|
46
46
|
// Do not call these inside `absl::LogSink::Send`.
|
47
|
-
inline void AddLogSink(absl::
|
47
|
+
inline void AddLogSink(absl::LogSink* absl_nonnull sink) {
|
48
48
|
log_internal::AddLogSink(sink);
|
49
49
|
}
|
50
|
-
inline void RemoveLogSink(absl::
|
50
|
+
inline void RemoveLogSink(absl::LogSink* absl_nonnull sink) {
|
51
51
|
log_internal::RemoveLogSink(sink);
|
52
52
|
}
|
53
53
|
|
@@ -38,6 +38,7 @@
|
|
38
38
|
#include <cstddef>
|
39
39
|
#include <functional>
|
40
40
|
#include <string>
|
41
|
+
#include <string_view>
|
41
42
|
#include <type_traits>
|
42
43
|
#include <vector>
|
43
44
|
|
@@ -48,10 +49,6 @@
|
|
48
49
|
#include <span> // NOLINT(build/c++20)
|
49
50
|
#endif
|
50
51
|
|
51
|
-
#ifdef ABSL_HAVE_STD_STRING_VIEW
|
52
|
-
#include <string_view>
|
53
|
-
#endif
|
54
|
-
|
55
52
|
// Defines the default alignment. `__STDCPP_DEFAULT_NEW_ALIGNMENT__` is a C++17
|
56
53
|
// feature.
|
57
54
|
#if defined(__STDCPP_DEFAULT_NEW_ALIGNMENT__)
|
@@ -97,22 +94,6 @@ struct is_detected_impl<typename VoidTImpl<Op<Args...>>::type, Op, Args...> {
|
|
97
94
|
template <template <class...> class Op, class... Args>
|
98
95
|
struct is_detected : is_detected_impl<void, Op, Args...>::type {};
|
99
96
|
|
100
|
-
template <class Enabler, class To, template <class...> class Op, class... Args>
|
101
|
-
struct is_detected_convertible_impl {
|
102
|
-
using type = std::false_type;
|
103
|
-
};
|
104
|
-
|
105
|
-
template <class To, template <class...> class Op, class... Args>
|
106
|
-
struct is_detected_convertible_impl<
|
107
|
-
typename std::enable_if<std::is_convertible<Op<Args...>, To>::value>::type,
|
108
|
-
To, Op, Args...> {
|
109
|
-
using type = std::true_type;
|
110
|
-
};
|
111
|
-
|
112
|
-
template <class To, template <class...> class Op, class... Args>
|
113
|
-
struct is_detected_convertible
|
114
|
-
: is_detected_convertible_impl<void, To, Op, Args...>::type {};
|
115
|
-
|
116
97
|
} // namespace type_traits_internal
|
117
98
|
|
118
99
|
// void_t()
|
@@ -121,96 +102,32 @@ struct is_detected_convertible
|
|
121
102
|
// metafunction allows you to create a general case that maps to `void` while
|
122
103
|
// allowing specializations that map to specific types.
|
123
104
|
//
|
124
|
-
// This metafunction is
|
125
|
-
//
|
126
|
-
//
|
127
|
-
// NOTE: `absl::void_t` does not use the standard-specified implementation so
|
128
|
-
// that it can remain compatible with gcc < 5.1. This can introduce slightly
|
129
|
-
// different behavior, such as when ordering partial specializations.
|
105
|
+
// This metafunction is not 100% compatible with the C++17 `std::void_t`
|
106
|
+
// metafunction. It has slightly different behavior, such as when ordering
|
107
|
+
// partial specializations. It is recommended to use `std::void_t` instead.
|
130
108
|
template <typename... Ts>
|
131
109
|
using void_t = typename type_traits_internal::VoidTImpl<Ts...>::type;
|
132
110
|
|
133
|
-
// conjunction
|
134
|
-
//
|
135
|
-
// Performs a compile-time logical AND operation on the passed types (which
|
136
|
-
// must have `::value` members convertible to `bool`. Short-circuits if it
|
137
|
-
// encounters any `false` members (and does not compare the `::value` members
|
138
|
-
// of any remaining arguments).
|
139
|
-
//
|
140
|
-
// This metafunction is designed to be a drop-in replacement for the C++17
|
141
|
-
// `std::conjunction` metafunction.
|
142
|
-
template <typename... Ts>
|
143
|
-
struct conjunction : std::true_type {};
|
144
|
-
|
145
|
-
template <typename T, typename... Ts>
|
146
|
-
struct conjunction<T, Ts...>
|
147
|
-
: std::conditional<T::value, conjunction<Ts...>, T>::type {};
|
148
|
-
|
149
|
-
template <typename T>
|
150
|
-
struct conjunction<T> : T {};
|
151
|
-
|
152
|
-
// disjunction
|
153
|
-
//
|
154
|
-
// Performs a compile-time logical OR operation on the passed types (which
|
155
|
-
// must have `::value` members convertible to `bool`. Short-circuits if it
|
156
|
-
// encounters any `true` members (and does not compare the `::value` members
|
157
|
-
// of any remaining arguments).
|
158
|
-
//
|
159
|
-
// This metafunction is designed to be a drop-in replacement for the C++17
|
160
|
-
// `std::disjunction` metafunction.
|
161
|
-
template <typename... Ts>
|
162
|
-
struct disjunction : std::false_type {};
|
163
|
-
|
164
|
-
template <typename T, typename... Ts>
|
165
|
-
struct disjunction<T, Ts...>
|
166
|
-
: std::conditional<T::value, T, disjunction<Ts...>>::type {};
|
167
|
-
|
168
|
-
template <typename T>
|
169
|
-
struct disjunction<T> : T {};
|
170
|
-
|
171
|
-
// negation
|
172
|
-
//
|
173
|
-
// Performs a compile-time logical NOT operation on the passed type (which
|
174
|
-
// must have `::value` members convertible to `bool`.
|
175
|
-
//
|
176
|
-
// This metafunction is designed to be a drop-in replacement for the C++17
|
177
|
-
// `std::negation` metafunction.
|
178
|
-
template <typename T>
|
179
|
-
struct negation : std::integral_constant<bool, !T::value> {};
|
180
|
-
|
181
|
-
// is_function()
|
182
|
-
//
|
183
|
-
// Determines whether the passed type `T` is a function type.
|
184
|
-
//
|
185
|
-
// This metafunction is designed to be a drop-in replacement for the C++11
|
186
|
-
// `std::is_function()` metafunction for platforms that have incomplete C++11
|
187
|
-
// support (such as libstdc++ 4.x).
|
188
|
-
//
|
189
|
-
// This metafunction works because appending `const` to a type does nothing to
|
190
|
-
// function types and reference types (and forms a const-qualified type
|
191
|
-
// otherwise).
|
192
|
-
template <typename T>
|
193
|
-
struct is_function
|
194
|
-
: std::integral_constant<
|
195
|
-
bool, !(std::is_reference<T>::value ||
|
196
|
-
std::is_const<typename std::add_const<T>::type>::value)> {};
|
197
|
-
|
198
|
-
// is_copy_assignable()
|
199
|
-
// is_move_assignable()
|
200
|
-
// is_trivially_destructible()
|
201
|
-
// is_trivially_default_constructible()
|
202
|
-
// is_trivially_move_constructible()
|
203
|
-
// is_trivially_copy_constructible()
|
204
|
-
// is_trivially_move_assignable()
|
205
|
-
// is_trivially_copy_assignable()
|
206
|
-
//
|
207
111
|
// Historical note: Abseil once provided implementations of these type traits
|
208
112
|
// for platforms that lacked full support. New code should prefer to use the
|
209
113
|
// std variants.
|
210
114
|
//
|
211
115
|
// See the documentation for the STL <type_traits> header for more information:
|
212
116
|
// https://en.cppreference.com/w/cpp/header/type_traits
|
117
|
+
using std::add_const_t;
|
118
|
+
using std::add_cv_t;
|
119
|
+
using std::add_lvalue_reference_t;
|
120
|
+
using std::add_pointer_t;
|
121
|
+
using std::add_rvalue_reference_t;
|
122
|
+
using std::add_volatile_t;
|
123
|
+
using std::common_type_t;
|
124
|
+
using std::conditional_t;
|
125
|
+
using std::conjunction;
|
126
|
+
using std::decay_t;
|
127
|
+
using std::enable_if_t;
|
128
|
+
using std::disjunction;
|
213
129
|
using std::is_copy_assignable;
|
130
|
+
using std::is_function;
|
214
131
|
using std::is_move_assignable;
|
215
132
|
using std::is_trivially_copy_assignable;
|
216
133
|
using std::is_trivially_copy_constructible;
|
@@ -218,6 +135,17 @@ using std::is_trivially_default_constructible;
|
|
218
135
|
using std::is_trivially_destructible;
|
219
136
|
using std::is_trivially_move_assignable;
|
220
137
|
using std::is_trivially_move_constructible;
|
138
|
+
using std::make_signed_t;
|
139
|
+
using std::make_unsigned_t;
|
140
|
+
using std::negation;
|
141
|
+
using std::remove_all_extents_t;
|
142
|
+
using std::remove_const_t;
|
143
|
+
using std::remove_cv_t;
|
144
|
+
using std::remove_extent_t;
|
145
|
+
using std::remove_pointer_t;
|
146
|
+
using std::remove_reference_t;
|
147
|
+
using std::remove_volatile_t;
|
148
|
+
using std::underlying_type_t;
|
221
149
|
|
222
150
|
#if defined(__cpp_lib_remove_cvref) && __cpp_lib_remove_cvref >= 201711L
|
223
151
|
template <typename T>
|
@@ -240,70 +168,6 @@ template <typename T>
|
|
240
168
|
using remove_cvref_t = typename remove_cvref<T>::type;
|
241
169
|
#endif
|
242
170
|
|
243
|
-
// -----------------------------------------------------------------------------
|
244
|
-
// C++14 "_t" trait aliases
|
245
|
-
// -----------------------------------------------------------------------------
|
246
|
-
|
247
|
-
template <typename T>
|
248
|
-
using remove_cv_t = typename std::remove_cv<T>::type;
|
249
|
-
|
250
|
-
template <typename T>
|
251
|
-
using remove_const_t = typename std::remove_const<T>::type;
|
252
|
-
|
253
|
-
template <typename T>
|
254
|
-
using remove_volatile_t = typename std::remove_volatile<T>::type;
|
255
|
-
|
256
|
-
template <typename T>
|
257
|
-
using add_cv_t = typename std::add_cv<T>::type;
|
258
|
-
|
259
|
-
template <typename T>
|
260
|
-
using add_const_t = typename std::add_const<T>::type;
|
261
|
-
|
262
|
-
template <typename T>
|
263
|
-
using add_volatile_t = typename std::add_volatile<T>::type;
|
264
|
-
|
265
|
-
template <typename T>
|
266
|
-
using remove_reference_t = typename std::remove_reference<T>::type;
|
267
|
-
|
268
|
-
template <typename T>
|
269
|
-
using add_lvalue_reference_t = typename std::add_lvalue_reference<T>::type;
|
270
|
-
|
271
|
-
template <typename T>
|
272
|
-
using add_rvalue_reference_t = typename std::add_rvalue_reference<T>::type;
|
273
|
-
|
274
|
-
template <typename T>
|
275
|
-
using remove_pointer_t = typename std::remove_pointer<T>::type;
|
276
|
-
|
277
|
-
template <typename T>
|
278
|
-
using add_pointer_t = typename std::add_pointer<T>::type;
|
279
|
-
|
280
|
-
template <typename T>
|
281
|
-
using make_signed_t = typename std::make_signed<T>::type;
|
282
|
-
|
283
|
-
template <typename T>
|
284
|
-
using make_unsigned_t = typename std::make_unsigned<T>::type;
|
285
|
-
|
286
|
-
template <typename T>
|
287
|
-
using remove_extent_t = typename std::remove_extent<T>::type;
|
288
|
-
|
289
|
-
template <typename T>
|
290
|
-
using remove_all_extents_t = typename std::remove_all_extents<T>::type;
|
291
|
-
|
292
|
-
template <typename T>
|
293
|
-
using decay_t = typename std::decay<T>::type;
|
294
|
-
|
295
|
-
template <bool B, typename T = void>
|
296
|
-
using enable_if_t = typename std::enable_if<B, T>::type;
|
297
|
-
|
298
|
-
template <bool B, typename T, typename F>
|
299
|
-
using conditional_t = typename std::conditional<B, T, F>::type;
|
300
|
-
|
301
|
-
template <typename... T>
|
302
|
-
using common_type_t = typename std::common_type<T...>::type;
|
303
|
-
|
304
|
-
template <typename T>
|
305
|
-
using underlying_type_t = typename std::underlying_type<T>::type;
|
306
|
-
|
307
171
|
namespace type_traits_internal {
|
308
172
|
|
309
173
|
#if (defined(__cpp_lib_is_invocable) && __cpp_lib_is_invocable >= 201703L) || \
|
@@ -460,11 +324,17 @@ using swap_internal::Swap;
|
|
460
324
|
|
461
325
|
// absl::is_trivially_relocatable<T>
|
462
326
|
//
|
327
|
+
// https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2786r11.html
|
328
|
+
//
|
463
329
|
// Detects whether a type is known to be "trivially relocatable" -- meaning it
|
464
330
|
// can be relocated from one place to another as if by memcpy/memmove.
|
465
331
|
// This implies that its object representation doesn't depend on its address,
|
466
332
|
// and also none of its special member functions do anything strange.
|
467
333
|
//
|
334
|
+
// Note that when relocating the caller code should ensure that if the object is
|
335
|
+
// polymorphic, the dynamic type is of the most derived type. Padding bytes
|
336
|
+
// should not be copied.
|
337
|
+
//
|
468
338
|
// This trait is conservative. If it's true then the type is definitely
|
469
339
|
// trivially relocatable, but if it's false then the type may or may not be. For
|
470
340
|
// example, std::vector<int> is trivially relocatable on every known STL
|
@@ -482,11 +352,7 @@ using swap_internal::Swap;
|
|
482
352
|
//
|
483
353
|
// Upstream documentation:
|
484
354
|
//
|
485
|
-
// https://clang.llvm.org/docs/LanguageExtensions.html#:~:text=
|
486
|
-
|
487
|
-
// If the compiler offers a builtin that tells us the answer, we can use that.
|
488
|
-
// This covers all of the cases in the fallback below, plus types that opt in
|
489
|
-
// using e.g. [[clang::trivial_abi]].
|
355
|
+
// https://clang.llvm.org/docs/LanguageExtensions.html#:~:text=__builtin_is_cpp_trivially_relocatable
|
490
356
|
//
|
491
357
|
// Clang on Windows has the builtin, but it falsely claims types with a
|
492
358
|
// user-provided destructor are trivial (http://b/275003464). So we opt out
|
@@ -511,15 +377,22 @@ using swap_internal::Swap;
|
|
511
377
|
//
|
512
378
|
// According to https://github.com/abseil/abseil-cpp/issues/1479, this does not
|
513
379
|
// work with NVCC either.
|
514
|
-
#if ABSL_HAVE_BUILTIN(
|
515
|
-
|
516
|
-
|
380
|
+
#if ABSL_HAVE_BUILTIN(__builtin_is_cpp_trivially_relocatable)
|
381
|
+
// https://github.com/llvm/llvm-project/pull/127636#pullrequestreview-2637005293
|
382
|
+
// In the current implementation, __builtin_is_cpp_trivially_relocatable will
|
383
|
+
// only return true for types that are trivially relocatable according to the
|
384
|
+
// standard. Notably, this means that marking a type [[clang::trivial_abi]] aka
|
385
|
+
// ABSL_HAVE_ATTRIBUTE_TRIVIAL_ABI will have no effect on this trait.
|
517
386
|
template <class T>
|
518
387
|
struct is_trivially_relocatable
|
519
|
-
: std::integral_constant<bool,
|
388
|
+
: std::integral_constant<bool, __builtin_is_cpp_trivially_relocatable(T)> {
|
389
|
+
};
|
520
390
|
#elif ABSL_HAVE_BUILTIN(__is_trivially_relocatable) && defined(__clang__) && \
|
521
391
|
!(defined(_WIN32) || defined(_WIN64)) && !defined(__APPLE__) && \
|
522
392
|
!defined(__NVCC__)
|
393
|
+
// https://github.com/llvm/llvm-project/pull/139061
|
394
|
+
// __is_trivially_relocatable is deprecated.
|
395
|
+
// TODO(b/325479096): Remove this case.
|
523
396
|
template <class T>
|
524
397
|
struct is_trivially_relocatable
|
525
398
|
: std::integral_constant<
|
@@ -640,10 +513,8 @@ template <typename T>
|
|
640
513
|
struct IsView : std::integral_constant<bool, std::is_pointer<T>::value ||
|
641
514
|
IsViewImpl<T>::value> {};
|
642
515
|
|
643
|
-
#ifdef ABSL_HAVE_STD_STRING_VIEW
|
644
516
|
template <typename Char, typename Traits>
|
645
517
|
struct IsView<std::basic_string_view<Char, Traits>> : std::true_type {};
|
646
|
-
#endif
|
647
518
|
|
648
519
|
#ifdef __cpp_lib_span
|
649
520
|
template <typename T>
|