Home
last modified time | relevance | path

Searched refs:logger_list (Results 1 – 21 of 21) sorted by relevance

/system/logging/liblog/
Dlogger_read.cpp40 static struct logger_list* android_logger_list_alloc_internal(int mode, unsigned int tail, in android_logger_list_alloc_internal()
42 auto* logger_list = static_cast<struct logger_list*>(calloc(1, sizeof(struct logger_list))); in android_logger_list_alloc_internal() local
43 if (!logger_list) { in android_logger_list_alloc_internal()
47 logger_list->mode = mode; in android_logger_list_alloc_internal()
48 logger_list->start = start; in android_logger_list_alloc_internal()
49 logger_list->tail = tail; in android_logger_list_alloc_internal()
50 logger_list->pid = pid; in android_logger_list_alloc_internal()
52 return logger_list; in android_logger_list_alloc_internal()
55 struct logger_list* android_logger_list_alloc(int mode, unsigned int tail, pid_t pid) { in android_logger_list_alloc()
59 struct logger_list* android_logger_list_alloc_time(int mode, log_time start, pid_t pid) { in android_logger_list_alloc_time()
[all …]
Dlogd_reader.cpp232 ssize_t android_logger_get_statistics(struct logger_list* logger_list, char* buf, size_t len) { in android_logger_get_statistics() argument
233 if (logger_list->mode & ANDROID_LOG_PSTORE) { in android_logger_get_statistics()
247 if ((1 << log_id) & logger_list->log_mask) { in android_logger_get_statistics()
255 if (logger_list->pid) { in android_logger_get_statistics()
256 snprintf(cp, remaining, " pid=%u", logger_list->pid); in android_logger_get_statistics()
261 ssize_t android_logger_get_prune_list(struct logger_list* logger_list, char* buf, size_t len) { in android_logger_get_prune_list() argument
262 if (logger_list->mode & ANDROID_LOG_PSTORE) { in android_logger_get_prune_list()
270 int android_logger_set_prune_list(struct logger_list* logger_list, const char* buf, size_t len) { in android_logger_set_prune_list() argument
271 if (logger_list->mode & ANDROID_LOG_PSTORE) { in android_logger_set_prune_list()
280 static int logdOpen(struct logger_list* logger_list) { in logdOpen() argument
[all …]
Dpmsg_reader.cpp31 int PmsgRead(struct logger_list* logger_list, struct log_msg* log_msg) { in PmsgRead() argument
43 if (atomic_load(&logger_list->fd) <= 0) { in PmsgRead()
56 i = atomic_exchange(&logger_list->fd, fd); in PmsgRead()
67 fd = atomic_load(&logger_list->fd); in PmsgRead()
93 if ((logger_list->log_mask & (1 << buf.l.id)) && in PmsgRead()
94 ((!logger_list->start.tv_sec && !logger_list->start.tv_nsec) || in PmsgRead()
95 ((logger_list->start.tv_sec <= buf.l.realtime.tv_sec) && in PmsgRead()
96 ((logger_list->start.tv_sec != buf.l.realtime.tv_sec) || in PmsgRead()
97 (logger_list->start.tv_nsec <= buf.l.realtime.tv_nsec)))) && in PmsgRead()
98 (!logger_list->pid || (logger_list->pid == buf.p.pid))) { in PmsgRead()
[all …]
Dpmsg_reader.h26 int PmsgRead(struct logger_list* logger_list, struct log_msg* log_msg);
27 void PmsgClose(struct logger_list* logger_list);
Dlogd_reader.h26 int LogdRead(struct logger_list* logger_list, struct log_msg* log_msg);
27 void LogdClose(struct logger_list* logger_list);
DREADME.md69 struct logger_list *android_logger_list_alloc(int mode, unsigned int tail, pid_t pid)
70 struct logger *android_logger_open(struct logger_list *logger_list, log_id_t id)
71 … struct logger_list *android_logger_list_open(log_id_t id, int mode, unsigned int tail, pid_t pid)
72 int android_logger_list_read(struct logger_list *logger_list, struct log_msg *log_msg)
73 void android_logger_list_free(struct logger_list *logger_list)
Dlogger.h28 struct logger_list { struct
/system/logging/liblog/include_vndk/log/
Dlog_read.h97 struct logger_list;
99 ssize_t android_logger_get_statistics(struct logger_list* logger_list,
101 ssize_t android_logger_get_prune_list(struct logger_list* logger_list,
103 int android_logger_set_prune_list(struct logger_list* logger_list, const char* buf, size_t len);
111 struct logger_list* android_logger_list_alloc(int mode, unsigned int tail,
113 struct logger_list* android_logger_list_alloc_time(int mode, log_time start,
115 void android_logger_list_free(struct logger_list* logger_list);
117 int android_logger_list_read(struct logger_list* logger_list,
121 struct logger* android_logger_open(struct logger_list* logger_list, log_id_t id);
123 struct logger_list* android_logger_list_open(log_id_t id, int mode,
/system/logging/liblog/include/log/
Dlog_read.h97 struct logger_list;
99 ssize_t android_logger_get_statistics(struct logger_list* logger_list,
101 ssize_t android_logger_get_prune_list(struct logger_list* logger_list,
103 int android_logger_set_prune_list(struct logger_list* logger_list, const char* buf, size_t len);
111 struct logger_list* android_logger_list_alloc(int mode, unsigned int tail,
113 struct logger_list* android_logger_list_alloc_time(int mode, log_time start,
115 void android_logger_list_free(struct logger_list* logger_list);
117 int android_logger_list_read(struct logger_list* logger_list,
121 struct logger* android_logger_open(struct logger_list* logger_list, log_id_t id);
123 struct logger_list* android_logger_list_open(log_id_t id, int mode,
/system/logging/liblog/tests/
Dlog_wrap_test.cpp36 struct logger_list* logger_list = in read_with_wrap() local
39 ASSERT_NE(logger_list, nullptr); in read_with_wrap()
42 int ret = android_logger_list_read(logger_list, &log_msg); in read_with_wrap()
43 android_logger_list_close(logger_list); in read_with_wrap()
49 logger_list = in read_with_wrap()
51 ASSERT_NE(logger_list, nullptr); in read_with_wrap()
53 struct logger* logger = android_logger_open(logger_list, LOG_ID_MAIN); in read_with_wrap()
56 android_logger_list_read(logger_list, &log_msg); in read_with_wrap()
59 android_logger_list_close(logger_list); in read_with_wrap()
Dlog_read_test.cpp40 struct logger_list* logger_list = android_logger_list_alloc(0, 0, 0); in TEST() local
47 EXPECT_TRUE(NULL != (logger = android_logger_open(logger_list, id))); in TEST()
75 android_logger_list_close(logger_list); in TEST()
Dliblog_test.cpp69 void operator()(struct logger_list* list) { android_logger_list_close(list); } in operator ()()
85 auto logger_list = std::unique_ptr<struct logger_list, ListCloser>{ in RunLogTests()
87 ASSERT_TRUE(logger_list); in RunLogTests()
96 ASSERT_GT(android_logger_list_read(logger_list.get(), &log_msg), 0); in RunLogTests()
106 auto logger_list_non_block = std::unique_ptr<struct logger_list, ListCloser>{ in RunLogTests()
560 struct logger_list* logger_list; in TEST() local
567 ASSERT_TRUE(NULL != (logger_list = android_logger_list_open(LOG_ID_EVENTS, 0, 1000, pid))); in TEST()
588 if (android_logger_list_read(logger_list, &log_msg) <= 0) { in TEST()
632 android_logger_list_close(logger_list); in TEST()
715 struct logger_list* logger_list; in TEST() local
[all …]
Dliblog_benchmark.cpp652 struct logger_list* logger_list = android_logger_list_open(LOG_ID_EVENTS, 0, 0, pid); in BM_log_latency() local
654 if (!logger_list) { in BM_log_latency()
670 int ret = android_logger_list_read(logger_list, &log_msg); in BM_log_latency()
707 android_logger_list_free(logger_list); in BM_log_latency()
726 struct logger_list* logger_list = android_logger_list_open(LOG_ID_EVENTS, 0, 0, pid); in BM_log_delay() local
728 if (!logger_list) { in BM_log_delay()
743 int ret = android_logger_list_read(logger_list, &log_msg); in BM_log_delay()
777 android_logger_list_free(logger_list); in BM_log_delay()
/system/core/trusty/fuzz/
Dutils.cpp44 auto logger_list = android_logger_list_open(LOG_ID_KERNEL, ANDROID_LOG_NONBLOCK, 1000, 0); in PrintTrustyLog() local
45 if (logger_list == nullptr) { in PrintTrustyLog()
52 int rc = android_logger_list_read(logger_list, &log_msg); in PrintTrustyLog()
68 android_logger_list_free(logger_list); in PrintTrustyLog()
/system/core/debuggerd/libdebuggerd/test/
Dlog_fake.cpp76 extern "C" struct logger_list* android_logger_list_open(log_id_t, int, unsigned int, pid_t) { in android_logger_list_open()
81 extern "C" int android_logger_list_read(struct logger_list*, struct log_msg*) { in android_logger_list_read() argument
95 extern "C" void android_logger_list_free(struct logger_list*) { in android_logger_list_free() argument
/system/unwinding/libunwindstack/tests/
DLogFake.cpp85 extern "C" struct logger_list* android_logger_list_open(log_id_t, int, unsigned int, pid_t) { in android_logger_list_open()
90 extern "C" int android_logger_list_read(struct logger_list*, struct log_msg*) { in android_logger_list_read() argument
104 extern "C" void android_logger_list_free(struct logger_list*) { in android_logger_list_free() argument
/system/logging/logcat/
Dlogcat.cpp945 std::unique_ptr<logger_list, decltype(&android_logger_list_free)> logger_list{ in Run()
948 logger_list.reset(android_logger_list_alloc_time(mode, tail_time, pid)); in Run()
950 logger_list.reset(android_logger_list_alloc(mode, tail_lines, pid)); in Run()
963 auto logger = android_logger_open(logger_list.get(), static_cast<log_id_t>(i)); in Run()
1025 if (android_logger_set_prune_list(logger_list.get(), setPruneList, len)) { in Run()
1038 android_logger_get_prune_list(logger_list.get(), buf.data(), buf.size()); in Run()
1040 android_logger_get_statistics(logger_list.get(), buf.data(), buf.size()); in Run()
1082 int ret = android_logger_list_read(logger_list.get(), &log_msg); in Run()
/system/logging/logd/
DLogTags.cpp296 struct logger_list* logger_list = in ReadPersistEventLogTags() local
298 if (!logger_list) return; in ReadPersistEventLogTags()
300 struct logger* e = android_logger_open(logger_list, LOG_ID_EVENTS); in ReadPersistEventLogTags()
301 struct logger* s = android_logger_open(logger_list, LOG_ID_SECURITY); in ReadPersistEventLogTags()
303 android_logger_list_free(logger_list); in ReadPersistEventLogTags()
309 int ret = android_logger_list_read(logger_list, &log_msg); in ReadPersistEventLogTags()
351 android_logger_list_free(logger_list); in ReadPersistEventLogTags()
Dlogd_test.cpp888 std::unique_ptr<logger_list, decltype(&android_logger_list_free)> logger_list{ in TEST()
890 if (!logger_list) { in TEST()
893 auto logger = android_logger_open(logger_list.get(), LOG_ID_MAIN); in TEST()
/system/core/debuggerd/libdebuggerd/
Dtombstone.cpp461 logger_list* logger_list; in dump_log_file() local
467 logger_list = in dump_log_file()
470 if (!logger_list) { in dump_log_file()
477 ssize_t actual = android_logger_list_read(logger_list, &log_entry); in dump_log_file()
547 android_logger_list_free(logger_list); in dump_log_file()
Dtombstone_proto.cpp469 logger_list* logger_list = in dump_log_file() local
476 ssize_t actual = android_logger_list_read(logger_list, &log_entry); in dump_log_file()
535 android_logger_list_free(logger_list); in dump_log_file()