[lkml]   [2012]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3] printk: add option to print cpu id
On Fri, Aug 3, 2012 at 10:54 AM, Andi Kleen <> wrote:
> Vikram Pandita <> writes:
>> From: Vikram Pandita <>
>> Introduce config option to enable CPU id reporting for printk() calls.
> What's wrong with using trace_printk for this?

trace_printk works only when you know the _exact_ path in code that
you want to profile.
When you have no idea of a random lockup, then it would be kind of
touch and time consuming
to put trace prints all around the code.

> That's much faster
> anyways. Generally printk is so slow that it's typically useless for
> instrumenting races.

As stated in another thread, its found useful to debug some specific cases:
Check thread:

> And really: Wasting 1/3 of the 80 character line is too much.

You _WASTE_ 4 chars only if you are interested in this info by
Just like you _WASTE_ 15 chars when you enable existing: CONFIG_PRINTK_TIME

For general usecase, recommendation would be to keep these options disabled.
Working on shipping products, i find almost all shipping with
CONFIG_PRINTK_TIME enabled, so there must be some value.
Same would hold for the use case being debugged for CPUID enabling.

> -Andi
> --
> -- Speaking for myself only

 \ /
  Last update: 2012-08-03 21:01    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean