This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: printk in kernel.function("__switch_to") probe crashes machine


On Wed, 2007-04-25 at 16:17 -0700, Dave Nomura wrote:

> function ITrace_switch()
> %{
>   printk("ITrace_switch called\n");
> %}
> this crashes the machine.

A quick look at the source for __switch_to shows this comment

/* never put a printk in __switch_to... printk() calls wake_up*()
indirectly */

With systemtap it is always safe to use the builtin IO; print, printf,
etc. Using printk is not advised (and not permitted except when safety
is disabled with "-g") because it is not always safe.

Martin




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]