summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2015-02-12 17:14:26 -0600
committerMark Salyzyn2015-03-04 15:21:41 -0600
commitd45d36e011bf2a42bffac07424d3990022287f3c (patch)
tree45ca563150afa1e1d44b6fed19d164ab67db9a9f /liblog/Android.mk
parent29eb57066c37bf667a56bb4a7143b50664d5eb44 (diff)
downloadplatform-system-core-d45d36e011bf2a42bffac07424d3990022287f3c.tar.gz
platform-system-core-d45d36e011bf2a42bffac07424d3990022287f3c.tar.xz
platform-system-core-d45d36e011bf2a42bffac07424d3990022287f3c.zip
liblog: Instrument logging of logd write drops
- If logger system is prostrated, send an event message with the liblog tag from the associated UID and PID with a count of dropped messages once logging is resumed. - Added to the README a description of the error return values. - Describe in the README the appropriate mitigations for dropped messages. - If the caller sees this message, then /proc/sys/net/unix/max_dgram_qlen is likely too small Change-Id: Iaf387b9e5e1b6aa93bebc7481f9e8353732e3229
Diffstat (limited to 'liblog/Android.mk')
-rw-r--r--liblog/Android.mk10
1 files changed, 6 insertions, 4 deletions
diff --git a/liblog/Android.mk b/liblog/Android.mk
index 5756c54d5..9353546dc 100644
--- a/liblog/Android.mk
+++ b/liblog/Android.mk
@@ -16,6 +16,8 @@
16LOCAL_PATH := $(my-dir) 16LOCAL_PATH := $(my-dir)
17include $(CLEAR_VARS) 17include $(CLEAR_VARS)
18 18
19liblog_cflags := $(shell sed -n 's/^\([0-9]*\)[ \t]*liblog[ \t].*/-DLIBLOG_LOG_TAG=\1/p' $(LOCAL_PATH)/event.logtags)
20
19ifneq ($(TARGET_USES_LOGD),false) 21ifneq ($(TARGET_USES_LOGD),false)
20liblog_sources := logd_write.c 22liblog_sources := logd_write.c
21else 23else
@@ -45,7 +47,7 @@ else
45 uio.c 47 uio.c
46endif 48endif
47 49
48liblog_host_sources := $(liblog_sources) fake_log_device.c 50liblog_host_sources := $(liblog_sources) fake_log_device.c event.logtags
49liblog_target_sources := $(liblog_sources) log_time.cpp log_is_loggable.c 51liblog_target_sources := $(liblog_sources) log_time.cpp log_is_loggable.c
50ifneq ($(TARGET_USES_LOGD),false) 52ifneq ($(TARGET_USES_LOGD),false)
51liblog_target_sources += log_read.c 53liblog_target_sources += log_read.c
@@ -57,7 +59,7 @@ endif
57# ======================================================== 59# ========================================================
58LOCAL_MODULE := liblog 60LOCAL_MODULE := liblog
59LOCAL_SRC_FILES := $(liblog_host_sources) 61LOCAL_SRC_FILES := $(liblog_host_sources)
60LOCAL_CFLAGS := -DFAKE_LOG_DEVICE=1 -Werror 62LOCAL_CFLAGS := -DFAKE_LOG_DEVICE=1 -Werror $(liblog_cflags)
61LOCAL_MULTILIB := both 63LOCAL_MULTILIB := both
62include $(BUILD_HOST_STATIC_LIBRARY) 64include $(BUILD_HOST_STATIC_LIBRARY)
63 65
@@ -76,13 +78,13 @@ include $(BUILD_HOST_SHARED_LIBRARY)
76include $(CLEAR_VARS) 78include $(CLEAR_VARS)
77LOCAL_MODULE := liblog 79LOCAL_MODULE := liblog
78LOCAL_SRC_FILES := $(liblog_target_sources) 80LOCAL_SRC_FILES := $(liblog_target_sources)
79LOCAL_CFLAGS := -Werror 81LOCAL_CFLAGS := -Werror $(liblog_cflags)
80include $(BUILD_STATIC_LIBRARY) 82include $(BUILD_STATIC_LIBRARY)
81 83
82include $(CLEAR_VARS) 84include $(CLEAR_VARS)
83LOCAL_MODULE := liblog 85LOCAL_MODULE := liblog
84LOCAL_WHOLE_STATIC_LIBRARIES := liblog 86LOCAL_WHOLE_STATIC_LIBRARIES := liblog
85LOCAL_CFLAGS := -Werror 87LOCAL_CFLAGS := -Werror $(liblog_cflags)
86include $(BUILD_SHARED_LIBRARY) 88include $(BUILD_SHARED_LIBRARY)
87 89
88include $(call first-makefiles-under,$(LOCAL_PATH)) 90include $(call first-makefiles-under,$(LOCAL_PATH))