platform_system_core/logcat
Tom Cherry 06e111a148 Add android_logger_get_log_consumed_size() and report it in logcat
There is an existing API, android_logger_get_log_readable_size() which
historically reported the consumed amount of data for the chatty log
buffer, since consumed and readable are synonymous with that buffer
type.

With log compression, readable and consumed are not synonymous, since
the readable log size is the uncompressed log size whereas the
consumed log size is the compressed log size.

This change adds android_logger_get_log_consumed_size() which returns
the consumed log size and makes android_logger_get_log_readable_size()
return the readable log size.  Note that these values are identical if
compression is not used.

It adds both statistics to logcat:

    main: ring buffer is 1 MiB (429 KiB consumed, 817 KiB readable)
    radio: ring buffer is 1 MiB (339 KiB consumed, 715 KiB readable)
    ...

Test: logcat prints the right values with compression and chatty
Change-Id: I8b9688a987736204e2e6026e8635fbd1a5e68bb7
2020-08-05 13:43:31 -07:00
..
tests logging: Use more inclusive language. 2020-06-16 14:31:31 -07:00
Android.bp logcat: fix logcatd / logpersist 2019-10-31 06:43:47 -07:00
event.logtags Logtags for input flinger 2020-06-05 12:37:43 -07:00
logcat.cpp Add android_logger_get_log_consumed_size() and report it in logcat 2020-08-05 13:43:31 -07:00
logcatd Relax permissions on /data/misc/logd 2020-01-21 18:39:19 -08:00
logcatd.rc Relax permissions on /data/misc/logd 2020-01-21 18:39:19 -08:00
logpersist logcat: fix logpersist.stop and logpersist.clear 2019-10-31 06:43:47 -07:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
NOTICE auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
OWNERS Add OWNERS. 2017-12-07 13:30:03 -08:00