[LOG] fix ordering of overall logs including kernel
authorChristophe Guerard <christophe.guerard@intel.com>
Mon, 19 Dec 2011 16:37:36 +0000 (17:37 +0100)
committerbuildbot <buildbot@intel.com>
Fri, 27 Jan 2012 12:14:19 +0000 (04:14 -0800)
commit2d93c57b5046e26789155c35f2713293914946be
tree715edede10af401ac8877ff667942950e04e3e91
parentd7c68dede3e66d7d90ed8ab017fd1dcdbdf9943d
[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>
arch/x86/configs/i386_mfld_defconfig
drivers/misc/pti.c
drivers/staging/android/Kconfig
drivers/staging/android/Makefile
drivers/staging/android/logger.c
drivers/staging/android/logger.h
drivers/staging/android/logger_pti.c [new file with mode: 0644]
drivers/staging/android/logger_pti.h [new file with mode: 0644]
include/linux/pti.h