/Users/deen/code/yugabyte-db/src/yb/rpc/lightweight_message.h
Line | Count | Source (jump to first uncovered line) |
1 | | // Copyright (c) YugaByte, Inc. |
2 | | // |
3 | | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
4 | | // in compliance with the License. You may obtain a copy of the License at |
5 | | // |
6 | | // http://www.apache.org/licenses/LICENSE-2.0 |
7 | | // |
8 | | // Unless required by applicable law or agreed to in writing, software distributed under the License |
9 | | // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
10 | | // or implied. See the License for the specific language governing permissions and limitations |
11 | | // under the License. |
12 | | // |
13 | | |
14 | | #ifndef YB_RPC_LIGHTWEIGHT_MESSAGE_H |
15 | | #define YB_RPC_LIGHTWEIGHT_MESSAGE_H |
16 | | |
17 | | #include <google/protobuf/io/coded_stream.h> |
18 | | #include <google/protobuf/wire_format_lite.h> |
19 | | |
20 | | #include "yb/gutil/casts.h" |
21 | | |
22 | | #include "yb/rpc/serialization.h" |
23 | | |
24 | | #include "yb/util/memory/arena.h" |
25 | | #include "yb/util/status.h" |
26 | | |
27 | | namespace yb { |
28 | | namespace rpc { |
29 | | |
30 | | class LightweightMessage { |
31 | | public: |
32 | 5 | virtual ~LightweightMessage() = default; |
33 | | |
34 | | virtual CHECKED_STATUS ParseFromCodedStream(google::protobuf::io::CodedInputStream* cis) = 0; |
35 | | virtual size_t SerializedSize() const = 0; |
36 | | virtual uint8_t* SerializeToArray(uint8_t* out) const = 0; |
37 | | virtual void AppendToDebugString(std::string* out) const = 0; |
38 | | virtual void Clear() = 0; |
39 | | |
40 | | CHECKED_STATUS ParseFromSlice(const Slice& slice); |
41 | | |
42 | 0 | size_t SpaceUsedLong() const { |
43 | 0 | return SerializedSize(); // TODO(LW) |
44 | 0 | } |
45 | | |
46 | | std::string ShortDebugString() const; |
47 | | std::string SerializeAsString() const; |
48 | | }; |
49 | | |
50 | | template <class MsgPtr, class LWMsgPtr> |
51 | | class AnyMessagePtrBase { |
52 | | public: |
53 | 5.59M | AnyMessagePtrBase() : message_(0) {} |
54 | 70.7M | explicit AnyMessagePtrBase(MsgPtr message) : message_(reinterpret_cast<size_t>(message)) {} _ZN2yb3rpc17AnyMessagePtrBaseIPKN6google8protobuf7MessageEPKNS0_18LightweightMessageEEC2ES6_ Line | Count | Source | 54 | 45.1M | explicit AnyMessagePtrBase(MsgPtr message) : message_(reinterpret_cast<size_t>(message)) {} |
_ZN2yb3rpc17AnyMessagePtrBaseIPN6google8protobuf7MessageEPNS0_18LightweightMessageEEC2ES5_ Line | Count | Source | 54 | 25.5M | explicit AnyMessagePtrBase(MsgPtr message) : message_(reinterpret_cast<size_t>(message)) {} |
|
55 | | explicit AnyMessagePtrBase(LWMsgPtr message) |
56 | 1 | : message_(message ? reinterpret_cast<size_t>(message) | 1 : 0) { |
57 | 1 | } _ZN2yb3rpc17AnyMessagePtrBaseIPKN6google8protobuf7MessageEPKNS0_18LightweightMessageEEC2ES9_ Line | Count | Source | 56 | 1 | : message_(message ? reinterpret_cast<size_t>(message) | 1 : 0) { | 57 | 1 | } |
Unexecuted instantiation: _ZN2yb3rpc17AnyMessagePtrBaseIPN6google8protobuf7MessageEPNS0_18LightweightMessageEEC2ES7_ |
58 | | |
59 | 298M | bool is_lightweight() const { |
60 | 298M | return message_ & 1; |
61 | 298M | } _ZNK2yb3rpc17AnyMessagePtrBaseIPKN6google8protobuf7MessageEPKNS0_18LightweightMessageEE14is_lightweightEv Line | Count | Source | 59 | 242M | bool is_lightweight() const { | 60 | 242M | return message_ & 1; | 61 | 242M | } |
_ZNK2yb3rpc17AnyMessagePtrBaseIPN6google8protobuf7MessageEPNS0_18LightweightMessageEE14is_lightweightEv Line | Count | Source | 59 | 55.7M | bool is_lightweight() const { | 60 | 55.7M | return message_ & 1; | 61 | 55.7M | } |
|
62 | | |
63 | 3 | LWMsgPtr lightweight() const { |
64 | 3 | DCHECK(is_lightweight()); |
65 | 3 | return reinterpret_cast<LWMsgPtr>(message_ ^ 1); |
66 | 3 | } _ZNK2yb3rpc17AnyMessagePtrBaseIPKN6google8protobuf7MessageEPKNS0_18LightweightMessageEE11lightweightEv Line | Count | Source | 63 | 3 | LWMsgPtr lightweight() const { | 64 | 3 | DCHECK(is_lightweight()); | 65 | 3 | return reinterpret_cast<LWMsgPtr>(message_ ^ 1); | 66 | 3 | } |
Unexecuted instantiation: _ZNK2yb3rpc17AnyMessagePtrBaseIPN6google8protobuf7MessageEPNS0_18LightweightMessageEE11lightweightEv |
67 | | |
68 | 154M | MsgPtr protobuf() const { |
69 | 154M | DCHECK(!is_lightweight()); |
70 | 154M | return reinterpret_cast<MsgPtr>(message_); |
71 | 154M | } _ZNK2yb3rpc17AnyMessagePtrBaseIPKN6google8protobuf7MessageEPKNS0_18LightweightMessageEE8protobufEv Line | Count | Source | 68 | 124M | MsgPtr protobuf() const { | 69 | 124M | DCHECK(!is_lightweight()); | 70 | 124M | return reinterpret_cast<MsgPtr>(message_); | 71 | 124M | } |
_ZNK2yb3rpc17AnyMessagePtrBaseIPN6google8protobuf7MessageEPNS0_18LightweightMessageEE8protobufEv Line | Count | Source | 68 | 30.6M | MsgPtr protobuf() const { | 69 | 30.6M | DCHECK(!is_lightweight()); | 70 | 30.6M | return reinterpret_cast<MsgPtr>(message_); | 71 | 30.6M | } |
|
72 | | |
73 | 5.58M | size_t impl() const { |
74 | 5.58M | return message_; |
75 | 5.58M | } |
76 | | |
77 | | protected: |
78 | 26.6M | friend bool operator==(AnyMessagePtrBase lhs, std::nullptr_t) { |
79 | 26.6M | return lhs.message_ == 0; |
80 | 26.6M | } |
81 | | |
82 | 5.58M | explicit AnyMessagePtrBase(size_t message) : message_(message) {} |
83 | | |
84 | | size_t message_; |
85 | | }; |
86 | | |
87 | | class AnyMessagePtr : public AnyMessagePtrBase<google::protobuf::Message*, LightweightMessage*> { |
88 | | public: |
89 | | template <class... Args> |
90 | 51.1M | explicit AnyMessagePtr(Args&&... args) : AnyMessagePtrBase(std::forward<Args>(args)...) {} _ZN2yb3rpc13AnyMessagePtrC2IJRS1_EEEDpOT_ Line | Count | Source | 90 | 25.5M | explicit AnyMessagePtr(Args&&... args) : AnyMessagePtrBase(std::forward<Args>(args)...) {} |
_ZN2yb3rpc13AnyMessagePtrC2IJRPN6google8protobuf7MessageEEEEDpOT_ Line | Count | Source | 90 | 25.5M | explicit AnyMessagePtr(Args&&... args) : AnyMessagePtrBase(std::forward<Args>(args)...) {} |
Unexecuted instantiation: _ZN2yb3rpc13AnyMessagePtrC2IJRPNS0_18LightweightMessageEEEEDpOT_ |
91 | | |
92 | 25.5M | void operator=(std::nullptr_t) { |
93 | 25.5M | message_ = 0; |
94 | 25.5M | } |
95 | | |
96 | | CHECKED_STATUS ParseFromSlice(const Slice& slice); |
97 | | }; |
98 | | |
99 | | class AnyMessageConstPtr : public AnyMessagePtrBase< |
100 | | const google::protobuf::Message*, const LightweightMessage*> { |
101 | | public: |
102 | | template <class... Args> |
103 | 50.7M | explicit AnyMessageConstPtr(Args&&... args) : AnyMessagePtrBase(std::forward<Args>(args)...) {} _ZN2yb3rpc18AnyMessageConstPtrC2IJPNS_8rpc_test13AddResponsePBEEEEDpOT_ Line | Count | Source | 103 | 758 | explicit AnyMessageConstPtr(Args&&... args) : AnyMessagePtrBase(std::forward<Args>(args)...) {} |
_ZN2yb3rpc18AnyMessageConstPtrC2IJPNS_8rpc_test21SendStringsResponsePBEEEEDpOT_ Line | Count | Source | 103 | 3 | explicit AnyMessageConstPtr(Args&&... args) : AnyMessagePtrBase(std::forward<Args>(args)...) {} |
_ZN2yb3rpc18AnyMessageConstPtrC2IJPNS_8rpc_test15SleepResponsePBEEEEDpOT_ Line | Count | Source | 103 | 4 | explicit AnyMessageConstPtr(Args&&... args) : AnyMessagePtrBase(std::forward<Args>(args)...) {} |
_ZN2yb3rpc18AnyMessageConstPtrC2IJPNS_8rpc_test14EchoResponsePBEEEEDpOT_ Line | Count | Source | 103 | 224k | explicit AnyMessageConstPtr(Args&&... args) : AnyMessagePtrBase(std::forward<Args>(args)...) {} |
_ZN2yb3rpc18AnyMessageConstPtrC2IJEEEDpOT_ Line | Count | Source | 103 | 5.59M | explicit AnyMessageConstPtr(Args&&... args) : AnyMessagePtrBase(std::forward<Args>(args)...) {} |
_ZN2yb3rpc18AnyMessageConstPtrC2IJPKN6google8protobuf7MessageEEEEDpOT_ Line | Count | Source | 103 | 25.5M | explicit AnyMessageConstPtr(Args&&... args) : AnyMessagePtrBase(std::forward<Args>(args)...) {} |
Unexecuted instantiation: _ZN2yb3rpc18AnyMessageConstPtrC2IJPKNS0_18LightweightMessageEEEEDpOT_ _ZN2yb3rpc18AnyMessageConstPtrC2IJPN6google8protobuf7MessageEEEEDpOT_ Line | Count | Source | 103 | 19.3M | explicit AnyMessageConstPtr(Args&&... args) : AnyMessagePtrBase(std::forward<Args>(args)...) {} |
_ZN2yb3rpc18AnyMessageConstPtrC2IJPNS0_18LightweightMessageEEEEDpOT_ Line | Count | Source | 103 | 1 | explicit AnyMessageConstPtr(Args&&... args) : AnyMessagePtrBase(std::forward<Args>(args)...) {} |
_ZN2yb3rpc18AnyMessageConstPtrC2IJPNS0_13ErrorStatusPBEEEEDpOT_ Line | Count | Source | 103 | 2.34k | explicit AnyMessageConstPtr(Args&&... args) : AnyMessagePtrBase(std::forward<Args>(args)...) {} |
|
104 | | |
105 | | AnyMessageConstPtr(const AnyMessagePtr& rhs) // NOLINT |
106 | 5.58M | : AnyMessagePtrBase(rhs.impl()) { |
107 | 5.58M | } |
108 | | |
109 | | size_t SerializedSize() const; |
110 | | |
111 | | Result<uint8_t*> SerializeToArray(uint8_t* out) const; |
112 | | }; |
113 | | |
114 | | template <google::protobuf::internal::WireFormatLite::FieldType type, class T> |
115 | | class LightweightSerialization { |
116 | | public: |
117 | | static bool Read(google::protobuf::io::CodedInputStream* input, T* t); |
118 | | static uint8_t* Write(T value, uint8_t* out); |
119 | | static size_t Size(T value); |
120 | | }; |
121 | | |
122 | | template <class T> |
123 | | class LightweightSerialization<google::protobuf::internal::WireFormatLite::TYPE_ENUM, T> { |
124 | | public: |
125 | | using Impl = LightweightSerialization< |
126 | | google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>; |
127 | | |
128 | 1 | static bool Read(google::protobuf::io::CodedInputStream* input, T* t) { |
129 | 1 | uint32_t temp; |
130 | 1 | if (!Impl::Read(input, &temp)) { |
131 | 0 | return false; |
132 | 0 | } |
133 | 1 | *t = static_cast<T>(temp); |
134 | 1 | return true; |
135 | 1 | } Unexecuted instantiation: _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE14ENS0_28ErrorStatusPB_RpcErrorCodePBEE4ReadEPNS3_2io16CodedInputStreamEPS7_ _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE14ENS_8rpc_test15LightweightEnumEE4ReadEPNS3_2io16CodedInputStreamEPS8_ Line | Count | Source | 128 | 1 | static bool Read(google::protobuf::io::CodedInputStream* input, T* t) { | 129 | 1 | uint32_t temp; | 130 | 1 | if (!Impl::Read(input, &temp)) { | 131 | 0 | return false; | 132 | 0 | } | 133 | 1 | *t = static_cast<T>(temp); | 134 | 1 | return true; | 135 | 1 | } |
|
136 | | |
137 | 1 | static uint8_t* Write(T value, uint8_t* out) { |
138 | 1 | return Impl::Write(value, out); |
139 | 1 | } Unexecuted instantiation: _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE14ENS0_28ErrorStatusPB_RpcErrorCodePBEE5WriteES7_Ph _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE14ENS_8rpc_test15LightweightEnumEE5WriteES8_Ph Line | Count | Source | 137 | 1 | static uint8_t* Write(T value, uint8_t* out) { | 138 | 1 | return Impl::Write(value, out); | 139 | 1 | } |
|
140 | | |
141 | 2 | static size_t Size(T value) { |
142 | 2 | return Impl::Size(value); |
143 | 2 | } Unexecuted instantiation: _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE14ENS0_28ErrorStatusPB_RpcErrorCodePBEE4SizeES7_ _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE14ENS_8rpc_test15LightweightEnumEE4SizeES8_ Line | Count | Source | 141 | 2 | static size_t Size(T value) { | 142 | 2 | return Impl::Size(value); | 143 | 2 | } |
|
144 | | }; |
145 | | |
146 | | template <class T> |
147 | | class LightweightSerialization<google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, T> { |
148 | | public: |
149 | | using Impl = LightweightSerialization< |
150 | | google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>; |
151 | | |
152 | 38 | static bool Read(google::protobuf::io::CodedInputStream* input, T* t) { |
153 | 38 | int length; |
154 | 38 | if (!input->ReadVarintSizeAsInt(&length)) { |
155 | 0 | return false; |
156 | 0 | } |
157 | 38 | auto p = input->IncrementRecursionDepthAndPushLimit(length); |
158 | 38 | if (p.second < 0 || !t->ParseFromCodedStream(input).ok()) { |
159 | 0 | return false; |
160 | 0 | } |
161 | 38 | return input->DecrementRecursionDepthAndPopLimit(p.first); |
162 | 38 | } Unexecuted instantiation: _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS0_16LWRemoteMethodPBEE4ReadEPNS3_2io16CodedInputStreamEPS7_ _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test25LWLightweightSubMessagePBEE4ReadEPNS3_2io16CodedInputStreamEPS8_ Line | Count | Source | 152 | 14 | static bool Read(google::protobuf::io::CodedInputStream* input, T* t) { | 153 | 14 | int length; | 154 | 14 | if (!input->ReadVarintSizeAsInt(&length)) { | 155 | 0 | return false; | 156 | 0 | } | 157 | 14 | auto p = input->IncrementRecursionDepthAndPushLimit(length); | 158 | 14 | if (p.second < 0 || !t->ParseFromCodedStream(input).ok()) { | 159 | 0 | return false; | 160 | 0 | } | 161 | 14 | return input->DecrementRecursionDepthAndPopLimit(p.first); | 162 | 14 | } |
_ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test19LWLightweightPairPBEE4ReadEPNS3_2io16CodedInputStreamEPS8_ Line | Count | Source | 152 | 13 | static bool Read(google::protobuf::io::CodedInputStream* input, T* t) { | 153 | 13 | int length; | 154 | 13 | if (!input->ReadVarintSizeAsInt(&length)) { | 155 | 0 | return false; | 156 | 0 | } | 157 | 13 | auto p = input->IncrementRecursionDepthAndPushLimit(length); | 158 | 13 | if (p.second < 0 || !t->ParseFromCodedStream(input).ok()) { | 159 | 0 | return false; | 160 | 0 | } | 161 | 13 | return input->DecrementRecursionDepthAndPopLimit(p.first); | 162 | 13 | } |
_ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test42LWLightweightRequestPB_LWMapEntry_DoNotUseEE4ReadEPNS3_2io16CodedInputStreamEPS8_ Line | Count | Source | 152 | 11 | static bool Read(google::protobuf::io::CodedInputStream* input, T* t) { | 153 | 11 | int length; | 154 | 11 | if (!input->ReadVarintSizeAsInt(&length)) { | 155 | 0 | return false; | 156 | 0 | } | 157 | 11 | auto p = input->IncrementRecursionDepthAndPushLimit(length); | 158 | 11 | if (p.second < 0 || !t->ParseFromCodedStream(input).ok()) { | 159 | 0 | return false; | 160 | 0 | } | 161 | 11 | return input->DecrementRecursionDepthAndPopLimit(p.first); | 162 | 11 | } |
Unexecuted instantiation: _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS0_5LWAnyEE4ReadEPNS3_2io16CodedInputStreamEPS7_ Unexecuted instantiation: _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test43LWLightweightResponsePB_LWMapEntry_DoNotUseEE4ReadEPNS3_2io16CodedInputStreamEPS8_ Unexecuted instantiation: _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test16LWTrivialErrorPBEE4ReadEPNS3_2io16CodedInputStreamEPS8_ |
163 | | |
164 | 48 | static uint8_t* Write(const T& value, uint8_t* out) { |
165 | 48 | out = google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( |
166 | 48 | narrow_cast<uint32_t>(value.cached_size()), out); |
167 | 48 | return value.SerializeToArray(out); |
168 | 48 | } Unexecuted instantiation: _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS0_16LWRemoteMethodPBEE5WriteERKS7_Ph _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test25LWLightweightSubMessagePBEE5WriteERKS8_Ph Line | Count | Source | 164 | 24 | static uint8_t* Write(const T& value, uint8_t* out) { | 165 | 24 | out = google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( | 166 | 24 | narrow_cast<uint32_t>(value.cached_size()), out); | 167 | 24 | return value.SerializeToArray(out); | 168 | 24 | } |
_ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test19LWLightweightPairPBEE5WriteERKS8_Ph Line | Count | Source | 164 | 13 | static uint8_t* Write(const T& value, uint8_t* out) { | 165 | 13 | out = google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( | 166 | 13 | narrow_cast<uint32_t>(value.cached_size()), out); | 167 | 13 | return value.SerializeToArray(out); | 168 | 13 | } |
Unexecuted instantiation: _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test42LWLightweightRequestPB_LWMapEntry_DoNotUseEE5WriteERKS8_Ph Unexecuted instantiation: _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS0_5LWAnyEE5WriteERKS7_Ph _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test43LWLightweightResponsePB_LWMapEntry_DoNotUseEE5WriteERKS8_Ph Line | Count | Source | 164 | 11 | static uint8_t* Write(const T& value, uint8_t* out) { | 165 | 11 | out = google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( | 166 | 11 | narrow_cast<uint32_t>(value.cached_size()), out); | 167 | 11 | return value.SerializeToArray(out); | 168 | 11 | } |
Unexecuted instantiation: _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test16LWTrivialErrorPBEE5WriteERKS8_Ph |
169 | | |
170 | 96 | static size_t Size(const T& value) { |
171 | 96 | size_t size = value.SerializedSize(); |
172 | 96 | return google::protobuf::io::CodedOutputStream::VarintSize32(narrow_cast<uint32_t>(size)) |
173 | 96 | + size; |
174 | 96 | } Unexecuted instantiation: _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS0_16LWRemoteMethodPBEE4SizeERKS7_ _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test25LWLightweightSubMessagePBEE4SizeERKS8_ Line | Count | Source | 170 | 48 | static size_t Size(const T& value) { | 171 | 48 | size_t size = value.SerializedSize(); | 172 | 48 | return google::protobuf::io::CodedOutputStream::VarintSize32(narrow_cast<uint32_t>(size)) | 173 | 48 | + size; | 174 | 48 | } |
_ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test19LWLightweightPairPBEE4SizeERKS8_ Line | Count | Source | 170 | 26 | static size_t Size(const T& value) { | 171 | 26 | size_t size = value.SerializedSize(); | 172 | 26 | return google::protobuf::io::CodedOutputStream::VarintSize32(narrow_cast<uint32_t>(size)) | 173 | 26 | + size; | 174 | 26 | } |
Unexecuted instantiation: _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test42LWLightweightRequestPB_LWMapEntry_DoNotUseEE4SizeERKS8_ Unexecuted instantiation: _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS0_5LWAnyEE4SizeERKS7_ _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test43LWLightweightResponsePB_LWMapEntry_DoNotUseEE4SizeERKS8_ Line | Count | Source | 170 | 22 | static size_t Size(const T& value) { | 171 | 22 | size_t size = value.SerializedSize(); | 172 | 22 | return google::protobuf::io::CodedOutputStream::VarintSize32(narrow_cast<uint32_t>(size)) | 173 | 22 | + size; | 174 | 22 | } |
Unexecuted instantiation: _ZN2yb3rpc24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test16LWTrivialErrorPBEE4SizeERKS8_ |
175 | | }; |
176 | | |
177 | | CHECKED_STATUS ParseFailed(const char* field_name); |
178 | | |
179 | | template <class Serialization, size_t TagSize, class Value> |
180 | 108 | inline size_t RepeatedSize(const Value& value) { |
181 | 108 | size_t result = TagSize * value.size(); |
182 | 1.27k | for (const auto& entry : value) { |
183 | 1.27k | result += Serialization::Size(entry); |
184 | 1.27k | } |
185 | 108 | return result; |
186 | 108 | } Unexecuted instantiation: _ZN2yb3rpc12RepeatedSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE13EjEELm1ENSt3__16vectorIjNS_8internal18ArenaAllocatorBaseIjNSB_11ArenaTraitsEEEEEEEmRKT1_ Unexecuted instantiation: _ZN2yb3rpc12RepeatedSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE4EyEELm1ENSt3__16vectorIyNS_8internal18ArenaAllocatorBaseIyNSB_11ArenaTraitsEEEEEEEmRKT1_ _ZN2yb3rpc12RepeatedSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE17EiEELm1ENSt3__16vectorIiNS_8internal18ArenaAllocatorBaseIiNSB_11ArenaTraitsEEEEEEEmRKT1_ Line | Count | Source | 180 | 48 | inline size_t RepeatedSize(const Value& value) { | 181 | 48 | size_t result = TagSize * value.size(); | 182 | 624 | for (const auto& entry : value) { | 183 | 624 | result += Serialization::Size(entry); | 184 | 624 | } | 185 | 48 | return result; | 186 | 48 | } |
_ZN2yb3rpc12RepeatedSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE12ENS_5SliceEEELm1ENSt3__16vectorIS8_NS_8internal18ArenaAllocatorBaseIS8_NSC_11ArenaTraitsEEEEEEEmRKT1_ Line | Count | Source | 180 | 48 | inline size_t RepeatedSize(const Value& value) { | 181 | 48 | size_t result = TagSize * value.size(); | 182 | 528 | for (const auto& entry : value) { | 183 | 528 | result += Serialization::Size(entry); | 184 | 528 | } | 185 | 48 | return result; | 186 | 48 | } |
_ZN2yb3rpc12RepeatedSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE13EjEELm2ENSt3__16vectorIjNS_8internal18ArenaAllocatorBaseIjNSB_11ArenaTraitsEEEEEEEmRKT1_ Line | Count | Source | 180 | 2 | inline size_t RepeatedSize(const Value& value) { | 181 | 2 | size_t result = TagSize * value.size(); | 182 | 40 | for (const auto& entry : value) { | 183 | 40 | result += Serialization::Size(entry); | 184 | 40 | } | 185 | 2 | return result; | 186 | 2 | } |
_ZN2yb3rpc12RepeatedSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE9ENS_5SliceEEELm2ENSt3__16vectorIS8_NS_8internal18ArenaAllocatorBaseIS8_NSC_11ArenaTraitsEEEEEEEmRKT1_ Line | Count | Source | 180 | 2 | inline size_t RepeatedSize(const Value& value) { | 181 | 2 | size_t result = TagSize * value.size(); | 182 | 14 | for (const auto& entry : value) { | 183 | 14 | result += Serialization::Size(entry); | 184 | 14 | } | 185 | 2 | return result; | 186 | 2 | } |
_ZN2yb3rpc12RepeatedSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test25LWLightweightSubMessagePBEEELm2ENS_9ArenaListIS9_EEEEmRKT1_ Line | Count | Source | 180 | 4 | inline size_t RepeatedSize(const Value& value) { | 181 | 4 | size_t result = TagSize * value.size(); | 182 | 20 | for (const auto& entry : value) { | 183 | 20 | result += Serialization::Size(entry); | 184 | 20 | } | 185 | 4 | return result; | 186 | 4 | } |
_ZN2yb3rpc12RepeatedSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test19LWLightweightPairPBEEELm2ENS_9ArenaListIS9_EEEEmRKT1_ Line | Count | Source | 180 | 2 | inline size_t RepeatedSize(const Value& value) { | 181 | 2 | size_t result = TagSize * value.size(); | 182 | 26 | for (const auto& entry : value) { | 183 | 26 | result += Serialization::Size(entry); | 184 | 26 | } | 185 | 2 | return result; | 186 | 2 | } |
Unexecuted instantiation: _ZN2yb3rpc12RepeatedSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test42LWLightweightRequestPB_LWMapEntry_DoNotUseEEELm2ENS_9ArenaListIS9_EEEEmRKT1_ _ZN2yb3rpc12RepeatedSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test43LWLightweightResponsePB_LWMapEntry_DoNotUseEEELm2ENS_9ArenaListIS9_EEEEmRKT1_ Line | Count | Source | 180 | 2 | inline size_t RepeatedSize(const Value& value) { | 181 | 2 | size_t result = TagSize * value.size(); | 182 | 22 | for (const auto& entry : value) { | 183 | 22 | result += Serialization::Size(entry); | 184 | 22 | } | 185 | 2 | return result; | 186 | 2 | } |
|
187 | | |
188 | | template <class Serialization, size_t TagSize, class Value> |
189 | 192 | inline size_t SingleSize(const Value& value) { |
190 | 192 | return TagSize + Serialization::Size(value); |
191 | 192 | } _ZN2yb3rpc10SingleSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE9ENS_5SliceEEELm1ES8_EEmRKT1_ Line | Count | Source | 189 | 124 | inline size_t SingleSize(const Value& value) { | 190 | 124 | return TagSize + Serialization::Size(value); | 191 | 124 | } |
_ZN2yb3rpc10SingleSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE12ENS_5SliceEEELm1ES8_EEmRKT1_ Line | Count | Source | 189 | 2 | inline size_t SingleSize(const Value& value) { | 190 | 2 | return TagSize + Serialization::Size(value); | 191 | 2 | } |
_ZN2yb3rpc10SingleSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE3ExEELm1ExEEmRKT1_ Line | Count | Source | 189 | 24 | inline size_t SingleSize(const Value& value) { | 190 | 24 | return TagSize + Serialization::Size(value); | 191 | 24 | } |
_ZN2yb3rpc10SingleSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE5EiEELm1EiEEmRKT1_ Line | Count | Source | 189 | 2 | inline size_t SingleSize(const Value& value) { | 190 | 2 | return TagSize + Serialization::Size(value); | 191 | 2 | } |
Unexecuted instantiation: _ZN2yb3rpc10SingleSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS0_16LWRemoteMethodPBEEELm1ES8_EEmRKT1_ _ZN2yb3rpc10SingleSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE13EjEELm1EjEEmRKT1_ Line | Count | Source | 189 | 2 | inline size_t SingleSize(const Value& value) { | 190 | 2 | return TagSize + Serialization::Size(value); | 191 | 2 | } |
Unexecuted instantiation: _ZN2yb3rpc10SingleSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE14ENS0_28ErrorStatusPB_RpcErrorCodePBEEELm1ES8_EEmRKT1_ _ZN2yb3rpc10SingleSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE4EyEELm1EyEEmRKT1_ Line | Count | Source | 189 | 2 | inline size_t SingleSize(const Value& value) { | 190 | 2 | return TagSize + Serialization::Size(value); | 191 | 2 | } |
_ZN2yb3rpc10SingleSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test25LWLightweightSubMessagePBEEELm1ES9_EEmRKT1_ Line | Count | Source | 189 | 24 | inline size_t SingleSize(const Value& value) { | 190 | 24 | return TagSize + Serialization::Size(value); | 191 | 24 | } |
_ZN2yb3rpc10SingleSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE14ENS_8rpc_test15LightweightEnumEEELm1ES9_EEmRKT1_ Line | Count | Source | 189 | 2 | inline size_t SingleSize(const Value& value) { | 190 | 2 | return TagSize + Serialization::Size(value); | 191 | 2 | } |
_ZN2yb3rpc10SingleSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE17EiEELm1EiEEmRKT1_ Line | Count | Source | 189 | 2 | inline size_t SingleSize(const Value& value) { | 190 | 2 | return TagSize + Serialization::Size(value); | 191 | 2 | } |
_ZN2yb3rpc10SingleSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE18ExEELm1ExEEmRKT1_ Line | Count | Source | 189 | 2 | inline size_t SingleSize(const Value& value) { | 190 | 2 | return TagSize + Serialization::Size(value); | 191 | 2 | } |
_ZN2yb3rpc10SingleSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test25LWLightweightSubMessagePBEEELm2ES9_EEmRKT1_ Line | Count | Source | 189 | 4 | inline size_t SingleSize(const Value& value) { | 190 | 4 | return TagSize + Serialization::Size(value); | 191 | 4 | } |
Unexecuted instantiation: _ZN2yb3rpc10SingleSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS0_5LWAnyEEELm2ES8_EEmRKT1_ _ZN2yb3rpc10SingleSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE9ENS_5SliceEEELm2ES8_EEmRKT1_ Line | Count | Source | 189 | 2 | inline size_t SingleSize(const Value& value) { | 190 | 2 | return TagSize + Serialization::Size(value); | 191 | 2 | } |
Unexecuted instantiation: _ZN2yb3rpc10SingleSizeINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test16LWTrivialErrorPBEEELm1ES9_EEmRKT1_ |
192 | | |
193 | | template <class Serialization, uint32_t Tag, class Value> |
194 | 773 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { |
195 | 773 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); |
196 | 773 | return Serialization::Write(value, out); |
197 | 773 | } _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE9ENS_5SliceEEELj10ES8_EEPhRKT1_SA_ Line | Count | Source | 194 | 24 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 24 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 24 | return Serialization::Write(value, out); | 197 | 24 | } |
Unexecuted instantiation: _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE12ENS_5SliceEEELj18ES8_EEPhRKT1_SA_ Unexecuted instantiation: _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE3ExEELj8ExEEPhRKT1_S9_ _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE3ExEELj16ExEEPhRKT1_S9_ Line | Count | Source | 194 | 12 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 12 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 12 | return Serialization::Write(value, out); | 197 | 12 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE9ENS_5SliceEEELj18ES8_EEPhRKT1_SA_ Line | Count | Source | 194 | 13 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 13 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 13 | return Serialization::Write(value, out); | 197 | 13 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE5EiEELj8EiEEPhRKT1_S9_ Line | Count | Source | 194 | 1 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 1 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 1 | return Serialization::Write(value, out); | 197 | 1 | } |
Unexecuted instantiation: _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS0_16LWRemoteMethodPBEEELj18ES8_EEPhRKT1_SA_ Unexecuted instantiation: _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE13EjEELj24EjEEPhRKT1_S9_ Unexecuted instantiation: _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE8EbEELj16EbEEPhRKT1_S9_ Unexecuted instantiation: _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE14ENS0_28ErrorStatusPB_RpcErrorCodePBEEELj16ES8_EEPhRKT1_SA_ Unexecuted instantiation: _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE13EjEELj8EjEEPhRKT1_S9_ Unexecuted instantiation: _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE13EjEELj16EjEEPhRKT1_S9_ Unexecuted instantiation: _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE8EbEELj24EbEEPhRKT1_S9_ Unexecuted instantiation: _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE8EbEELj32EbEEPhRKT1_S9_ Unexecuted instantiation: _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE4EyEELj16EyEEPhRKT1_S9_ Unexecuted instantiation: _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE4EyEELj8EyEEPhRKT1_S9_ _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE15EiEELj13EiEEPhRKT1_S9_ Line | Count | Source | 194 | 24 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 24 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 24 | return Serialization::Write(value, out); | 197 | 24 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE17EiEELj16EiEEPhRKT1_S9_ Line | Count | Source | 194 | 312 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 312 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 312 | return Serialization::Write(value, out); | 197 | 312 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE9ENS_5SliceEEELj26ES8_EEPhRKT1_SA_ Line | Count | Source | 194 | 24 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 24 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 24 | return Serialization::Write(value, out); | 197 | 24 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE12ENS_5SliceEEELj34ES8_EEPhRKT1_SA_ Line | Count | Source | 194 | 264 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 264 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 264 | return Serialization::Write(value, out); | 197 | 264 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test25LWLightweightSubMessagePBEEELj42ES9_EEPhRKT1_SB_ Line | Count | Source | 194 | 12 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 12 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 12 | return Serialization::Write(value, out); | 197 | 12 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE7EjEELj29EjEEPhRKT1_S9_ Line | Count | Source | 194 | 1 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 1 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 1 | return Serialization::Write(value, out); | 197 | 1 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE6EyEELj33EyEEPhRKT1_S9_ Line | Count | Source | 194 | 1 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 1 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 1 | return Serialization::Write(value, out); | 197 | 1 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE13EjEELj40EjEEPhRKT1_S9_ Line | Count | Source | 194 | 1 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 1 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 1 | return Serialization::Write(value, out); | 197 | 1 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE4EyEELj48EyEEPhRKT1_S9_ Line | Count | Source | 194 | 1 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 1 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 1 | return Serialization::Write(value, out); | 197 | 1 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE2EfEELj61EfEEPhRKT1_S9_ Line | Count | Source | 194 | 1 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 1 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 1 | return Serialization::Write(value, out); | 197 | 1 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE1EdEELj65EdEEPhRKT1_S9_ Line | Count | Source | 194 | 1 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 1 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 1 | return Serialization::Write(value, out); | 197 | 1 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE9ENS_5SliceEEELj74ES8_EEPhRKT1_SA_ Line | Count | Source | 194 | 1 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 1 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 1 | return Serialization::Write(value, out); | 197 | 1 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE12ENS_5SliceEEELj82ES8_EEPhRKT1_SA_ Line | Count | Source | 194 | 1 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 1 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 1 | return Serialization::Write(value, out); | 197 | 1 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE14ENS_8rpc_test15LightweightEnumEEELj88ES9_EEPhRKT1_SB_ Line | Count | Source | 194 | 1 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 1 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 1 | return Serialization::Write(value, out); | 197 | 1 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE15EiEELj101EiEEPhRKT1_S9_ Line | Count | Source | 194 | 1 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 1 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 1 | return Serialization::Write(value, out); | 197 | 1 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE16ExEELj105ExEEPhRKT1_S9_ Line | Count | Source | 194 | 1 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 1 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 1 | return Serialization::Write(value, out); | 197 | 1 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE17EiEELj112EiEEPhRKT1_S9_ Line | Count | Source | 194 | 1 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 1 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 1 | return Serialization::Write(value, out); | 197 | 1 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE18ExEELj120ExEEPhRKT1_S9_ Line | Count | Source | 194 | 1 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 1 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 1 | return Serialization::Write(value, out); | 197 | 1 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE13EjEELj128EjEEPhRKT1_S9_ Line | Count | Source | 194 | 20 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 20 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 20 | return Serialization::Write(value, out); | 197 | 20 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE7EjEELj141EjEEPhRKT1_S9_ Line | Count | Source | 194 | 10 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 10 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 10 | return Serialization::Write(value, out); | 197 | 10 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE9ENS_5SliceEEELj146ES8_EEPhRKT1_SA_ Line | Count | Source | 194 | 7 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 7 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 7 | return Serialization::Write(value, out); | 197 | 7 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test25LWLightweightSubMessagePBEEELj154ES9_EEPhRKT1_SB_ Line | Count | Source | 194 | 1 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 1 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 1 | return Serialization::Write(value, out); | 197 | 1 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test25LWLightweightSubMessagePBEEELj162ES9_EEPhRKT1_SB_ Line | Count | Source | 194 | 5 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 5 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 5 | return Serialization::Write(value, out); | 197 | 5 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test19LWLightweightPairPBEEELj186ES9_EEPhRKT1_SB_ Line | Count | Source | 194 | 13 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 13 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 13 | return Serialization::Write(value, out); | 197 | 13 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test25LWLightweightSubMessagePBEEELj194ES9_EEPhRKT1_SB_ Line | Count | Source | 194 | 1 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 1 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 1 | return Serialization::Write(value, out); | 197 | 1 | } |
Unexecuted instantiation: _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test42LWLightweightRequestPB_LWMapEntry_DoNotUseEEELj202ES9_EEPhRKT1_SB_ Unexecuted instantiation: _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS0_5LWAnyEEELj210ES8_EEPhRKT1_SA_ _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test25LWLightweightSubMessagePBEEELj962ES9_EEPhRKT1_SB_ Line | Count | Source | 194 | 5 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 5 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 5 | return Serialization::Write(value, out); | 197 | 5 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test43LWLightweightResponsePB_LWMapEntry_DoNotUseEEELj202ES9_EEPhRKT1_SB_ Line | Count | Source | 194 | 11 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 11 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 11 | return Serialization::Write(value, out); | 197 | 11 | } |
_ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE9ENS_5SliceEEELj802ES8_EEPhRKT1_SA_ Line | Count | Source | 194 | 1 | inline uint8_t* SingleWrite(const Value& value, uint8_t* out) { | 195 | 1 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 196 | 1 | return Serialization::Write(value, out); | 197 | 1 | } |
Unexecuted instantiation: _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test16LWTrivialErrorPBEEELj10ES9_EEPhRKT1_SB_ Unexecuted instantiation: _ZN2yb3rpc11SingleWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE5EiEELj16EiEEPhRKT1_S9_ |
198 | | |
199 | | template <class Serialization, uint32_t Tag, class Value> |
200 | 55 | inline uint8_t* RepeatedWrite(const Value& value, uint8_t* out) { |
201 | 647 | for (const auto& entry : value) { |
202 | 647 | out = SingleWrite<Serialization, Tag>(entry, out); |
203 | 647 | } |
204 | 55 | return out; |
205 | 55 | } Unexecuted instantiation: _ZN2yb3rpc13RepeatedWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE13EjEELj24ENSt3__16vectorIjNS_8internal18ArenaAllocatorBaseIjNSB_11ArenaTraitsEEEEEEEPhRKT1_SG_ Unexecuted instantiation: _ZN2yb3rpc13RepeatedWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE4EyEELj16ENSt3__16vectorIyNS_8internal18ArenaAllocatorBaseIyNSB_11ArenaTraitsEEEEEEEPhRKT1_SG_ Unexecuted instantiation: _ZN2yb3rpc13RepeatedWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE13EjEELj8ENSt3__16vectorIjNS_8internal18ArenaAllocatorBaseIjNSB_11ArenaTraitsEEEEEEEPhRKT1_SG_ _ZN2yb3rpc13RepeatedWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE17EiEELj16ENSt3__16vectorIiNS_8internal18ArenaAllocatorBaseIiNSB_11ArenaTraitsEEEEEEEPhRKT1_SG_ Line | Count | Source | 200 | 24 | inline uint8_t* RepeatedWrite(const Value& value, uint8_t* out) { | 201 | 312 | for (const auto& entry : value) { | 202 | 312 | out = SingleWrite<Serialization, Tag>(entry, out); | 203 | 312 | } | 204 | 24 | return out; | 205 | 24 | } |
_ZN2yb3rpc13RepeatedWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE12ENS_5SliceEEELj34ENSt3__16vectorIS8_NS_8internal18ArenaAllocatorBaseIS8_NSC_11ArenaTraitsEEEEEEEPhRKT1_SH_ Line | Count | Source | 200 | 24 | inline uint8_t* RepeatedWrite(const Value& value, uint8_t* out) { | 201 | 264 | for (const auto& entry : value) { | 202 | 264 | out = SingleWrite<Serialization, Tag>(entry, out); | 203 | 264 | } | 204 | 24 | return out; | 205 | 24 | } |
_ZN2yb3rpc13RepeatedWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE13EjEELj128ENSt3__16vectorIjNS_8internal18ArenaAllocatorBaseIjNSB_11ArenaTraitsEEEEEEEPhRKT1_SG_ Line | Count | Source | 200 | 1 | inline uint8_t* RepeatedWrite(const Value& value, uint8_t* out) { | 201 | 20 | for (const auto& entry : value) { | 202 | 20 | out = SingleWrite<Serialization, Tag>(entry, out); | 203 | 20 | } | 204 | 1 | return out; | 205 | 1 | } |
_ZN2yb3rpc13RepeatedWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE7EjEELj141ENSt3__16vectorIjNS_8internal18ArenaAllocatorBaseIjNSB_11ArenaTraitsEEEEEEEPhRKT1_SG_ Line | Count | Source | 200 | 1 | inline uint8_t* RepeatedWrite(const Value& value, uint8_t* out) { | 201 | 10 | for (const auto& entry : value) { | 202 | 10 | out = SingleWrite<Serialization, Tag>(entry, out); | 203 | 10 | } | 204 | 1 | return out; | 205 | 1 | } |
_ZN2yb3rpc13RepeatedWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE9ENS_5SliceEEELj146ENSt3__16vectorIS8_NS_8internal18ArenaAllocatorBaseIS8_NSC_11ArenaTraitsEEEEEEEPhRKT1_SH_ Line | Count | Source | 200 | 1 | inline uint8_t* RepeatedWrite(const Value& value, uint8_t* out) { | 201 | 7 | for (const auto& entry : value) { | 202 | 7 | out = SingleWrite<Serialization, Tag>(entry, out); | 203 | 7 | } | 204 | 1 | return out; | 205 | 1 | } |
_ZN2yb3rpc13RepeatedWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test25LWLightweightSubMessagePBEEELj162ENS_9ArenaListIS9_EEEEPhRKT1_SD_ Line | Count | Source | 200 | 1 | inline uint8_t* RepeatedWrite(const Value& value, uint8_t* out) { | 201 | 5 | for (const auto& entry : value) { | 202 | 5 | out = SingleWrite<Serialization, Tag>(entry, out); | 203 | 5 | } | 204 | 1 | return out; | 205 | 1 | } |
_ZN2yb3rpc13RepeatedWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test19LWLightweightPairPBEEELj186ENS_9ArenaListIS9_EEEEPhRKT1_SD_ Line | Count | Source | 200 | 1 | inline uint8_t* RepeatedWrite(const Value& value, uint8_t* out) { | 201 | 13 | for (const auto& entry : value) { | 202 | 13 | out = SingleWrite<Serialization, Tag>(entry, out); | 203 | 13 | } | 204 | 1 | return out; | 205 | 1 | } |
Unexecuted instantiation: _ZN2yb3rpc13RepeatedWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test42LWLightweightRequestPB_LWMapEntry_DoNotUseEEELj202ENS_9ArenaListIS9_EEEEPhRKT1_SD_ _ZN2yb3rpc13RepeatedWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test25LWLightweightSubMessagePBEEELj962ENS_9ArenaListIS9_EEEEPhRKT1_SD_ Line | Count | Source | 200 | 1 | inline uint8_t* RepeatedWrite(const Value& value, uint8_t* out) { | 201 | 5 | for (const auto& entry : value) { | 202 | 5 | out = SingleWrite<Serialization, Tag>(entry, out); | 203 | 5 | } | 204 | 1 | return out; | 205 | 1 | } |
_ZN2yb3rpc13RepeatedWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE11ENS_8rpc_test43LWLightweightResponsePB_LWMapEntry_DoNotUseEEELj202ENS_9ArenaListIS9_EEEEPhRKT1_SD_ Line | Count | Source | 200 | 1 | inline uint8_t* RepeatedWrite(const Value& value, uint8_t* out) { | 201 | 11 | for (const auto& entry : value) { | 202 | 11 | out = SingleWrite<Serialization, Tag>(entry, out); | 203 | 11 | } | 204 | 1 | return out; | 205 | 1 | } |
|
206 | | |
207 | | template <class Serialization, size_t TagSize, class Value> |
208 | 2 | inline size_t PackedSize(const Value& value, size_t* out_body_size) { |
209 | 2 | size_t body_size = 0; |
210 | 254 | for (const auto& entry : value) { |
211 | 254 | body_size += Serialization::Size(entry); |
212 | 254 | } |
213 | 2 | *out_body_size = body_size; |
214 | 2 | return TagSize |
215 | 2 | + google::protobuf::io::CodedOutputStream::VarintSize32(narrow_cast<uint32_t>(body_size)) |
216 | 2 | + body_size; |
217 | 2 | } |
218 | | |
219 | | template <class Serialization, uint32_t Tag, class Value> |
220 | 2 | inline uint8_t* PackedWrite(const Value& value, size_t body_size, uint8_t* out) { |
221 | 2 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); |
222 | 2 | out = google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( |
223 | 2 | narrow_cast<uint32_t>(body_size), out); |
224 | 164 | for (const auto& entry : value) { |
225 | 164 | out = Serialization::Write(entry, out); |
226 | 164 | } |
227 | 2 | return out; |
228 | 2 | } _ZN2yb3rpc11PackedWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE4EyEELj170ENSt3__16vectorIyNS_8internal18ArenaAllocatorBaseIyNSB_11ArenaTraitsEEEEEEEPhRKT1_mSG_ Line | Count | Source | 220 | 1 | inline uint8_t* PackedWrite(const Value& value, size_t body_size, uint8_t* out) { | 221 | 1 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 222 | 1 | out = google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( | 223 | 1 | narrow_cast<uint32_t>(body_size), out); | 224 | 127 | for (const auto& entry : value) { | 225 | 127 | out = Serialization::Write(entry, out); | 226 | 127 | } | 227 | 1 | return out; | 228 | 1 | } |
_ZN2yb3rpc11PackedWriteINS0_24LightweightSerializationILN6google8protobuf8internal14WireFormatLite9FieldTypeE7EjEELj178ENSt3__16vectorIjNS_8internal18ArenaAllocatorBaseIjNSB_11ArenaTraitsEEEEEEEPhRKT1_mSG_ Line | Count | Source | 220 | 1 | inline uint8_t* PackedWrite(const Value& value, size_t body_size, uint8_t* out) { | 221 | 1 | out = google::protobuf::io::CodedOutputStream::WriteTagToArray(Tag, out); | 222 | 1 | out = google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( | 223 | 1 | narrow_cast<uint32_t>(body_size), out); | 224 | 37 | for (const auto& entry : value) { | 225 | 37 | out = Serialization::Write(entry, out); | 226 | 37 | } | 227 | 1 | return out; | 228 | 1 | } |
|
229 | | |
230 | | template <class T> |
231 | 0 | const T& empty_message() { |
232 | 0 | static T result(nullptr); |
233 | 0 | return result; |
234 | 0 | } |
235 | | |
236 | | template <class T> |
237 | | std::shared_ptr<T> MakeSharedMessage() { |
238 | | auto arena = std::make_shared<Arena>(); |
239 | | auto t = arena->NewObject<T>(arena.get()); |
240 | | return std::shared_ptr<T>(std::move(arena), t); |
241 | | } |
242 | | |
243 | | template <class T, class PB> |
244 | 6 | std::shared_ptr<T> CopySharedMessage(const PB& rhs) { |
245 | 6 | auto arena = std::make_shared<Arena>(); |
246 | 6 | auto t = arena->NewObject<T>(arena.get(), rhs); |
247 | 6 | return std::shared_ptr<T>(std::move(arena), t); |
248 | 6 | } _ZN2yb3rpc17CopySharedMessageINS_8rpc_test22LWLightweightRequestPBENS2_20LightweightRequestPBEEENSt3__110shared_ptrIT_EERKT0_ Line | Count | Source | 244 | 1 | std::shared_ptr<T> CopySharedMessage(const PB& rhs) { | 245 | 1 | auto arena = std::make_shared<Arena>(); | 246 | 1 | auto t = arena->NewObject<T>(arena.get(), rhs); | 247 | 1 | return std::shared_ptr<T>(std::move(arena), t); | 248 | 1 | } |
_ZN2yb3rpc17CopySharedMessageINS_8rpc_test25LWLightweightSubMessagePBENS2_23LightweightSubMessagePBEEENSt3__110shared_ptrIT_EERKT0_ Line | Count | Source | 244 | 5 | std::shared_ptr<T> CopySharedMessage(const PB& rhs) { | 245 | 5 | auto arena = std::make_shared<Arena>(); | 246 | 5 | auto t = arena->NewObject<T>(arena.get(), rhs); | 247 | 5 | return std::shared_ptr<T>(std::move(arena), t); | 248 | 5 | } |
|
249 | | |
250 | | template <class T> |
251 | | class AsSharedMessageHelper { |
252 | | public: |
253 | | explicit AsSharedMessageHelper(const T& t) : t_(t) {} |
254 | | |
255 | | template <class U> |
256 | | operator std::shared_ptr<U>() const { |
257 | | return CopySharedMessage<U>(t_); |
258 | | } |
259 | | |
260 | | private: |
261 | | const T& t_; |
262 | | }; |
263 | | |
264 | | template <class T> |
265 | | auto AsSharedMessage(const T& t) { |
266 | | return AsSharedMessageHelper<T>(t); |
267 | | } |
268 | | |
269 | | template <class T, class S> |
270 | | std::shared_ptr<T> SharedField(std::shared_ptr<S> ptr, T* field) { |
271 | | return std::shared_ptr<T>(std::move(ptr), field); |
272 | | } |
273 | | |
274 | | void AppendFieldTitle(const char* name, const char* suffix, bool* first, std::string* out); |
275 | | |
276 | | void SetupLimit(google::protobuf::io::CodedInputStream* in); |
277 | | |
278 | | } // namespace rpc |
279 | | } // namespace yb |
280 | | |
281 | | #endif // YB_RPC_LIGHTWEIGHT_MESSAGE_H |