This is the mail archive of the systemtap@sources.redhat.com 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: How does jprobes/kprobes work ?


Hi Badari,

>I am just wondering how does jprobes provide the arguments
>to the function if I enable IRQ_STACKS on PPC64 or
>4KSTACKS on i386 ? This forces the interrupt to be taken
>on a per-processor stacks, there by loosing original stack.

It works with 4KSTACK enabled on i386.

>Does the code go thro the trouble of finding out the original
>stack and copy it for arguments ?

The way it works is that when the probe is hit, the breakpoint
handler simply irets to the probe handler's eip while retaining
register and stack state corresponding to the function entry.
After it is done, the probe handler calls jprobe_return() which
traps again to restore processor state and switch back to the
probed function.

Thanks
Prasanna
-- 

Prasanna S Panchamukhi
Linux Technology Center
India Software Labs, IBM Bangalore
Ph: 91-80-25044636
<prasanna@in.ibm.com>


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