Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1385112 > unrolled thread

[PATCH 0/2 v7]: printk, Add monotonic and real printk timestamps

Started byPrarit Bhargava <prarit@redhat.com>
First post2016-04-22 14:10 +0200
Last post2016-04-25 18:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/2 v7]: printk, Add monotonic and real printk timestamps Prarit Bhargava <prarit@redhat.com> - 2016-04-22 14:10 +0200
    Re: [PATCH 1/2] lib, switch CONFIG_PRINTK_TIME to int Petr Mladek <pmladek@suse.com> - 2016-04-25 18:00 +0200

#1385112 — [PATCH 0/2 v7]: printk, Add monotonic and real printk timestamps

FromPrarit Bhargava <prarit@redhat.com>
Date2016-04-22 14:10 +0200
Subject[PATCH 0/2 v7]: printk, Add monotonic and real printk timestamps
Message-ID<rqI4h-1GC-3@gated-at.bofh.it>
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 causes problems
for dmesg (and potentially other utilities).  I will post the patch here

http://marc.info/?l=linux-kernel&m=146124485215811&w=2

to fix dmesg once this feature is positively reviewed.

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.7.9.3

[toc] | [next] | [standalone]


#1386612 — Re: [PATCH 1/2] lib, switch CONFIG_PRINTK_TIME to int

FromPetr Mladek <pmladek@suse.com>
Date2016-04-25 18:00 +0200
SubjectRe: [PATCH 1/2] lib, switch CONFIG_PRINTK_TIME to int
Message-ID<rrR5x-8ma-17@gated-at.bofh.it>
In reply to#1385112
On Fri 2016-04-22 08:03:08, Prarit Bhargava wrote:
> CONFIG_PRINTK_TIME is a bool and in order to add timestamp options for
> the monotonic and real time clock it must be expanded to an int.
> 
> diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig
> index 4f404a6..0250dbd 100644
> --- a/arch/x86/configs/x86_64_defconfig
> +++ b/arch/x86/configs/x86_64_defconfig
> @@ -284,7 +284,7 @@ CONFIG_NLS_CODEPAGE_437=y
>  CONFIG_NLS_ASCII=y
>  CONFIG_NLS_ISO8859_1=y
>  CONFIG_NLS_UTF8=y
> -CONFIG_PRINTK_TIME=y
> +CONFIG_PRINTK_TIME=1
>  # CONFIG_ENABLE_WARN_DEPRECATED is not set
>  CONFIG_MAGIC_SYSRQ=y
>  # CONFIG_UNUSED_SYMBOLS is not set
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index 1e9a607..774aa38 100644
[...]
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -1,7 +1,9 @@
>  menu "printk and dmesg options"
>  
>  config PRINTK_TIME
> -	bool "Show timing information on printks"
> +	int "Show timing information on printks (0-1)"
> +	range 0 1
> +	default "0"

I get "0" as the default when running "make" with this patch:

$>> make oldconfig
scripts/kconfig/conf  --oldconfig Kconfig
.config:3463:warning: symbol value 'y' invalid for PRINTK_TIME
*
* Restart config...
*
*
* printk and dmesg options
*
Show timing information on printks (0-3) (PRINTK_TIME) [0] (NEW) 
                                                       ^^^

And it really writes 0 into .config:

$>> grep PRINTK_TIME .config
CONFIG_PRINTK_TIME=0

It seems that arch/x86/configs/x86_64_defconfig is used only when
you call "make defconfig"

Hmm, this might be surprising and annoying for many people. I would
suggest to make "1" as the default value and remove the default from
all that defconfigs. It is default on almost all systems and it is
why people would expect.

Best Regards,
Petr

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web