system/corennnnn
修訂 | 1723f3fcd1073896cc8d941a1e3b7d48f9a31af5 (tree) |
---|---|
時間 | 2016-09-21 01:19:41 |
作者 | Mark Salyzyn <salyzyn@goog...> |
Commiter | Mark Salyzyn |
Revert "Restrict pmsg use to eng builds."
This reverts commit f894b96a9211dcefb83b175720b53a2e49b8e463.
Kernel binaries have incorporated the performance-enhanced pmsg driver
that has removed the bounce buffer.
Bug: 31057326
Bug: 30375418
Change-Id: Id6cec3ac144f57e8e5465aa48bbdc829cf29e283
@@ -31,8 +31,6 @@ | ||
31 | 31 | #include <private/android_filesystem_config.h> |
32 | 32 | #include <private/android_logger.h> |
33 | 33 | |
34 | -#include <sys/system_properties.h> | |
35 | - | |
36 | 34 | #include "config_write.h" |
37 | 35 | #include "log_portability.h" |
38 | 36 | #include "logger.h" |
@@ -53,25 +51,8 @@ LIBLOG_HIDDEN struct android_log_transport_write pmsgLoggerWrite = { | ||
53 | 51 | .write = pmsgWrite, |
54 | 52 | }; |
55 | 53 | |
56 | -static bool pmsgShouldUse = false; | |
57 | - | |
58 | -// Only use pmsg on eng builds | |
59 | -static bool pmsgIsEng() { | |
60 | - char buf[PROP_VALUE_MAX]; | |
61 | - | |
62 | - if (__system_property_get("ro.build.type", buf) == 0) { | |
63 | - return false; | |
64 | - } | |
65 | - | |
66 | - if (!strncmp(buf, "eng", sizeof("eng"))) { | |
67 | - return true; | |
68 | - } | |
69 | - return false; | |
70 | -} | |
71 | - | |
72 | 54 | static int pmsgOpen() |
73 | 55 | { |
74 | - pmsgShouldUse = pmsgIsEng(); | |
75 | 56 | if (pmsgLoggerWrite.context.fd < 0) { |
76 | 57 | pmsgLoggerWrite.context.fd = TEMP_FAILURE_RETRY(open("/dev/pmsg0", O_WRONLY | O_CLOEXEC)); |
77 | 58 | } |
@@ -94,7 +75,7 @@ static int pmsgAvailable(log_id_t logId) | ||
94 | 75 | } |
95 | 76 | if ((logId != LOG_ID_SECURITY) && |
96 | 77 | (logId != LOG_ID_EVENTS) && |
97 | - (!pmsgShouldUse || !__android_log_is_debuggable())) { | |
78 | + !__android_log_is_debuggable()) { | |
98 | 79 | return -EINVAL; |
99 | 80 | } |
100 | 81 | if (pmsgLoggerWrite.context.fd < 0) { |
@@ -124,7 +105,7 @@ static int pmsgWrite(log_id_t logId, struct timespec *ts, | ||
124 | 105 | size_t i, payloadSize; |
125 | 106 | ssize_t ret; |
126 | 107 | |
127 | - if ((logId == LOG_ID_EVENTS) && (!pmsgShouldUse || !__android_log_is_debuggable())) { | |
108 | + if ((logId == LOG_ID_EVENTS) && !__android_log_is_debuggable()) { | |
128 | 109 | if (vec[0].iov_len < 4) { |
129 | 110 | return -EINVAL; |
130 | 111 | } |