public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* MAX_STACK_DEPTH unwind.h conflict with 2.6.30-rc2 kernel
@ 2009-04-17  2:58 William Cohen
  2009-04-17  6:58 ` Josh Stone
  0 siblings, 1 reply; 2+ messages in thread
From: William Cohen @ 2009-04-17  2:58 UTC (permalink / raw)
  To: SystemTAP

[-- Attachment #1: Type: text/plain, Size: 1841 bytes --]

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

[-- Attachment #2: irq_handler3.stp --]
[-- Type: text/plain, Size: 867 bytes --]

#! /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")
  }
}

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

* Re: MAX_STACK_DEPTH unwind.h conflict with 2.6.30-rc2 kernel
  2009-04-17  2:58 MAX_STACK_DEPTH unwind.h conflict with 2.6.30-rc2 kernel William Cohen
@ 2009-04-17  6:58 ` Josh Stone
  0 siblings, 0 replies; 2+ messages in thread
From: Josh Stone @ 2009-04-17  6:58 UTC (permalink / raw)
  To: William Cohen; +Cc: SystemTAP

William Cohen wrote:
> 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:

I committed a change earlier that renames our own macro.  I didn't look
too closely at the unwind code, but I think that should be enough.

Josh

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

end of thread, other threads:[~2009-04-17  6:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-17  2:58 MAX_STACK_DEPTH unwind.h conflict with 2.6.30-rc2 kernel William Cohen
2009-04-17  6:58 ` Josh Stone

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).