Home
last modified time | relevance | path

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

/system/core/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.cpp214 ssize_t android_logger_get_statistics(struct logger_list* logger_list, char* buf, size_t len) { in android_logger_get_statistics() argument
215 if (logger_list->mode & ANDROID_LOG_PSTORE) { in android_logger_get_statistics()
229 if ((1 << log_id) & logger_list->log_mask) { in android_logger_get_statistics()
237 if (logger_list->pid) { in android_logger_get_statistics()
238 snprintf(cp, remaining, " pid=%u", logger_list->pid); in android_logger_get_statistics()
243 ssize_t android_logger_get_prune_list(struct logger_list* logger_list, char* buf, size_t len) { in android_logger_get_prune_list() argument
244 if (logger_list->mode & ANDROID_LOG_PSTORE) { in android_logger_get_prune_list()
252 int android_logger_set_prune_list(struct logger_list* logger_list, const char* buf, size_t len) { in android_logger_set_prune_list() argument
253 if (logger_list->mode & ANDROID_LOG_PSTORE) { in android_logger_set_prune_list()
262 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/core/liblog/include/log/
Dlog_read.h90 struct logger_list;
92 ssize_t android_logger_get_statistics(struct logger_list* logger_list,
94 ssize_t android_logger_get_prune_list(struct logger_list* logger_list,
96 int android_logger_set_prune_list(struct logger_list* logger_list, const char* buf, size_t len);
104 struct logger_list* android_logger_list_alloc(int mode, unsigned int tail,
106 struct logger_list* android_logger_list_alloc_time(int mode, log_time start,
108 void android_logger_list_free(struct logger_list* logger_list);
110 int android_logger_list_read(struct logger_list* logger_list,
114 struct logger* android_logger_open(struct logger_list* logger_list, log_id_t id);
116 struct logger_list* android_logger_list_open(log_id_t id, int mode,
/system/core/liblog/include_vndk/log/
Dlog_read.h90 struct logger_list;
92 ssize_t android_logger_get_statistics(struct logger_list* logger_list,
94 ssize_t android_logger_get_prune_list(struct logger_list* logger_list,
96 int android_logger_set_prune_list(struct logger_list* logger_list, const char* buf, size_t len);
104 struct logger_list* android_logger_list_alloc(int mode, unsigned int tail,
106 struct logger_list* android_logger_list_alloc_time(int mode, log_time start,
108 void android_logger_list_free(struct logger_list* logger_list);
110 int android_logger_list_read(struct logger_list* logger_list,
114 struct logger* android_logger_open(struct logger_list* logger_list, log_id_t id);
116 struct logger_list* android_logger_list_open(log_id_t id, int mode,
/system/core/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/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/core/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/core/logcat/
Dlogcat.cpp1028 std::unique_ptr<logger_list, decltype(&android_logger_list_free)> logger_list{ in Run()
1031 logger_list.reset(android_logger_list_alloc_time(mode, tail_time, pid)); in Run()
1033 logger_list.reset(android_logger_list_alloc(mode, tail_lines, pid)); in Run()
1046 auto logger = android_logger_open(logger_list.get(), static_cast<log_id_t>(i)); in Run()
1104 if (android_logger_set_prune_list(logger_list.get(), setPruneList, len)) { in Run()
1117 android_logger_get_prune_list(logger_list.get(), buf.data(), buf.size()); in Run()
1119 android_logger_get_statistics(logger_list.get(), buf.data(), buf.size()); in Run()
1159 int ret = android_logger_list_read(logger_list.get(), &log_msg); in Run()
/system/core/debuggerd/libdebuggerd/
Dtombstone.cpp451 logger_list* logger_list; in dump_log_file() local
457 logger_list = in dump_log_file()
460 if (!logger_list) { in dump_log_file()
467 ssize_t actual = android_logger_list_read(logger_list, &log_entry); in dump_log_file()
538 android_logger_list_free(logger_list); in dump_log_file()
/system/core/logd/
DLogTags.cpp295 struct logger_list* logger_list = in ReadPersistEventLogTags() local
297 if (!logger_list) return; in ReadPersistEventLogTags()
299 struct logger* e = android_logger_open(logger_list, LOG_ID_EVENTS); in ReadPersistEventLogTags()
300 struct logger* s = android_logger_open(logger_list, LOG_ID_SECURITY); in ReadPersistEventLogTags()
302 android_logger_list_free(logger_list); in ReadPersistEventLogTags()
308 int ret = android_logger_list_read(logger_list, &log_msg); in ReadPersistEventLogTags()
350 android_logger_list_free(logger_list); in ReadPersistEventLogTags()