This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Fwd: Re: Regarding systemtap support for AArch64]


On 11/07/2013 09:22 PM, Sandeepa Prabhu wrote:

> Yes exactly, the trampoline was replacing exception return (ERET)
> address not the function return (RET) address! (wrong manipulation of
> saved pt_regs), so was firing ret-probe at the function entry not
> return and x0 showed the function argument not the return value.
> Thanks for pointing out this, have fixed this on my devel branch.
> ~Sandeepa
>>
>> -Will

Hi Sandeepa,

The build of the devel branch kernel finally finished and I was able to boot it.  The results look much better for the probe of vfs.return. Thanks for fixing this. Thanks so much for fixing the kretprobes.

$ uname -a
Linux localhost 3.12.0-rc5+ #6 SMP Thu Nov 7 21:27:15 EST 2013 aarch64 aarch64 aarch64 GNU/Linux


$ sudo ~/systemtap_write/install/bin/stap  -k  -e 'probe vfs.read.return {printf("$return = 0x%x\n", $return);print_regs(); exit()}'
[sudo] password for wcohen: 
$return = 0xc
pc : [<ffffffc000186924>] lr : [<ffffffc00008b07c>] pstate: 40000145
sp : ffffffc05f6f7e80
x29: ffffffc05f6f7e80 x28: ffffffc05f6f4000 
x27: ffffffc000835000 x26: 000000000000003f 
x25: 0000000000000112 x24: 0000000000000015 
x23: 0000000080000000 x22: 0000007fa256eaa8 
x21: 0000000000000001 x20: 0000007fdf0520e0 
x19: ffffffc05f502100 x18: 0000007fdf050c70 
x17: 0000007fa256ea50 x16: ffffffc0001868e0 
x15: 0000000000000004 x14: 0000007fdf054420 
x13: 0000000000000001 x12: 0000000000000008 
x11: 00000000106180f0 x10: 0000000000401277 
x9 : 0000000000000028 x8 : 000000000000003f 
x7 : 0000000000000005 x6 : 0000000000000000 
x5 : 0000000000000000 x4 : 0000000000000000 
x3 : 0000000000000001 x2 : 00000000000000a6 
x1 : ffffffc072d62800 x0 : 000000000000000c 

Keeping temporary directory "/tmp/stapJO91tf"

Looking at where the pc is in the disassembled vmlinux that seems to make sense. The instruction right after the call to vfs_read:

ffffffc00018691c:       f9001ba4        str     x4, [x29,#48]
ffffffc000186920:       97fffe04        bl      ffffffc000186130 <vfs_read>
ffffffc000186924:       aa0003f4        mov     x20, x0
ffffffc000186928:       b7f80074        tbnz    x20, #63, ffffffc000186934 <SyS\
_read+0x54>



-Will


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]