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: jprobe question


>Here are the patches. In function non_syscall, I save the 
>ar.bsp (after instruction cover) to the scratch area below 
>pt_regs, then calls preserve_scratch_area. 
>preserve_scratch_area will reserve 1 new 16-byte area for next 
>call to ia64_bad_break. Later on, kprobe handler uses 
>pt_regs->cr_ifs and the saved ar.bsp to get the real ar.bsp 
>and parameter number. This approach also considers user space 
>probe. kprobe_save_bsp patch has no any impact on critical fault patch.
>The jprobe patch is to save the function parameters when the 
>jprobe is hit and restore them after break.

Yanmin,
	I am not sure whether using the scratch area below the pt_regs 
to save ar.bsp would be the right thing to do and more over it does look
like a hack.
Clean solution would be to have a field in pt_regs to save ar.bsp, until
we 
have it, here is what you can do for now.

In the setjmp_pre_handler() get the ar.bsp by unwinding the stack 
and then calling unw_get_bsp() to get the ar.bsp. Save this ar.bsp in
the kcb structure and later 
in longjmp_break_handler() you can use this ar.bsp without unwinding the
stack.

Let me know your thoughts and with you next version of the patch please
cc IA64 mailing list too.


Cheers,
Anil Keshavamurthy









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