Home
last modified time | relevance | path

Searched refs:log_id (Results 1 – 25 of 39) sorted by relevance

12

/system/core/logd/
DSerializedFlushToState.cpp39 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 …]
DSerializedLogBuffer.cpp49 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 …]
DSimpleLogBuffer.cpp44 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 …]
DSerializedFlushToState.h33 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);
DChattyLogBuffer.cpp69 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 …]
DSerializedLogBuffer.h42 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);
DRecordingLogBuffer.cpp26 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()
DLogStatistics.cpp43 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 …]
DSerializedLogEntry.h51 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()
DLogReaderThread.cpp72 [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()
DLogUtils.h63 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()
DSerializedFlushToStateTest.cpp42 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()
DSimpleLogBuffer.h36 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);
DLogBufferElement.cpp33 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()
DRecordingLogBuffer.h34 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,
DLogBuffer.h61 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,
DLogBufferElement.h37 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
DLogReaderThread.h68 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/
Dlogd_reader.cpp144 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 …]
Dlogger_name.cpp36 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()
Dlogger_write.cpp187 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/
Dlog_buffer_log_fuzzer.cpp49 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/
Dlogging_splitters.h48 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/
Dlog_id.h29 const char* android_log_id_to_name(log_id_t log_id);
/system/core/liblog/include_vndk/log/
Dlog_id.h29 const char* android_log_id_to_name(log_id_t log_id);

12