Lines Matching refs:element

42 static std::string TagNameKey(const LogStatisticsElement& element) {  in TagNameKey()  argument
43 if (IsBinary(element.log_id)) { in TagNameKey()
44 uint32_t tag = element.tag; in TagNameKey()
53 const char* msg = element.msg; in TagNameKey()
58 uint16_t len = element.msg_len; in TagNameKey()
126 void LogStatistics::Add(LogStatisticsElement element) { in Add() argument
130 element.total_len = element.msg_len; in Add()
133 log_id_t log_id = element.log_id; in Add()
134 uint16_t size = element.total_len; in Add()
143 if (element.dropped_count) { in Add()
151 log_time stamp(element.realtime); in Add()
176 uidTable[log_id].Add(element.uid, element); in Add()
177 if (element.uid == AID_SYSTEM) { in Add()
178 pidSystemTable[log_id].Add(element.pid, element); in Add()
185 pidTable.Add(element.pid, element); in Add()
186 tidTable.Add(element.tid, element); in Add()
188 uint32_t tag = element.tag; in Add()
191 securityTagTable.Add(tag, element); in Add()
193 tagTable.Add(tag, element); in Add()
197 if (!element.dropped_count) { in Add()
198 tagNameTable.Add(TagNameKey(element), element); in Add()
202 void LogStatistics::Subtract(LogStatisticsElement element) { in Subtract() argument
206 element.total_len = element.msg_len; in Subtract()
209 log_id_t log_id = element.log_id; in Subtract()
210 uint16_t size = element.total_len; in Subtract()
213 if (element.dropped_count) { in Subtract()
217 if (mOldest[log_id] < element.realtime) { in Subtract()
218 mOldest[log_id] = element.realtime; in Subtract()
225 uidTable[log_id].Subtract(element.uid, element); in Subtract()
226 if (element.uid == AID_SYSTEM) { in Subtract()
227 pidSystemTable[log_id].Subtract(element.pid, element); in Subtract()
234 pidTable.Subtract(element.pid, element); in Subtract()
235 tidTable.Subtract(element.tid, element); in Subtract()
237 uint32_t tag = element.tag; in Subtract()
240 securityTagTable.Subtract(tag, element); in Subtract()
242 tagTable.Subtract(tag, element); in Subtract()
246 if (!element.dropped_count) { in Subtract()
247 tagNameTable.Subtract(TagNameKey(element), element); in Subtract()
253 void LogStatistics::Drop(LogStatisticsElement element) { in Drop() argument
254 CHECK_EQ(element.dropped_count, 0U); in Drop()
257 log_id_t log_id = element.log_id; in Drop()
258 uint16_t size = element.msg_len; in Drop()
262 if (mNewestDropped[log_id] < element.realtime) { in Drop()
263 mNewestDropped[log_id] = element.realtime; in Drop()
266 uidTable[log_id].Drop(element.uid, element); in Drop()
267 if (element.uid == AID_SYSTEM) { in Drop()
268 pidSystemTable[log_id].Drop(element.pid, element); in Drop()
275 pidTable.Drop(element.pid, element); in Drop()
276 tidTable.Drop(element.tid, element); in Drop()
278 uint32_t tag = element.tag; in Drop()
281 securityTagTable.Drop(tag, element); in Drop()
283 tagTable.Drop(tag, element); in Drop()
287 tagNameTable.Subtract(TagNameKey(element), element); in Drop()
290 void LogStatistics::Erase(LogStatisticsElement element) { in Erase() argument
291 CHECK_GT(element.dropped_count, 0U); in Erase()
292 CHECK_EQ(element.msg_len, 0U); in Erase()
297 element.total_len = 0; in Erase()
300 log_id_t log_id = element.log_id; in Erase()
303 mSizes[log_id] -= element.total_len; in Erase()
305 uidTable[log_id].Erase(element.uid, element); in Erase()
306 if (element.uid == AID_SYSTEM) { in Erase()
307 pidSystemTable[log_id].Erase(element.pid, element); in Erase()
314 pidTable.Erase(element.pid, element); in Erase()
315 tidTable.Erase(element.tid, element); in Erase()
317 uint32_t tag = element.tag; in Erase()
320 securityTagTable.Erase(tag, element); in Erase()
322 tagTable.Erase(tag, element); in Erase()