This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
RE: backtrace not working on mainline x86_64
- From: "Mao, Bibo" <bibo dot mao at intel dot com>
- To: <jrs at us dot ibm dot com>
- Cc: "SystemTAP" <systemtap at sources dot redhat dot com>
- Date: Wed, 12 Apr 2006 14:58:59 +0800
- Subject: RE: backtrace not working on mainline x86_64
In fact if one sentence is added in runtime/stack.c, it will be ok. This modification is only x86_64 architecture relative. I tested in RHEL4-U4 kernel version and 2.6.17-rc1 version, it both works ok.
bibo,mao
runtime/stack.c 2006-04-12 14:41:27.000000000 +0800
@@ -35,6 +35,7 @@
static void __stp_stack_sprint (String str, unsigned long *stack, int verbose, int levels)
{
unsigned long addr;
+ stack = (unsigned long*) *stack;
while (((long) stack & (THREAD_SIZE-1)) != 0) {
addr = *stack++;
if (_stp_kta(addr)) {
>-----Original Message-----
>From: Jose R. Santos [mailto:jrs@us.ibm.com]
>Sent: 2006年4月12日 0:22
>To: Mao, Bibo
>Cc: SystemTAP
>Subject: Re: backtrace not working on mainline x86_64
>
>bibo,mao wrote:
>
>>In recent x86_64, process kernel stack is different from trap stack, I
>>modify runtime/stack.c _stp_stack_sprint() function, the original is
>> __stp_stack_sprint (str, (unsigned long *)®_SP(regs), verbose, 0);
>> __stp_stack_sprint (str, (unsigned long *)REG_SP(regs), verbose, 0);
>>
>>It works well for x86_86 in recent kernel version, this is only
>>temporary method.
>>
>>
>That works for me.
>
>What would be a good permanent fix for this? Should check for X86_64
>and Kernel version be added to _stp_stack_sprint() function?
>
>-JRS