This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH]kprobe booster for IA64
- From: Masami Hiramatsu <hiramatu at sdl dot hitachi dot co dot jp>
- To: "bibo,mao" <bibo dot mao at intel dot com>
- Cc: "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, SystemTAP <systemtap at sources dot redhat dot com>, Yumiko Sugita <sugita at sdl dot hitachi dot co dot jp>, Satoshi Oshima <soshima at redhat dot com>, Hideo Aoki <haoki at redhat dot com>, Prasanna S Panchamukhi <prasanna at in dot ibm dot com>, Jim Keniston <jkenisto at us dot ibm dot com>
- Date: Thu, 08 Jun 2006 23:31:18 +0900
- Subject: Re: [PATCH]kprobe booster for IA64
- References: <4485223C.8090109@sdl.hitachi.co.jp> <44868B03.70108@intel.com>
Hi bibo,
bibo,mao wrote:
> hiramatu san,
> If the probed instruction can cause one fault, there may be some problem.
> Because original instruction is copied into 2nd element of ainsn.insn,
> instruction execution address is different, search_exception_tables result
> will be different also.
Thank you for your good advice.
As far as I can see, the search_exception_tables() checks whether the
page-fault address is expected to cause an exception.
If it is correct, I think the problem can be avoided by disabling
booster if the table contains the target address.
For example;
if (can_boost(template) && !search_exception_tables(p->addr)) {
p->ainsn.inst_flag |= INST_FLAG_BOOSTABLE;
}
What would you think about this idea?
Thanks
>
> Thanks
> bibo,mao
>
> Masami Hiramatsu wrote:
>> Hi, Anil and Ananth
>>
>> I ported the kprobe-booster to the IA64 architecture.
>> This patch can be applied against 2.6.17-rc5-mm3.
>> And here is the patch. Could you review it?
>>
>> This patch modifies kprobe as below;
>> - Boost if the target bundle don't use B and X unit.
>> - Introduce INST_FLAG_BOOSTABLE value for ainsn.insn_flag.
>> If this flag is set, the kprobe is boostable.
>> - Change instruction buffer(ainsn.insn) to an array of
>> bundles which has three elements. The 2nd element and the
>> 3rd element of this array are used for dynamic execution.
>>
>> And this patch is Lindent clean ;)
>>
>> I measured the overhead of the booster by using
>> the benchmark kernel module attached to this mail.
>>
>> noprobe: 436 machine cycles
>> noboost: 1162 machine cycles
>> boosted: 829 machine cycles
>>
>> CPU spec: Itanium2 1.3GHz (2CPUs)
>>
>>
>>
--
Masami HIRAMATSU
2nd Research Dept.
Hitachi, Ltd., Systems Development Laboratory
E-mail: hiramatu@sdl.hitachi.co.jp