This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: printk in kernel.function("__switch_to") probe crashes machine
- From: Martin Hunt <hunt at redhat dot com>
- To: dcnltc at us dot ibm dot com
- Cc: systemtap at sourceware dot org
- Date: Thu, 26 Apr 2007 00:23:28 -0400
- Subject: Re: printk in kernel.function("__switch_to") probe crashes machine
- Organization: Red Hat Inc.
- References: <462FE193.6090102@us.ibm.com>
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