[bloat] Prefer std::vector to absl::InlinedVector (#30086)

* [bloat] Prefer std::vector to absl::InlinedVector

* fix

* fix

* fix

* fix

* fixes

* fix

* fixes
pull/30105/head
Craig Tiller 3 years ago committed by GitHub
parent e3e4d41bd9
commit ad936d3710
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      BUILD
  2. 1
      CMakeLists.txt
  3. 3
      build_autogenerated.yaml
  4. 2
      src/core/ext/filters/client_channel/client_channel.cc
  5. 2
      src/core/ext/filters/client_channel/lb_policy/address_filtering.cc
  6. 2
      src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc
  7. 1
      src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc
  8. 3
      src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
  9. 2
      src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc
  10. 5
      src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
  11. 5
      src/core/ext/filters/client_channel/lb_policy/subchannel_list.h
  12. 5
      src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc
  13. 1
      src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc
  14. 4
      src/core/ext/filters/client_channel/lb_policy_registry.cc
  15. 1
      src/core/ext/filters/client_channel/proxy_mapper_registry.cc
  16. 2
      src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc
  17. 2
      src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
  18. 3
      src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
  19. 2
      src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
  20. 1
      src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
  21. 3
      src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc
  22. 12
      src/core/ext/xds/certificate_provider_registry.cc
  23. 3
      src/core/ext/xds/xds_bootstrap.cc
  24. 11
      src/core/ext/xds/xds_bootstrap.h
  25. 3
      src/core/ext/xds/xds_cluster.cc
  26. 5
      src/core/ext/xds/xds_common_types.cc
  27. 7
      src/core/ext/xds/xds_endpoint.h
  28. 7
      src/core/ext/xds/xds_listener.cc
  29. 1
      src/core/ext/xds/xds_route_config.cc
  30. 6
      src/core/lib/avl/avl.h
  31. 1
      src/core/lib/channel/channel_args.h
  32. 1
      src/core/lib/channel/channelz.cc
  33. 5
      src/core/lib/channel/channelz.h
  34. 9
      src/core/lib/channel/channelz_registry.cc
  35. 1
      src/core/lib/resolver/resolver.cc
  36. 4
      src/core/lib/resolver/server_address.h
  37. 1
      src/core/lib/security/credentials/composite/composite_credentials.cc
  38. 6
      src/core/lib/security/credentials/composite/composite_credentials.h
  39. 3
      src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
  40. 3
      src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc
  41. 3
      src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc
  42. 8
      src/core/lib/security/security_connector/load_system_roots_supported.cc
  43. 4
      src/core/lib/security/security_connector/ssl_utils.h
  44. 1
      src/core/lib/security/security_connector/tls/tls_security_connector.cc
  45. 4
      src/core/lib/service_config/service_config_impl.h
  46. 1
      src/cpp/common/tls_certificate_verifier.cc
  47. 2
      tools/distrib/iwyu_mappings.imp

17
BUILD

@ -2226,7 +2226,6 @@ grpc_cc_library(
hdrs = [
"src/core/lib/avl/avl.h",
],
external_deps = ["absl/container:inlined_vector"],
tags = ["grpc-autodeps"],
deps = ["gpr_platform"],
)
@ -2930,7 +2929,6 @@ grpc_cc_library(
"src/core/lib/service_config/service_config_impl.h",
],
external_deps = [
"absl/container:inlined_vector",
"absl/memory",
"absl/strings",
],
@ -2981,7 +2979,6 @@ grpc_cc_library(
"src/core/lib/resolver/server_address.h",
],
external_deps = [
"absl/container:inlined_vector",
"absl/memory",
"absl/status",
"absl/status:statusor",
@ -3591,7 +3588,6 @@ grpc_cc_library(
hdrs = [
"src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h",
],
external_deps = ["absl/container:inlined_vector"],
language = "c++",
tags = ["grpc-autodeps"],
visibility = ["@grpc:grpclb"],
@ -4184,7 +4180,6 @@ grpc_cc_library(
"src/core/ext/filters/client_channel/lb_policy/address_filtering.h",
],
external_deps = [
"absl/container:inlined_vector",
"absl/memory",
"absl/status:statusor",
"absl/strings",
@ -4203,7 +4198,6 @@ grpc_cc_library(
"src/core/ext/filters/client_channel/lb_policy/subchannel_list.h",
],
external_deps = [
"absl/container:inlined_vector",
"absl/status",
"absl/types:optional",
],
@ -4229,7 +4223,6 @@ grpc_cc_library(
"src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc",
],
external_deps = [
"absl/container:inlined_vector",
"absl/memory",
"absl/status",
"absl/status:statusor",
@ -4304,7 +4297,6 @@ grpc_cc_library(
"src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc",
],
external_deps = [
"absl/container:inlined_vector",
"absl/memory",
"absl/status",
"absl/status:statusor",
@ -4350,7 +4342,6 @@ grpc_cc_library(
"src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc",
],
external_deps = [
"absl/container:inlined_vector",
"absl/memory",
"absl/random",
"absl/status",
@ -4426,7 +4417,6 @@ grpc_cc_library(
"src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc",
],
external_deps = [
"absl/container:inlined_vector",
"absl/memory",
"absl/status",
"absl/status:statusor",
@ -5444,7 +5434,6 @@ grpc_cc_library(
"src/core/lib/security/credentials/oauth2/oauth2_credentials.h",
],
external_deps = [
"absl/container:inlined_vector",
"absl/status",
"absl/status:statusor",
"absl/strings",
@ -5704,10 +5693,7 @@ grpc_cc_library(
"src/core/lib/security/security_connector/load_system_roots_supported.h",
"src/core/lib/security/util/json_util.h",
],
external_deps = [
"absl/container:inlined_vector",
"absl/strings",
],
external_deps = ["absl/strings"],
language = "c++",
tags = ["grpc-autodeps"],
visibility = ["@grpc:public"],
@ -5821,7 +5807,6 @@ grpc_cc_library(
],
external_deps = [
"absl/base:core_headers",
"absl/container:inlined_vector",
"absl/status",
"absl/strings",
"libcrypto",

1
CMakeLists.txt generated

@ -7944,7 +7944,6 @@ target_include_directories(avl_test
target_link_libraries(avl_test
${_gRPC_PROTOBUF_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
absl::inlined_vector
)

@ -4710,8 +4710,7 @@ targets:
- src/core/lib/avl/avl.h
src:
- test/core/avl/avl_test.cc
deps:
- absl/container:inlined_vector
deps: []
uses_polling: false
- name: aws_request_signer_test
gtest: true

@ -1234,7 +1234,7 @@ void ClientChannel::OnResolverResultChangedLocked(Resolver::Result result) {
// (d) Address resolution that causes a new LB policy to be created.
//
// We track a list of strings to eventually be concatenated and traced.
absl::InlinedVector<const char*, 3> trace_strings;
std::vector<const char*> trace_strings;
const bool resolution_contains_addresses =
result.addresses.ok() && !result.addresses->empty();
if (!resolution_contains_addresses &&

@ -20,9 +20,9 @@
#include <stddef.h>
#include <algorithm>
#include <utility>
#include "absl/container/inlined_vector.h"
#include "absl/memory/memory.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_join.h"

@ -20,7 +20,7 @@
#include <stddef.h>
#include "absl/container/inlined_vector.h"
#include <memory>
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/useful.h"

@ -31,7 +31,6 @@
#include <utility>
#include <vector>
#include "absl/container/inlined_vector.h"
#include "absl/memory/memory.h"
#include "absl/random/random.h"
#include "absl/status/status.h"

@ -19,11 +19,12 @@
#include <inttypes.h>
#include <string.h>
#include <algorithm>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "absl/container/inlined_vector.h"
#include "absl/memory/memory.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"

@ -340,7 +340,7 @@ class RingHash : public LoadBalancingPolicy {
RefCountedPtr<RingHash> ring_hash_lb_;
grpc_closure closure_;
absl::InlinedVector<RefCountedPtr<SubchannelInterface>, 10> subchannels_;
std::vector<RefCountedPtr<SubchannelInterface>> subchannels_;
};
RefCountedPtr<RingHash> parent_;

@ -19,11 +19,12 @@
#include <inttypes.h>
#include <stdlib.h>
#include <algorithm>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "absl/container/inlined_vector.h"
#include "absl/memory/memory.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
@ -175,7 +176,7 @@ class RoundRobin : public LoadBalancingPolicy {
RoundRobin* parent_;
size_t last_picked_index_;
absl::InlinedVector<RefCountedPtr<SubchannelInterface>, 10> subchannels_;
std::vector<RefCountedPtr<SubchannelInterface>> subchannels_;
};
void ShutdownLocked() override;

@ -25,8 +25,8 @@
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "absl/container/inlined_vector.h"
#include "absl/status/status.h"
#include "absl/types/optional.h"
@ -180,8 +180,7 @@ class SubchannelList : public InternallyRefCounted<SubchannelListType> {
public:
// We use ManualConstructor here to support SubchannelDataType classes
// that are not copyable.
typedef absl::InlinedVector<ManualConstructor<SubchannelDataType>, 10>
SubchannelVector;
using SubchannelVector = std::vector<ManualConstructor<SubchannelDataType>>;
// The number of subchannels in the list.
size_t num_subchannels() const { return subchannels_.size(); }

@ -26,7 +26,6 @@
#include <utility>
#include <vector>
#include "absl/container/inlined_vector.h"
#include "absl/memory/memory.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
@ -129,8 +128,8 @@ class WeightedTargetLb : public LoadBalancingPolicy {
// ready state. The first element in the pair represents the end of a
// range proportional to the child's weight. The start of the range
// is the previous value in the vector and is 0 for the first element.
using PickerList = absl::InlinedVector<
std::pair<uint32_t, RefCountedPtr<ChildPickerWrapper>>, 1>;
using PickerList =
std::vector<std::pair<uint32_t, RefCountedPtr<ChildPickerWrapper>>>;
explicit WeightedPicker(PickerList pickers)
: pickers_(std::move(pickers)) {}

@ -24,7 +24,6 @@
#include <memory>
#include <set>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>

@ -28,7 +28,6 @@
#include <utility>
#include <vector>
#include "absl/container/inlined_vector.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
#include "absl/strings/str_join.h"
@ -65,8 +64,7 @@ class RegistryState {
}
private:
absl::InlinedVector<std::unique_ptr<LoadBalancingPolicyFactory>, 10>
factories_;
std::vector<std::unique_ptr<LoadBalancingPolicyFactory>> factories_;
};
RegistryState* g_state = nullptr;

@ -20,7 +20,6 @@
#include "src/core/ext/filters/client_channel/proxy_mapper_registry.h"
#include <algorithm>
#include <memory>
#include <utility>
#include <vector>

@ -14,6 +14,8 @@
#include <grpc/support/port_platform.h>
#include <algorithm>
#include "src/core/lib/iomgr/port.h" // IWYU pragma: keep
#ifdef GRPC_HAVE_UNIX_SOCKET

@ -207,7 +207,7 @@ std::string ChooseServiceConfig(char* service_config_choice_json,
return "";
}
const Json* service_config = nullptr;
absl::InlinedVector<grpc_error_handle, 4> error_list;
std::vector<grpc_error_handle> error_list;
for (const Json& choice : json.array_value()) {
if (choice.type() != Json::Type::OBJECT) {
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(

@ -18,6 +18,9 @@
#include <grpc/support/port_platform.h>
#include <algorithm>
#include <vector>
#include "src/core/lib/iomgr/sockaddr.h"
// IWYU pragma: no_include <arpa/nameser.h>

@ -18,12 +18,12 @@
#include <limits.h>
#include <algorithm>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "absl/container/inlined_vector.h"
#include "absl/functional/bind_front.h"
#include "absl/memory/memory.h"
#include "absl/status/status.h"

@ -16,6 +16,7 @@
#include <grpc/support/port_platform.h>
#include <algorithm>
#include <memory>
#include <string>
#include <type_traits>

@ -28,7 +28,6 @@
#include <utility>
#include <vector>
#include "absl/container/inlined_vector.h"
#include "absl/memory/memory.h"
#include "absl/meta/type_traits.h"
#include "absl/random/random.h"
@ -337,7 +336,7 @@ class XdsResolver : public Resolver {
XdsRouteConfigResource::Route route;
RefCountedPtr<ServiceConfig> method_config;
absl::InlinedVector<ClusterWeightState, 2> weighted_cluster_state;
std::vector<ClusterWeightState> weighted_cluster_state;
bool operator==(const Route& other) const;
};

@ -22,9 +22,9 @@
#include <string.h>
#include <algorithm>
#include <utility>
#include "absl/container/inlined_vector.h"
#include <vector>
#include <grpc/support/log.h>
@ -55,13 +55,7 @@ class RegistryState {
}
private:
// We currently support 3 factories without doing additional
// allocation. This number could be raised if there is a case where
// more factories are needed and the additional allocations are
// hurting performance (which is unlikely, since these allocations
// only occur at gRPC initialization time).
absl::InlinedVector<std::unique_ptr<CertificateProviderFactory>, 3>
factories_;
std::vector<std::unique_ptr<CertificateProviderFactory>> factories_;
};
RegistryState* g_state = nullptr;

@ -20,7 +20,6 @@
#include <stdlib.h>
#include <algorithm>
#include <utility>
#include <vector>
@ -289,7 +288,7 @@ bool XdsBootstrap::XdsServerExists(
}
grpc_error_handle XdsBootstrap::ParseXdsServerList(
Json* json, absl::InlinedVector<XdsServer, 1>* servers) {
Json* json, std::vector<XdsServer>* servers) {
std::vector<grpc_error_handle> error_list;
for (size_t i = 0; i < json->mutable_array()->size(); ++i) {
Json& child = json->mutable_array()->at(i);

@ -19,12 +19,13 @@
#include <grpc/support/port_platform.h>
#include <algorithm>
#include <map>
#include <memory>
#include <set>
#include <string>
#include <vector>
#include "absl/container/inlined_vector.h"
#include "absl/strings/string_view.h"
#include "src/core/ext/xds/certificate_provider_store.h"
@ -81,7 +82,7 @@ class XdsBootstrap {
struct Authority {
std::string client_listener_resource_name_template;
absl::InlinedVector<XdsServer, 1> xds_servers;
std::vector<XdsServer> xds_servers;
};
// Creates bootstrap object from json_string.
@ -117,8 +118,8 @@ class XdsBootstrap {
bool XdsServerExists(const XdsServer& server) const;
private:
grpc_error_handle ParseXdsServerList(
Json* json, absl::InlinedVector<XdsServer, 1>* servers);
grpc_error_handle ParseXdsServerList(Json* json,
std::vector<XdsServer>* servers);
grpc_error_handle ParseAuthorities(Json* json);
grpc_error_handle ParseAuthority(Json* json, const std::string& name);
grpc_error_handle ParseNode(Json* json);
@ -127,7 +128,7 @@ class XdsBootstrap {
grpc_error_handle ParseCertificateProvider(const std::string& instance_name,
Json* certificate_provider_json);
absl::InlinedVector<XdsServer, 1> servers_;
std::vector<XdsServer> servers_;
std::unique_ptr<Node> node_;
std::string client_default_listener_resource_name_template_;
std::string server_listener_resource_name_template_;

@ -23,7 +23,6 @@
#include <type_traits>
#include <utility>
#include "absl/container/inlined_vector.h"
#include "absl/memory/memory.h"
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
@ -62,7 +61,7 @@ namespace grpc_core {
//
std::string XdsClusterResource::ToString() const {
absl::InlinedVector<std::string, 8> contents;
std::vector<std::string> contents;
switch (cluster_type) {
case EDS:
contents.push_back("cluster_type=EDS");

@ -24,7 +24,6 @@
#include <map>
#include <utility>
#include "absl/container/inlined_vector.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_cat.h"
@ -66,7 +65,7 @@ bool CommonTlsContext::CertificateValidationContext::Empty() const {
std::string CommonTlsContext::CertificateProviderPluginInstance::ToString()
const {
absl::InlinedVector<std::string, 2> contents;
std::vector<std::string> contents;
if (!instance_name.empty()) {
contents.push_back(absl::StrFormat("instance_name=%s", instance_name));
}
@ -86,7 +85,7 @@ bool CommonTlsContext::CertificateProviderPluginInstance::Empty() const {
//
std::string CommonTlsContext::ToString() const {
absl::InlinedVector<std::string, 2> contents;
std::vector<std::string> contents;
if (!tls_certificate_provider_instance.Empty()) {
contents.push_back(
absl::StrFormat("tls_certificate_provider_instance=%s",

@ -21,12 +21,13 @@
#include <stdint.h>
#include <algorithm>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "absl/container/inlined_vector.h"
#include "absl/status/statusor.h"
#include "absl/strings/string_view.h"
#include "envoy/config/endpoint/v3/endpoint.upbdefs.h"
@ -61,7 +62,7 @@ struct XdsEndpointResource {
bool operator==(const Priority& other) const;
std::string ToString() const;
};
using PriorityList = absl::InlinedVector<Priority, 2>;
using PriorityList = std::vector<Priority>;
// There are two phases of accessing this class's content:
// 1. to initialize in the control plane combiner;
@ -79,7 +80,7 @@ struct XdsEndpointResource {
const uint32_t parts_per_million;
};
using DropCategoryList = absl::InlinedVector<DropCategory, 2>;
using DropCategoryList = std::vector<DropCategory>;
void AddCategory(std::string name, uint32_t parts_per_million) {
drop_category_list_.emplace_back(

@ -24,7 +24,6 @@
#include <type_traits>
#include <utility>
#include "absl/container/inlined_vector.h"
#include "absl/memory/memory.h"
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
@ -83,7 +82,7 @@ bool XdsListenerResource::DownstreamTlsContext::Empty() const {
//
std::string XdsListenerResource::HttpConnectionManager::ToString() const {
absl::InlinedVector<std::string, 4> contents;
std::vector<std::string> contents;
contents.push_back(absl::StrFormat(
"route_config_name=%s",
!route_config_name.empty() ? route_config_name.c_str() : "<inlined>"));
@ -159,7 +158,7 @@ struct FilterChain {
};
std::string FilterChain::FilterChainMatch::ToString() const {
absl::InlinedVector<std::string, 8> contents;
std::vector<std::string> contents;
if (destination_port != 0) {
contents.push_back(absl::StrCat("destination_port=", destination_port));
}
@ -248,7 +247,7 @@ std::string XdsListenerResource::FilterChainMap::ToString() const {
//
std::string XdsListenerResource::ToString() const {
absl::InlinedVector<std::string, 4> contents;
std::vector<std::string> contents;
if (type == ListenerType::kTcpListener) {
contents.push_back(absl::StrCat("address=", address));
contents.push_back(

@ -21,7 +21,6 @@
#include <stddef.h>
#include <stdint.h>
#include <algorithm>
#include <map>
#include <memory>
#include <set>

@ -19,10 +19,10 @@
#include <stdlib.h>
#include <algorithm> // IWYU pragma: keep
#include <memory>
#include <utility>
#include "absl/container/inlined_vector.h"
#include <vector>
namespace grpc_core {
@ -127,7 +127,7 @@ class AVL {
}
private:
absl::InlinedVector<Node*, 8> stack_;
std::vector<Node*> stack_;
};
explicit AVL(NodePtr root) : root_(std::move(root)) {}

@ -23,6 +23,7 @@
#include <stddef.h>
#include <algorithm> // IWYU pragma: keep
#include <string>
#include <type_traits>
#include <utility>

@ -24,6 +24,7 @@
#include <algorithm>
#include <atomic>
#include <memory>
#include <type_traits>
#include "absl/status/statusor.h"

@ -29,8 +29,8 @@
#include <set>
#include <string>
#include <utility>
#include <vector>
#include "absl/container/inlined_vector.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
@ -170,8 +170,7 @@ class CallCountingHelper {
// collects the sharded data into one CounterData struct.
void CollectData(CounterData* out);
// Really zero-sized, but 0-sized arrays are illegal on MSVC.
absl::InlinedVector<AtomicCounterData, 1> per_cpu_counter_data_storage_;
std::vector<AtomicCounterData> per_cpu_counter_data_storage_;
size_t num_cores_ = 0;
};

@ -24,8 +24,7 @@
#include <cstdint>
#include <cstring>
#include <utility>
#include "absl/container/inlined_vector.h"
#include <vector>
#include <grpc/grpc.h>
#include <grpc/support/log.h>
@ -77,7 +76,7 @@ RefCountedPtr<BaseNode> ChannelzRegistry::InternalGet(intptr_t uuid) {
std::string ChannelzRegistry::InternalGetTopChannels(
intptr_t start_channel_id) {
absl::InlinedVector<RefCountedPtr<BaseNode>, 10> top_level_channels;
std::vector<RefCountedPtr<BaseNode>> top_level_channels;
RefCountedPtr<BaseNode> node_after_pagination_limit;
{
MutexLock lock(&mu_);
@ -116,7 +115,7 @@ std::string ChannelzRegistry::InternalGetTopChannels(
}
std::string ChannelzRegistry::InternalGetServers(intptr_t start_server_id) {
absl::InlinedVector<RefCountedPtr<BaseNode>, 10> servers;
std::vector<RefCountedPtr<BaseNode>> servers;
RefCountedPtr<BaseNode> node_after_pagination_limit;
{
MutexLock lock(&mu_);
@ -155,7 +154,7 @@ std::string ChannelzRegistry::InternalGetServers(intptr_t start_server_id) {
}
void ChannelzRegistry::InternalLogAllEntities() {
absl::InlinedVector<RefCountedPtr<BaseNode>, 10> nodes;
std::vector<RefCountedPtr<BaseNode>> nodes;
{
MutexLock lock(&mu_);
for (auto& p : node_map_) {

@ -20,6 +20,7 @@
#include "src/core/lib/resolver/resolver.h"
#include <algorithm>
#include <utility>
#include "src/core/lib/channel/channel_args.h"

@ -27,8 +27,8 @@
#include <map>
#include <memory>
#include <string>
#include <vector>
#include "absl/container/inlined_vector.h"
#include "absl/memory/memory.h"
#include <grpc/impl/codegen/grpc_types.h>
@ -117,7 +117,7 @@ class ServerAddress {
// ServerAddressList
//
typedef absl::InlinedVector<ServerAddress, 1> ServerAddressList;
using ServerAddressList = std::vector<ServerAddress>;
//
// ServerAddressWeightAttribute

@ -20,7 +20,6 @@
#include "src/core/lib/security/credentials/composite/composite_credentials.h"
#include <algorithm>
#include <cstring>
#include <vector>

@ -18,12 +18,14 @@
#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_COMPOSITE_CREDENTIALS_H
#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_COMPOSITE_CREDENTIALS_H
#include <grpc/support/port_platform.h>
#include <algorithm>
#include <string>
#include <utility>
#include <vector>
#include "absl/container/inlined_vector.h"
#include "absl/status/statusor.h"
#include <grpc/grpc.h>
@ -93,7 +95,7 @@ class grpc_composite_channel_credentials : public grpc_channel_credentials {
class grpc_composite_call_credentials : public grpc_call_credentials {
public:
using CallCredentialsList =
absl::InlinedVector<grpc_core::RefCountedPtr<grpc_call_credentials>, 2>;
std::vector<grpc_core::RefCountedPtr<grpc_call_credentials>>;
grpc_composite_call_credentials(
grpc_core::RefCountedPtr<grpc_call_credentials> creds1,

@ -29,7 +29,6 @@
#include <memory>
#include <vector>
#include "absl/container/inlined_vector.h"
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
@ -663,7 +662,7 @@ class StsTokenFetcherCredentials
absl::StatusOr<URI> ValidateStsCredentialsOptions(
const grpc_sts_credentials_options* options) {
absl::InlinedVector<grpc_error_handle, 3> error_list;
std::vector<grpc_error_handle> error_list;
absl::StatusOr<URI> sts_url =
URI::Parse(options->token_exchange_service_uri == nullptr
? ""

@ -18,7 +18,8 @@
#include "src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h"
#include "absl/container/inlined_vector.h"
#include <algorithm>
#include <vector>
#include <grpc/grpc_security.h>
#include <grpc/support/log.h>

@ -21,7 +21,9 @@
#include <stdint.h>
#include <time.h>
#include <algorithm>
#include <utility>
#include <vector>
#include <openssl/bio.h>
#include <openssl/crypto.h>
@ -29,7 +31,6 @@
#include <openssl/pem.h>
#include <openssl/x509.h>
#include "absl/container/inlined_vector.h"
#include "absl/status/status.h"
#include <grpc/impl/codegen/gpr_types.h>

@ -18,6 +18,10 @@
#include <grpc/support/port_platform.h>
#include <algorithm>
#include <memory>
#include <vector>
#if defined(GPR_LINUX) || defined(GPR_ANDROID) || defined(GPR_FREEBSD) || \
defined(GPR_APPLE)
@ -29,8 +33,6 @@
#include <sys/stat.h>
#include <unistd.h>
#include "absl/container/inlined_vector.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
@ -107,7 +109,7 @@ grpc_slice CreateRootCertsBundle(const char* certs_directory) {
char path[MAXPATHLEN];
off_t size;
};
absl::InlinedVector<FileData, 2> roots_filenames;
std::vector<FileData> roots_filenames;
size_t total_bundle_size = 0;
struct dirent* directory_entry;
while ((directory_entry = readdir(ca_directory)) != nullptr) {

@ -25,8 +25,8 @@
#include <string>
#include <utility>
#include <vector>
#include "absl/container/inlined_vector.h"
#include "absl/status/status.h"
#include "absl/strings/string_view.h"
@ -180,7 +180,7 @@ class PemKeyCertPair {
std::string cert_chain_;
};
typedef absl::InlinedVector<PemKeyCertPair, 1> PemKeyCertPairList;
using PemKeyCertPairList = std::vector<PemKeyCertPair>;
} // namespace grpc_core

@ -27,7 +27,6 @@
#include <utility>
#include <vector>
#include "absl/container/inlined_vector.h"
#include "absl/functional/bind_front.h"
#include "absl/memory/memory.h"
#include "absl/strings/str_cat.h"

@ -26,7 +26,6 @@
#include <unordered_map>
#include <vector>
#include "absl/container/inlined_vector.h"
#include "absl/strings/string_view.h"
#include <grpc/impl/codegen/grpc_types.h>
@ -122,8 +121,7 @@ class ServiceConfigImpl final : public ServiceConfig {
nullptr;
// Storage for all the vectors that are being used in
// parsed_method_configs_table_.
absl::InlinedVector<std::unique_ptr<ServiceConfigParser::ParsedConfigVector>,
32>
std::vector<std::unique_ptr<ServiceConfigParser::ParsedConfigVector>>
parsed_method_config_vectors_storage_;
};

@ -16,7 +16,6 @@
#include <stddef.h>
#include <algorithm>
#include <functional>
#include <map>
#include <string>

@ -4,4 +4,6 @@
{ include: ["<sys/socket.h>", "public", "\"src/core/lib/iomgr/sockaddr.h\"", "public"]},
{ include: ["<openssl/base.h>", "private", "<openssl/crypto.h>", "public"] },
{ include: ["<openssl/digest.h>", "private", "<openssl/evp.h>", "public"] },
# workaround: https://github.com/include-what-you-use/include-what-you-use/issues/908
{ symbol: ["std::max", "private", "<algorithm>", "public" ] },
]

Loading…
Cancel
Save