Proposal: Adds file name and line number of issuer to kernel messages.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  Hello all,

  For the efficient and speedy troubleshooting, I'd like to propose adding
  extra information to the output of printk automatically. Extra information
  includes the file name and the line number that called printk.

  This feature is accomplished by only adding some macros to log-level 
  definition in header file.
  I believe this feature would be helpful for you as well, so I'd like to get 
  feedback about my feature and implementation from you before I post this post 
  to LKML.
    Pros;
     - No modification to existing files of kernel except few lines of kernel.h.
     - You can activate this feature at kernel building using -D.
    Cons;
     - Messages without loglevel can't be benefited directly by this feature. 
       (In my research, almost half of kernel messages don't specify loglevel 
        but there are messages for debugging to some extent. So our possibility 
        of successful identification of issuing file will become much better 
        than now.)
     - You can't activate/deactivate this feature after booting.

  The following is example of kernel messages with this feature activated.

================================================================================
Linux version 2.6.1-1.138.2.1custom (root@xxxxxx) (gcc version 3.3.2 20040119
(Red Hat Linux 3.3.2-8)) #1 Mon Apr 19 19:33:34 JST 2004
arch/i386/kernel/setup.c(473)BIOS-provided physical RAM map:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * Here is a file name and line number, and so on.

arch/i386/kernel/setup.c(795)0MB HIGHMEM available.
arch/i386/kernel/setup.c(798)1024MB LOWMEM available.
On node 0 totalpages: 262144
  DMA zone: 4096 pages, LIFO batch:1
  Normal zone: 258048 pages, LIFO batch:16
  HighMem zone: 0 pages, LIFO batch:1
arch/i386/kernel/dmi_scan.c(135)DMI present.
drivers/acpi/tables.c(547)ACPI: RSDP (v000 PTLTD     ) @ 0x000f74e0
drivers/acpi/tables.c(100)ACPI: RSDT (v001 PTLTD    RSDT   0x06040000  LTP 0x000
00000) @ 0x3fefbdb3
         :
. <Skip the rest>
         :
================================================================================

  Lastly, if this ML is not suitable for my proposal, and you know suitable ML, 
  please let me know.

Regards,
Y.Ishikawa

Attachment: linux-2.6.1-1.138.2.1-loglevel.patch
Description: Binary data

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux