public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* printk in kernel.function("__switch_to") probe crashes machine
@ 2007-04-25 23:21 Dave Nomura
  2007-04-26  0:03 ` Jim Keniston
  2007-04-26  4:23 ` Martin Hunt
  0 siblings, 2 replies; 3+ messages in thread
From: Dave Nomura @ 2007-04-25 23:21 UTC (permalink / raw)
  To: systemtap

3. I have written a kernel function probe in __switch_to and find that I 
can define it as:
probe kernel.function("__switch_to")
{
  print("calling ITrace_switch\n");
  // ITrace_switch()
}
If I run this script I get:
Running sudo /usr/bin/staprun -u dcn -d 3614 -c 
"/home/dcn/itrace/ITrace_test/hanoi/hanoi64 -2" /tmp/stapAiagsM/pitrace.ko
start itrace
calling ITrace_switch
....
calling ITrace_switch
end itrace
and this works just as expected.
However, if I uncomment ITrace_switch() call in my __switch_to probe, 
and define it as:
function ITrace_switch()
%{
  printk("ITrace_switch called\n");
%}
this crashes the machine.

I'm a SystemTap novice, and kernel novice so I'm not sure if there is 
some obvious reason why this "printk" should cause the system to crash.  
There are no messages on the console.

If there is a simple explanation I guess it might help me avoid doing 
this sort of thing in the future.  For now, I'll just avoid using printk 
in this scenario.

Here is the machine info:
Linux elm3b158 2.6.16.43-0.5-ppc64 #1 SMP Mon Mar 19 08:28:24 UTC 2007 
ppc64 ppc64 ppc64 GNU/Linux
SUSE Linux Enterprise Server 10 SP1 RC1 (ppc)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-04-26  4:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-25 23:21 printk in kernel.function("__switch_to") probe crashes machine Dave Nomura
2007-04-26  0:03 ` Jim Keniston
2007-04-26  4:23 ` Martin Hunt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).