Lines Matching refs:element

142     iterator Add(const TKey& key, const LogStatisticsElement& element) {  in Add()  argument
145 it = map.insert(std::make_pair(key, TEntry(element))).first; in Add()
147 it->second.Add(element); in Add()
162 void Subtract(const TKey& key, const LogStatisticsElement& element) { in Subtract() argument
164 if (it != map.end() && it->second.Subtract(element)) { in Subtract()
169 void Drop(const TKey& key, const LogStatisticsElement& element) { in Drop() argument
172 it->second.Drop(element); in Drop()
176 void Erase(const TKey& key, const LogStatisticsElement& element) { in Erase() argument
179 it->second.Erase(element); in Erase()
192 explicit EntryBase(const LogStatisticsElement& element) : size_(element.total_len) {} in EntryBase() argument
196 void Add(const LogStatisticsElement& element) { size_ += element.total_len; } in Add() argument
197 bool Subtract(const LogStatisticsElement& element) { in Subtract() argument
198 size_ -= element.total_len; in Subtract()
201 void Drop(const LogStatisticsElement& element) { size_ -= element.msg_len; } in Drop() argument
202 void Erase(const LogStatisticsElement& element) { size_ -= element.total_len; } in Erase() argument
231 explicit EntryBaseDropped(const LogStatisticsElement& element) in EntryBaseDropped() argument
232 : EntryBase(element), dropped_(element.dropped_count) {} in EntryBaseDropped()
236 void Add(const LogStatisticsElement& element) { in Add() argument
237 dropped_ += element.dropped_count; in Add()
238 EntryBase::Add(element); in Add()
240 bool Subtract(const LogStatisticsElement& element) { in Subtract() argument
241 dropped_ -= element.dropped_count; in Subtract()
242 return EntryBase::Subtract(element) && dropped_ == 0; in Subtract()
244 void Drop(const LogStatisticsElement& element) { in Drop() argument
246 EntryBase::Drop(element); in Drop()
255 explicit UidEntry(const LogStatisticsElement& element) in UidEntry() argument
256 : EntryBaseDropped(element), pid_(element.pid) {} in UidEntry()
260 void Add(const LogStatisticsElement& element) { in Add() argument
261 if (pid_ != element.pid) { in Add()
264 EntryBaseDropped::Add(element); in Add()
284 explicit PidEntry(const LogStatisticsElement& element) in PidEntry() argument
285 : EntryBaseDropped(element), uid_(element.uid), name_(android::pidToName(element.pid)) {} in PidEntry()
286 PidEntry(const PidEntry& element) in PidEntry() argument
287 : EntryBaseDropped(element), in PidEntry()
288 uid_(element.uid_), in PidEntry()
289 name_(element.name_ ? strdup(element.name_) : nullptr) {} in PidEntry()
305 void Add(const LogStatisticsElement& element) { in Add() argument
306 uid_t incoming_uid = element.uid; in Add()
310 name_ = android::pidToName(element.pid); in Add()
312 Add(element.pid); in Add()
314 EntryBaseDropped::Add(element); in Add()
332 explicit TidEntry(const LogStatisticsElement& element) in TidEntry() argument
333 : EntryBaseDropped(element), in TidEntry()
334 pid_(element.pid), in TidEntry()
335 uid_(element.uid), in TidEntry()
336 name_(android::tidToName(element.tid)) {} in TidEntry()
337 TidEntry(const TidEntry& element) in TidEntry() argument
338 : EntryBaseDropped(element), in TidEntry()
339 pid_(element.pid_), in TidEntry()
340 uid_(element.uid_), in TidEntry()
341 name_(element.name_ ? strdup(element.name_) : nullptr) {} in TidEntry()
358 void Add(const LogStatisticsElement& element) { in Add() argument
359 uid_t incoming_uid = element.uid; in Add()
360 pid_t incoming_pid = element.pid; in Add()
365 name_ = android::tidToName(element.tid); in Add()
367 Add(element.tid); in Add()
369 EntryBaseDropped::Add(element); in Add()
383 explicit TagEntry(const LogStatisticsElement& element) in TagEntry() argument
384 : EntryBaseDropped(element), tag_(element.tag), pid_(element.pid), uid_(element.uid) {} in TagEntry()
391 void Add(const LogStatisticsElement& element) { in Add() argument
392 if (uid_ != element.uid) { in Add()
395 if (pid_ != element.pid) { in Add()
398 EntryBaseDropped::Add(element); in Add()
412 explicit TagNameEntry(const LogStatisticsElement& element) in TagNameEntry() argument
413 : EntryBase(element), tid_(element.tid), pid_(element.pid), uid_(element.uid) {} in TagNameEntry()
419 void Add(const LogStatisticsElement& element) { in Add() argument
420 if (uid_ != element.uid) { in Add()
423 if (pid_ != element.pid) { in Add()
426 if (tid_ != element.tid) { in Add()
429 EntryBase::Add(element); in Add()
535 void Erase(LogStatisticsElement element) EXCLUDES(lock_);