logcat 的buff 有2种分配方式,一种是在kernel的,一种是logd, MM用的是在logd的这种的
修改logcat的buff有可以从开发者选项中设置,
也可以从logcat -G 10M 设置
root@xx:/ # logcat -g
main: ring buffer is 4Mb (839Kb consumed), max entry is 5120b, max payload is 4076b
system: ring buffer is 4Mb (2Mb consumed), max entry is 5120b, max payload is 4076b
crash: ring buffer is 4Mb (0b consumed), max entry is 5120b, max payload is 4076b
root@xx:/ # logcat -G 11M
root@xx:/ # logcat -g
main: ring buffer is 11Mb (854Kb consumed), max entry is 5120b, max payload is 4076b
system: ring buffer is 11Mb (2Mb consumed), max entry is 5120b, max payload is 4076b
crash: ring buffer is 11Mb (0b consumed), max entry is 5120b, max payload is 4076b
root@xx:/ #
system/core/liblog/Android.mk
ifneq ($(TARGET_USES_LOGD),false) liblog_sources := logd_write.c log_event_write.c else liblog_sources := logd_write_kern.c endif
修改logcat的buff有可以从开发者选项中设置,
也可以从logcat -G 10M 设置
root@xx:/ # logcat -g
main: ring buffer is 4Mb (839Kb consumed), max entry is 5120b, max payload is 4076b
system: ring buffer is 4Mb (2Mb consumed), max entry is 5120b, max payload is 4076b
crash: ring buffer is 4Mb (0b consumed), max entry is 5120b, max payload is 4076b
root@xx:/ # logcat -G 11M
root@xx:/ # logcat -g
main: ring buffer is 11Mb (854Kb consumed), max entry is 5120b, max payload is 4076b
system: ring buffer is 11Mb (2Mb consumed), max entry is 5120b, max payload is 4076b
crash: ring buffer is 11Mb (0b consumed), max entry is 5120b, max payload is 4076b
root@xx:/ #