• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/corennnnn


Commit MetaInfo

修訂1723f3fcd1073896cc8d941a1e3b7d48f9a31af5 (tree)
時間2016-09-21 01:19:41
作者Mark Salyzyn <salyzyn@goog...>
CommiterMark Salyzyn

Log Message

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

Change Summary

差異

--- a/liblog/pmsg_writer.c
+++ b/liblog/pmsg_writer.c
@@ -31,8 +31,6 @@
3131 #include <private/android_filesystem_config.h>
3232 #include <private/android_logger.h>
3333
34-#include <sys/system_properties.h>
35-
3634 #include "config_write.h"
3735 #include "log_portability.h"
3836 #include "logger.h"
@@ -53,25 +51,8 @@ LIBLOG_HIDDEN struct android_log_transport_write pmsgLoggerWrite = {
5351 .write = pmsgWrite,
5452 };
5553
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-
7254 static int pmsgOpen()
7355 {
74- pmsgShouldUse = pmsgIsEng();
7556 if (pmsgLoggerWrite.context.fd < 0) {
7657 pmsgLoggerWrite.context.fd = TEMP_FAILURE_RETRY(open("/dev/pmsg0", O_WRONLY | O_CLOEXEC));
7758 }
@@ -94,7 +75,7 @@ static int pmsgAvailable(log_id_t logId)
9475 }
9576 if ((logId != LOG_ID_SECURITY) &&
9677 (logId != LOG_ID_EVENTS) &&
97- (!pmsgShouldUse || !__android_log_is_debuggable())) {
78+ !__android_log_is_debuggable()) {
9879 return -EINVAL;
9980 }
10081 if (pmsgLoggerWrite.context.fd < 0) {
@@ -124,7 +105,7 @@ static int pmsgWrite(log_id_t logId, struct timespec *ts,
124105 size_t i, payloadSize;
125106 ssize_t ret;
126107
127- if ((logId == LOG_ID_EVENTS) && (!pmsgShouldUse || !__android_log_is_debuggable())) {
108+ if ((logId == LOG_ID_EVENTS) && !__android_log_is_debuggable()) {
128109 if (vec[0].iov_len < 4) {
129110 return -EINVAL;
130111 }