[LOG] fix ordering of overall logs including kernel
BZ: 11070
To be able to flush the kernel logs into logcat buffer
and having the correct timestamp of any logs, a new
console logk0 is created to redirect the kernel logs into
a new logcat buffer named kernel. This implementation
also provides also the ability to have multiple instance
of logcat -b kernel
The new kernel log buffer fixes the drawback of logcat -k.
which are:
1/ The timestamp of kernel logs are added when these
logs are flushed into the file system (for example) and
not when the kernel log is created leading to have logs
in an incorrect order compared to the other OS logs
2/ If there are multiple instances of logcat -k, some
instances do not have the complete kernel logs since each
reading operation of /proc/kmsg changes the dmesg pointer
For legacy usage of logcat, logcat -k still reads /proc/kmsg
To benefit of the new buffer, use logcat -b kernel
This patch provides also some changes to optimize logs sent
to PTI (Parallel Trace Interface) without buffering.
Any log (whatever the buffer) is directly sent from the driver.
Change-Id: I80a79c0c1a4519ca5c78b9a960f24ce81f1f919b
Signed-off-by: Christophe Guerard <christophe.guerard@intel.com>
Reviewed-on: http://android.intel.com:8080/29147
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>