/system/core/logd/ |
D | SerializedFlushToState.cpp | 39 void SerializedFlushToState::CreateLogPosition(log_id_t log_id) { in CreateLogPosition() argument 40 CHECK(!logs_[log_id].empty()); in CreateLogPosition() 42 auto it = logs_[log_id].begin(); in CreateLogPosition() 43 while (it != logs_[log_id].end() && start() > it->highest_sequence_number()) { in CreateLogPosition() 46 if (it == logs_[log_id].end()) { in CreateLogPosition() 63 log_positions_[log_id].emplace(log_position); in CreateLogPosition() 66 void SerializedFlushToState::AddMinHeapEntry(log_id_t log_id) { in AddMinHeapEntry() argument 67 auto& buffer_it = log_positions_[log_id]->buffer_it; in AddMinHeapEntry() 68 auto read_offset = log_positions_[log_id]->read_offset; in AddMinHeapEntry() 73 min_heap_.emplace(log_id, entry); in AddMinHeapEntry() [all …]
|
D | SerializedLogBuffer.cpp | 49 bool SerializedLogBuffer::ShouldLog(log_id_t log_id, const char* msg, uint16_t len) { in ShouldLog() argument 50 if (log_id == LOG_ID_SECURITY) { in ShouldLog() 57 if (IsBinary(log_id)) { in ShouldLog() 71 int SerializedLogBuffer::Log(log_id_t log_id, log_time realtime, uid_t uid, pid_t pid, pid_t tid, in Log() argument 73 if (log_id >= LOG_ID_MAX || len == 0) { in Log() 77 if (!ShouldLog(log_id, msg, len)) { in Log() 78 stats_->AddTotal(log_id, len); in Log() 86 if (logs_[log_id].empty()) { in Log() 87 logs_[log_id].push_back(SerializedLogChunk(max_size_[log_id] / 4)); in Log() 91 if (!logs_[log_id].back().CanLog(total_len)) { in Log() [all …]
|
D | SimpleLogBuffer.cpp | 44 std::list<LogBufferElement>::iterator SimpleLogBuffer::GetOldest(log_id_t log_id) { in GetOldest() argument 46 if (oldest_[log_id]) { in GetOldest() 47 it = *oldest_[log_id]; in GetOldest() 49 while (it != logs().end() && it->log_id() != log_id) { in GetOldest() 53 oldest_[log_id] = it; in GetOldest() 58 bool SimpleLogBuffer::ShouldLog(log_id_t log_id, const char* msg, uint16_t len) { in ShouldLog() argument 59 if (log_id == LOG_ID_SECURITY) { in ShouldLog() 66 if (IsBinary(log_id)) { in ShouldLog() 80 int SimpleLogBuffer::Log(log_id_t log_id, log_time realtime, uid_t uid, pid_t pid, pid_t tid, in Log() argument 82 if (log_id >= LOG_ID_MAX) { in Log() [all …]
|
D | SerializedFlushToState.h | 33 MinHeapElement(log_id_t log_id, const SerializedLogEntry* entry) in MinHeapElement() 34 : log_id(log_id), entry(entry) {} in MinHeapElement() 35 log_id_t log_id; member 75 void Prune(log_id_t log_id, const std::list<SerializedLogChunk>::iterator& buffer_it); 81 void AddMinHeapEntry(log_id_t log_id); 85 void CreateLogPosition(log_id_t log_id);
|
D | ChattyLogBuffer.cpp | 69 if (elem.log_id() == LOG_ID_EVENTS && lenl == sizeof(android_log_event_int_t) && in Identical() 77 if (IsBinary(last.log_id()) && in Identical() 104 if (elem.log_id() == LOG_ID_SECURITY) { in LogInternal() 108 int log_id = elem.log_id(); in LogInternal() local 111 if (!last_logged_elements_[log_id]) { in LogInternal() 112 last_logged_elements_[log_id].emplace(elem); in LogInternal() 117 LogBufferElement& current_last = *last_logged_elements_[log_id]; in LogInternal() 121 if (duplicate_elements_[log_id]) { in LogInternal() 123 if (duplicate_elements_[log_id]->dropped_count() > 0) { in LogInternal() 124 SimpleLogBuffer::LogInternal(std::move(*duplicate_elements_[log_id])); in LogInternal() [all …]
|
D | SerializedLogBuffer.h | 42 int Log(log_id_t log_id, log_time realtime, uid_t uid, pid_t pid, pid_t tid, const char* msg, 46 const std::function<FilterResult(log_id_t log_id, pid_t pid, uint64_t sequence, 56 bool ShouldLog(log_id_t log_id, const char* msg, uint16_t len); 57 void MaybePrune(log_id_t log_id) REQUIRES(lock_); 58 bool Prune(log_id_t log_id, size_t bytes_to_free, uid_t uid) REQUIRES(lock_); 61 void NotifyReadersOfPrune(log_id_t log_id, const std::list<SerializedLogChunk>::iterator& chunk) 63 void RemoveChunkFromStats(log_id_t log_id, SerializedLogChunk& chunk);
|
D | RecordingLogBuffer.cpp | 26 void RecordingLogBuffer::RecordLogMessage(log_id_t log_id, log_time realtime, uid_t uid, pid_t pid, in RecordLogMessage() argument 39 .log_id = static_cast<uint8_t>(log_id), in RecordLogMessage() 58 int RecordingLogBuffer::Log(log_id_t log_id, log_time realtime, uid_t uid, pid_t pid, pid_t tid, in Log() argument 60 RecordLogMessage(log_id, realtime, uid, pid, tid, msg, len); in Log() 61 return SimpleLogBuffer::Log(log_id, realtime, uid, pid, tid, msg, len); in Log()
|
D | LogStatistics.cpp | 43 if (IsBinary(element.log_id)) { in TagNameKey() 118 void LogStatistics::AddTotal(log_id_t log_id, uint16_t size) { in AddTotal() argument 121 mSizesTotal[log_id] += size; in AddTotal() 123 ++mElementsTotal[log_id]; in AddTotal() 133 log_id_t log_id = element.log_id; in Add() local 135 mSizes[log_id] += size; in Add() 136 ++mElements[log_id]; in Add() 144 ++mDroppedElements[log_id]; in Add() 146 mSizesTotal[log_id] += size; in Add() 148 ++mElementsTotal[log_id]; in Add() [all …]
|
D | SerializedLogEntry.h | 51 LogStatisticsElement ToLogStatisticsElement(log_id_t log_id) const { in ToLogStatisticsElement() argument 56 .tag = IsBinary(log_id) ? MsgToTag(msg(), msg_len()) : 0, in ToLogStatisticsElement() 61 .log_id = log_id, in ToLogStatisticsElement() 66 bool Flush(LogWriter* writer, log_id_t log_id) const { in Flush() argument 70 entry.lid = log_id; in Flush()
|
D | LogReaderThread.cpp | 72 [this](log_id_t log_id, pid_t pid, uint64_t sequence, log_time realtime) { in ThreadFunction() argument 73 return FilterFirstPass(log_id, pid, sequence, realtime); in ThreadFunction() 78 [this](log_id_t log_id, pid_t pid, uint64_t sequence, log_time realtime) { in ThreadFunction() argument 79 return FilterSecondPass(log_id, pid, sequence, realtime); in ThreadFunction() 131 FilterResult LogReaderThread::FilterSecondPass(log_id_t log_id, pid_t pid, uint64_t, in FilterSecondPass() argument 135 if (skip_ahead_[log_id]) { in FilterSecondPass() 136 skip_ahead_[log_id]--; in FilterSecondPass() 172 if (!skip_ahead_[log_id]) { in FilterSecondPass()
|
D | LogUtils.h | 63 static inline bool IsBinary(log_id_t log_id) { in IsBinary() argument 64 return log_id == LOG_ID_EVENTS || log_id == LOG_ID_STATS || log_id == LOG_ID_SECURITY; in IsBinary()
|
D | SerializedFlushToStateTest.cpp | 42 for (const auto& [log_id, sequences] : sequence_numbers_per_buffer_) { in TestReport() 44 return log_id; in TestReport() 55 int log_id = sequence_to_log_id(sequence); in TestReport() local 56 missing_sequences[log_id].emplace_back(sequence); in TestReport() 64 int log_id = sequence_to_log_id(sequence); in TestReport() local 65 extra_sequences[log_id].emplace_back(sequence); in TestReport() 69 for (const auto& [log_id, sequences] : missing_sequences) { in TestReport() 71 StringPrintf("Log id %d missing %zu sequences", log_id, sequences.size())); in TestReport() 74 for (const auto& [log_id, sequences] : extra_sequences) { in TestReport() 76 StringPrintf("Log id %d has extra %zu sequences", log_id, sequences.size())); in TestReport()
|
D | SimpleLogBuffer.h | 36 int Log(log_id_t log_id, log_time realtime, uid_t uid, pid_t pid, pid_t tid, const char* msg, 40 const std::function<FilterResult(log_id_t log_id, pid_t pid, uint64_t sequence, 55 std::list<LogBufferElement>::iterator GetOldest(log_id_t log_id) REQUIRES(lock_); 69 bool ShouldLog(log_id_t log_id, const char* msg, uint16_t len);
|
D | LogBufferElement.cpp | 33 LogBufferElement::LogBufferElement(log_id_t log_id, log_time realtime, uid_t uid, pid_t pid, in LogBufferElement() argument 41 log_id_(log_id), in LogBufferElement() 89 if (!IsBinary(log_id())) { in GetTag() 115 .log_id = log_id(), in ToLogStatisticsElement() 235 if (IsBinary(log_id())) { in PopulateDroppedMessage() 249 if (IsBinary(log_id())) { in PopulateDroppedMessage()
|
D | RecordingLogBuffer.h | 34 int Log(log_id_t log_id, log_time realtime, uid_t uid, pid_t pid, pid_t tid, const char* msg, 38 void RecordLogMessage(log_id_t log_id, log_time realtime, uid_t uid, pid_t pid, pid_t tid,
|
D | LogBuffer.h | 61 virtual int Log(log_id_t log_id, log_time realtime, uid_t uid, pid_t pid, pid_t tid, 67 const std::function<FilterResult(log_id_t log_id, pid_t pid, uint64_t sequence,
|
D | LogBufferElement.h | 37 LogBufferElement(log_id_t log_id, log_time realtime, uid_t uid, pid_t pid, pid_t tid, 50 log_id_t log_id() const { return static_cast<log_id_t>(log_id_); } in log_id() function
|
D | LogReaderThread.h | 68 FilterResult FilterFirstPass(log_id_t log_id, pid_t pid, uint64_t sequence, log_time realtime); 69 FilterResult FilterSecondPass(log_id_t log_id, pid_t pid, uint64_t sequence, log_time realtime);
|
/system/core/liblog/ |
D | logd_reader.cpp | 144 uint32_t log_id = android_logger_get_id(logger); in android_logger_clear() local 146 snprintf(buf, sizeof(buf), "clear %" PRIu32, log_id); in android_logger_clear() 157 uint32_t log_id = android_logger_get_id(logger); in android_logger_get_log_size() local 159 snprintf(buf, sizeof(buf), "getLogSize %" PRIu32, log_id); in android_logger_get_log_size() 178 uint32_t log_id = android_logger_get_id(logger); in android_logger_set_log_size() local 180 snprintf(buf, sizeof(buf), "setLogSize %" PRIu32 " %lu", log_id, size); in android_logger_set_log_size() 194 uint32_t log_id = android_logger_get_id(logger); in android_logger_get_log_readable_size() local 196 snprintf(buf, sizeof(buf), "getLogSizeUsed %" PRIu32, log_id); in android_logger_get_log_readable_size() 228 for (size_t log_id = 0; log_id < LOG_ID_MAX; ++log_id) { in android_logger_get_statistics() local 229 if ((1 << log_id) & logger_list->log_mask) { in android_logger_get_statistics() [all …]
|
D | logger_name.cpp | 36 const char* android_log_id_to_name(log_id_t log_id) { in android_log_id_to_name() argument 37 if (log_id >= LOG_ID_MAX) { in android_log_id_to_name() 38 log_id = LOG_ID_MAIN; in android_log_id_to_name() 40 return LOG_NAME[log_id]; in android_log_id_to_name()
|
D | logger_write.cpp | 187 static int write_to_log(log_id_t log_id, struct iovec* vec, size_t nr) { in write_to_log() argument 191 if (log_id == LOG_ID_KERNEL) { in write_to_log() 197 if (log_id == LOG_ID_SECURITY) { in write_to_log() 210 } else if (log_id == LOG_ID_EVENTS || log_id == LOG_ID_STATS) { in write_to_log() 216 ret = LogdWrite(log_id, &ts, vec, nr); in write_to_log() 217 PmsgWrite(log_id, &ts, vec, nr); in write_to_log()
|
/system/core/logd/fuzz/ |
D | log_buffer_log_fuzzer.cpp | 49 log_id_t log_id; member 90 log_id_t log_id = static_cast<log_id_t>(unsigned(logInput->log_id) % (LOG_ID_MAX + 1)); in write_log_messages() local 91 log_buffer->Log(log_id, logInput->realtime, logInput->uid, logInput->pid, logInput->tid, msg, in write_log_messages()
|
/system/libbase/ |
D | logging_splitters.h | 48 static void SplitByLogdChunks(LogId log_id, LogSeverity severity, const char* tag, const char* file, in SplitByLogdChunks() argument 74 log_function(log_id, severity, tag, logd_chunk); in SplitByLogdChunks() 126 log_function(log_id, severity, tag, logd_chunk); in SplitByLogdChunks() 128 log_function(log_id, severity, tag, msg); in SplitByLogdChunks()
|
/system/core/liblog/include/log/ |
D | log_id.h | 29 const char* android_log_id_to_name(log_id_t log_id);
|
/system/core/liblog/include_vndk/log/ |
D | log_id.h | 29 const char* android_log_id_to_name(log_id_t log_id);
|