summaryrefslogtreecommitdiffstats
path: root/logd/main.cpp
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-09-21 14:22:18 -0700
committerMark Salyzyn <salyzyn@google.com>2014-10-06 22:42:47 +0000
commitf5fc50958978fc039bc3207cbfcb140a277442eb (patch)
tree8dd2592320054cd415dffb24d841720f3796054d /logd/main.cpp
parente72c6e43668c8c6e1af77e2e5038557581cbf148 (diff)
downloadsystem_core-f5fc50958978fc039bc3207cbfcb140a277442eb.zip
system_core-f5fc50958978fc039bc3207cbfcb140a277442eb.tar.gz
system_core-f5fc50958978fc039bc3207cbfcb140a277442eb.tar.bz2
logd: Add control statistics enable/disable.
- ro.build.type=user turn off statistics - ro.config.low_ram=true turn off statistics - logd.statistics override Bug: 17526159 Bug: 17526187 Change-Id: I74796043ac34753c6dd10018719ebc0bcd94e00f
Diffstat (limited to 'logd/main.cpp')
-rw-r--r--logd/main.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/logd/main.cpp b/logd/main.cpp
index 1e1a718..54da7e3 100644
--- a/logd/main.cpp
+++ b/logd/main.cpp
@@ -152,6 +152,15 @@ int main() {
if (property_get_bool("logd.statistics.dgram_qlen", false)) {
logBuf->enableDgramQlenStatistics();
}
+ {
+ char property[PROPERTY_VALUE_MAX];
+ property_get("ro.build.type", property, "");
+ if (property_get_bool("logd.statistics",
+ !!strcmp(property, "user")
+ && !property_get_bool("ro.config.low_ram", false))) {
+ logBuf->enableStatistics();
+ }
+ }
// LogReader listens on /dev/socket/logdr. When a client
// connects, log entries in the LogBuffer are written to the client.