Merge "logd: ro.config.low_ram set buffer size to 64K"
am: 236fecd923
* commit '236fecd92352217e8a3272751b44c1e5a23ad1b2':
logd: ro.config.low_ram set buffer size to 64K
This commit is contained in:
commit
6773967938
3 changed files with 9 additions and 1 deletions
|
|
@ -100,6 +100,11 @@ void LogBuffer::init() {
|
|||
unsigned long default_size = property_get_size(global_tuneable);
|
||||
if (!default_size) {
|
||||
default_size = property_get_size(global_default);
|
||||
if (!default_size) {
|
||||
default_size = property_get_bool("ro.config.low_ram", false) ?
|
||||
LOG_BUFFER_MIN_SIZE : // 64K
|
||||
LOG_BUFFER_SIZE; // 256K
|
||||
}
|
||||
}
|
||||
|
||||
log_id_for_each(i) {
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@ const char *tagToName(uint32_t tag);
|
|||
bool clientHasLogCredentials(uid_t uid, gid_t gid, pid_t pid);
|
||||
bool clientHasLogCredentials(SocketClient *cli);
|
||||
|
||||
// Furnished in main.cpp
|
||||
bool property_get_bool(const char *key, bool def);
|
||||
|
||||
static inline bool worstUidEnabledForLogid(log_id_t id) {
|
||||
return (id == LOG_ID_MAIN) || (id == LOG_ID_SYSTEM) || (id == LOG_ID_RADIO);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ static int drop_privs() {
|
|||
}
|
||||
|
||||
// Property helper
|
||||
static bool property_get_bool(const char *key, bool def) {
|
||||
bool property_get_bool(const char *key, bool def) {
|
||||
char property[PROPERTY_VALUE_MAX];
|
||||
property_get(key, property, "");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue