This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
MAX_STACK_DEPTH unwind.h conflict with 2.6.30-rc2 kernel
- From: William Cohen <wcohen at redhat dot com>
- To: SystemTAP <systemtap at sources dot redhat dot com>
- Date: Thu, 16 Apr 2009 22:58:43 -0400
- Subject: MAX_STACK_DEPTH unwind.h conflict with 2.6.30-rc2 kernel
I am working on getting systemtap tracepoints working with the 2.6.30-rc2-tip
kernel (kernel installed using instructions on
http://people.redhat.com/mingo/tip.git/readme.txt). I found when trying to run
tracepoint examples have around that end up getting an error. It looks like the
unwind MAX_STACK_DEPTH in the runtime conflicts with one in the kernel:
../install/bin/stap -vv ../../examples/irq_handler3.stp
ends up giving the following error:
Running make -C "/lib/modules/2.6.30-rc2-tip/build" M="/tmp/stapeihakL" modules
>/dev/null
In file included from
/home/wcohen/research/profiling/systemtap_write/install/share/systemtap/runtime/unwind.c:16,
from
/home/wcohen/research/profiling/systemtap_write/install/share/systemtap/runtime/stack.c:26,
from
/tmp/stapeihakL/stap_829b6b107c2520700a4d40f5d31a3fb8_4393.c:46:
/home/wcohen/research/profiling/systemtap_write/install/share/systemtap/runtime/unwind/unwind.h:26:1:
error: "MAX_STACK_DEPTH" redefined
In file included from include/linux/sched.h:74,
from include/linux/ptrace.h:80,
from
/home/wcohen/kernel/mingo/linux-2.6/arch/x86/include/asm/kprobes.h:25,
from include/linux/kprobes.h:42,
from
/home/wcohen/research/profiling/systemtap_write/install/share/systemtap/runtime/runtime.h:21,
from
/tmp/stapeihakL/stap_829b6b107c2520700a4d40f5d31a3fb8_4393.c:45:
include/linux/perf_counter.h:562:1: error: this is the location of the previous
definition
make[1]: *** [/tmp/stapeihakL/stap_829b6b107c2520700a4d40f5d31a3fb8_4393.o] Error 1
make: *** [_module_/tmp/stapeihakL] Error 2
Pass 4: compiled C into "stap_829b6b107c2520700a4d40f5d31a3fb8_4393.ko" in
4150usr/1070sys/5376real ms.
Pass 4: compilation failed. Try again with another '--vp 0001' option.
-Will
#! /usr/bin/env stap
# just a simple script to see how much time is spent handling irq
global irq_s_time, action
probe kernel.trace("irq_handler_entry")
{
t = gettimeofday_us(); i=$irq; a=$action->handler
irq_s_time[i,a] = t
}
probe kernel.trace("irq_handler_exit")
{
t = gettimeofday_us(); i = $irq; a = $action->handler
if ([i,a] in irq_s_time) {
e = t - irq_s_time[i,a]
delete irq_s_time[i,a]
action[a,kernel_string($action->name),$ret] <<< e
}
}
probe begin { printf("watching irqs handlers\n") }
probe end {
printf("\n%-25s %10s %10s %10s %10s\n",
"action", "total(us)", "avg(us)", "count", "handled")
foreach ([a,an,rv] in action-) {
printf("%-25s %10d %10d %10d %10s\n",
an,
@sum(action[a,an,rv]),
@avg(action[a,an,rv]),
@count(action[a,an,rv]),
rv ? "yes" : "no")
}
}