Thread (12 messages) flat view 12 messages, 6 authors, 2012-08-06

[PATCH v3] printk: add option to print cpu id

From: rostedt@goodmis.org (Steven Rostedt)
Date: 2012-08-06 13:39:24
Also in: linux-omap, lkml

On Fri, Aug 03, 2012 at 03:48:26PM -0700, Pandita, Vikram wrote:
On Fri, Aug 3, 2012 at 3:36 PM, Greg KH [off-list ref] wrote:
quoted
On Fri, Aug 03, 2012 at 03:25:17PM -0700, Pandita, Vikram wrote:
quoted
quoted
quoted
This was something that got used internally and helped at times.
Could you have used the trace point instead?
As i understood the trace_prink(), one would need to modify existing
printk -> trace_printk. Is my understanding correct?
No, you should just be able to watch the tracepoint, right?
yes.
Assumption being you know _EXACTLY_ what code piece to watch for.
Which may not be the case all times.
But it traces all printks.

 # echo 1 > /sys/kernel/debug/tracing/events/printk/console/enable
 # mount /home/rostedt
 # cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 2/2   #P:4
#
#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
        modprobe-2707  [002] d..1    97.079458: console: [   95.816945] NFS: Registering the id_resolver key type

        modprobe-2707  [002] d..1    97.084534: console: [   95.822038] Key type id_resolver registered

If you wanted this from boot up, you can just add to the kernel command line:

  trace_event=console

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help