Lines Matching refs:element
179 LogBufferElement& element = *it; in Erase() local
180 log_id_t id = element.log_id(); in Erase()
186 int key = (id == LOG_ID_EVENTS || id == LOG_ID_SECURITY) ? element.GetTag() : element.uid(); in Erase()
197 LogBufferPidIteratorMap::iterator found = mLastWorstPidOfSystem[id].find(element.pid()); in Erase()
205 int key = (id == LOG_ID_EVENTS || id == LOG_ID_SECURITY) ? element->GetTag() : element->uid(); in Erase()
209 stats()->Erase(element.ToLogStatisticsElement()); in Erase()
211 stats()->Subtract(element.ToLogStatisticsElement()); in Erase()
241 bool coalesce(LogBufferElement* element, uint16_t dropped) { in coalesce() argument
242 uint64_t key = LogBufferElementKey(element->uid(), element->pid(), element->tid()); in coalesce()
257 void add(LogBufferElement* element) { in add() argument
258 uint64_t key = LogBufferElementKey(element->uid(), element->pid(), element->tid()); in add()
259 map[key] = element; in add()
264 void clear(LogBufferElement* element) { in clear() argument
265 uint64_t current = element->realtime().nsec() - (EXPIRE_RATELIMIT * NS_PER_SEC); in clear()
357 LogBufferElement& element = *it; in Prune() local
359 if (element.log_id() != id || element.uid() != caller_uid) { in Prune()
364 if (oldest && oldest->start() <= element.sequence()) { in Prune()
442 LogBufferElement& element = *it; in Prune() local
444 if (oldest && oldest->start() <= element.sequence()) { in Prune()
449 if (element.log_id() != id) { in Prune()
455 uint16_t dropped = element.dropped_count(); in Prune()
463 if (dropped && last.coalesce(&element, dropped)) { in Prune()
468 int key = (id == LOG_ID_EVENTS || id == LOG_ID_SECURITY) ? element.GetTag() in Prune()
469 : element.uid(); in Prune()
471 if (check_high_priority && prune_->IsHighPriority(&element)) { in Prune()
472 last.clear(&element); in Prune()
488 worst_sizes -= element.msg_len(); in Prune()
493 if (element.realtime() < (lastt->realtime() - too_old) || in Prune()
494 element.realtime() > lastt->realtime()) { in Prune()
499 last.add(&element); in Prune()
500 if (worstPid && ((!gc && element.pid() == worstPid) || in Prune()
501 mLastWorstPidOfSystem[id].find(element.pid()) == in Prune()
506 mLastWorstPidOfSystem[id][element.pid()] = it; in Prune()
516 if (key != worst || (worstPid && element.pid() != worstPid)) { in Prune()
518 last.clear(&element); in Prune()
532 uint16_t len = element.msg_len(); in Prune()
538 stats()->Drop(element.ToLogStatisticsElement()); in Prune()
539 element.SetDropped(1); in Prune()
540 if (last.coalesce(&element, 1)) { in Prune()
543 last.add(&element); in Prune()
575 LogBufferElement& element = *it; in Prune() local
577 if (element.log_id() != id) { in Prune()
582 if (oldest && oldest->start() <= element.sequence()) { in Prune()
587 if (check_low_priority && !element.dropped_count() && prune_->IsLowPriority(&element)) { in Prune()
601 LogBufferElement& element = *it; in Prune() local
603 if (element.log_id() != id) { in Prune()
608 if (oldest && oldest->start() <= element.sequence()) { in Prune()