[PATCH 0/2 v6] printk, Add monotonic and real printk timestamps
From: Prarit Bhargava
Date: Tue Feb 23 2016 - 12:54:14 EST
This patchset adds monotonic and real printk timestamps. The first patch
changes CONFIG_PRINT_TIME from a bool to an int to allow for the additional
timestamps that are added in patch 2.
Changes from v6: Petr Mladek pointed out that the current patch
fails to indicate to userspace programs which timestamp is being used.
Additionally he pointed out that no other config option uses a mix of bool and
integers the way CONFIG_PRINTK_TIME would have done after my patch. This
results in a patch to modify CONFIG_PRINTK_TIME to switch to int (which
includes modifications to config files) and a second patch to
implement the new timestamps.
Additionally, while testing the dmesg utility I noticed a difference in
behaviour between the old CONFIG_PRINTK_TIME=n and CONFIG_PRINTK_TIME=0
(both of which disabled timestamp on the console). In the new case
the dmesg output always included 0.000000 timestamp instead of the actual time.
I have fixed this by recording (but not writing to the console) the timestamp
for 0 and 1 in printk_get_ts() so that dmesg behaves as before.
Cc: Petr Mladek <pmladek@xxxxxxxx>
Cc: John Stultz <john.stultz@xxxxxxxxxx>
Cc: Xunlei Pang <pang.xunlei@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Baolin Wang <baolin.wang@xxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Petr Mladek <pmladek@xxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
Cc: Peter Hurley <peter@xxxxxxxxxxxxxxxxxx>
Cc: Vasily Averin <vvs@xxxxxxxxxxxxx>
Cc: Joe Perches <joe@xxxxxxxxxxx>
Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx>
Prarit Bhargava (2):
lib, switch CONFIG_PRINTK_TIME to int
printk, allow different timestamps for printk.time
Documentation/kernel-parameters.txt | 6 +-
arch/arm/configs/axm55xx_defconfig | 2 +-
arch/arm/configs/bcm2835_defconfig | 2 +-
arch/arm/configs/bcm_defconfig | 2 +-
arch/arm/configs/colibri_pxa270_defconfig | 2 +-
arch/arm/configs/colibri_pxa300_defconfig | 2 +-
arch/arm/configs/dove_defconfig | 2 +-
arch/arm/configs/efm32_defconfig | 2 +-
arch/arm/configs/exynos_defconfig | 2 +-
arch/arm/configs/ezx_defconfig | 2 +-
arch/arm/configs/h5000_defconfig | 2 +-
arch/arm/configs/hisi_defconfig | 2 +-
arch/arm/configs/imote2_defconfig | 2 +-
arch/arm/configs/imx_v6_v7_defconfig | 2 +-
arch/arm/configs/keystone_defconfig | 2 +-
arch/arm/configs/lpc18xx_defconfig | 2 +-
arch/arm/configs/magician_defconfig | 2 +-
arch/arm/configs/mmp2_defconfig | 2 +-
arch/arm/configs/moxart_defconfig | 2 +-
arch/arm/configs/multi_v7_defconfig | 2 +-
arch/arm/configs/mvebu_v7_defconfig | 2 +-
arch/arm/configs/mxs_defconfig | 2 +-
arch/arm/configs/omap2plus_defconfig | 2 +-
arch/arm/configs/pxa168_defconfig | 2 +-
arch/arm/configs/pxa3xx_defconfig | 2 +-
arch/arm/configs/pxa910_defconfig | 2 +-
arch/arm/configs/pxa_defconfig | 2 +-
arch/arm/configs/qcom_defconfig | 2 +-
arch/arm/configs/raumfeld_defconfig | 2 +-
arch/arm/configs/shmobile_defconfig | 2 +-
arch/arm/configs/socfpga_defconfig | 2 +-
arch/arm/configs/stm32_defconfig | 2 +-
arch/arm/configs/sunxi_defconfig | 2 +-
arch/arm/configs/tegra_defconfig | 2 +-
arch/arm/configs/u300_defconfig | 2 +-
arch/arm/configs/u8500_defconfig | 2 +-
arch/arm/configs/vt8500_v6_v7_defconfig | 2 +-
arch/arm/configs/xcep_defconfig | 2 +-
arch/arm/configs/zx_defconfig | 2 +-
arch/arm64/configs/defconfig | 2 +-
arch/mips/configs/bcm47xx_defconfig | 2 +-
arch/mips/configs/bmips_be_defconfig | 2 +-
arch/mips/configs/bmips_stb_defconfig | 2 +-
arch/mips/configs/ci20_defconfig | 2 +-
arch/mips/configs/lemote2f_defconfig | 2 +-
arch/mips/configs/loongson3_defconfig | 2 +-
arch/mips/configs/nlm_xlp_defconfig | 2 +-
arch/mips/configs/nlm_xlr_defconfig | 2 +-
arch/mips/configs/pistachio_defconfig | 2 +-
arch/mips/configs/qi_lb60_defconfig | 2 +-
arch/mips/configs/rt305x_defconfig | 2 +-
arch/mips/configs/xway_defconfig | 2 +-
arch/parisc/configs/generic-64bit_defconfig | 2 +-
arch/powerpc/configs/40x/virtex_defconfig | 2 +-
arch/powerpc/configs/44x/virtex5_defconfig | 2 +-
arch/powerpc/configs/44x/warp_defconfig | 2 +-
arch/powerpc/configs/52xx/cm5200_defconfig | 2 +-
arch/powerpc/configs/52xx/lite5200b_defconfig | 2 +-
arch/powerpc/configs/52xx/motionpro_defconfig | 2 +-
arch/powerpc/configs/52xx/tqm5200_defconfig | 2 +-
arch/powerpc/configs/gamecube_defconfig | 2 +-
arch/powerpc/configs/mpc5200_defconfig | 2 +-
arch/powerpc/configs/pasemi_defconfig | 2 +-
arch/powerpc/configs/wii_defconfig | 2 +-
arch/s390/configs/default_defconfig | 2 +-
arch/s390/configs/gcov_defconfig | 2 +-
arch/s390/configs/performance_defconfig | 2 +-
arch/s390/configs/zfcpdump_defconfig | 2 +-
arch/sh/configs/edosk7760_defconfig | 2 +-
arch/sh/configs/sdk7786_defconfig | 2 +-
arch/sh/configs/se7722_defconfig | 2 +-
arch/sh/configs/sh7785lcr_32bit_defconfig | 2 +-
arch/sh/configs/urquell_defconfig | 2 +-
arch/sparc/configs/sparc64_defconfig | 2 +-
arch/x86/configs/i386_defconfig | 2 +-
arch/x86/configs/x86_64_defconfig | 2 +-
arch/xtensa/configs/audio_kc705_defconfig | 2 +-
arch/xtensa/configs/generic_kc705_defconfig | 2 +-
arch/xtensa/configs/nommu_kc705_defconfig | 2 +-
arch/xtensa/configs/smp_lx200_defconfig | 2 +-
include/linux/timekeeping.h | 1 +
kernel/printk/printk.c | 76 ++++++++++++++++++++--
kernel/time/timekeeping.c | 13 ++++
lib/Kconfig.debug | 8 ++-
.../selftests/rcutorture/configs/lock/CFcommon | 2 +-
.../selftests/rcutorture/configs/rcu/CFcommon | 2 +-
86 files changed, 177 insertions(+), 89 deletions(-)
--
1.8.3.1