public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [RFC][PATCH 0/4][kprobe](djprobe) Direct jump optimized kprobes
@ 2006-11-21  6:53 Masami Hiramatsu
  2006-11-21  6:55 ` [RFC][PATCH 1/4][kprobe](djprobe) generalize the length of the instruction Masami Hiramatsu
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Masami Hiramatsu @ 2006-11-21  6:53 UTC (permalink / raw)
  To: Keshavamurthy, Anil S, Ingo Molnar, SystemTAP,
	Ananth N Mavinakayanahalli, Prasanna S Panchamukhi
  Cc: Satoshi Oshima, Hideo Aoki, Yumiko Sugita, Jim Keniston,
	Martin Bligh, Greg Kroah-Hartman

Hi Anil and Ingo,

I integrated the essence of the djprobe into kprobes. For this
purpose, I introduced the length member in the kprobe structure.

If you'd like to use it, specify the length of the instructions
which will be replaced by a jump code to that length member.
(Of cause, you also have to check whether the instructions are
 relocatable and don't include any jump target.)

There are some limitations if you specify the length.
- Must not specify the post_handler and the break_handler.
 Djprobe doesn't support those handlers.
- Must not modify EIP in the pre_handler.
 This modified EIP is just ignored.

And some behavior of kprobes will change.
- If you insert a kprobe in where another djprobe is already
 inserted in, it will become one probe of the multi-probes of
 the djprobe.
 In this case, if the kprobe has a post_handler or a break_handler,
 register_kprobe() will return -EEXIST and fail to register it.
- On the other hand, if you insert a djprobe in where another
 kprobe is already inserted in, it will become one probe of
 the multi-probes of the kprobe. This will never fail.
- If you insert a kprobe in the middle of the jump code which has
 inserted by another djprobe, register_kprobe() will return
 -EEXIST and fail to register it.

 From the user's point of view, it just seems to be optimized by
invoking commit_kprobes() if user sets the length member of kprobe.
So I call it the Direct Jump Optimized kprobes ("djprobe" for short).

NOTE: The patches following this mail depends on my previous patch
(kprobes-enable-booster-on-the-preemptible-kernel.patch).
http://sources.redhat.com/ml/systemtap/2006-q4/msg00453.html

Best Regards,

P.S. Kretprobe is also optimized by this patch.


---
Masami HIRAMATSU
Linux Technology Center
Hitachi, Ltd., Systems Development Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2006-11-28 15:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-21  6:53 [RFC][PATCH 0/4][kprobe](djprobe) Direct jump optimized kprobes Masami Hiramatsu
2006-11-21  6:55 ` [RFC][PATCH 1/4][kprobe](djprobe) generalize the length of the instruction Masami Hiramatsu
2006-11-21  6:56 ` [RFC][PATCH 2/4][kprobe](djprobe) Direct jump optimized kprobes core patch Masami Hiramatsu
2006-11-21  6:57 ` [RFC][PATCH 3/4][kprobe](djprobe) djprobe for i386 architecture code Masami Hiramatsu
2006-11-21  6:59 ` [RFC][PATCH 4/4][kprobe](djprobe) delayed invoking commit_kprobes() Masami Hiramatsu
2006-11-21 14:24 ` [RFC][kprobe](djprobe) djprobe examples Masami Hiramatsu
2006-11-27 16:56 ` [RFC][PATCH 0/4][kprobe](djprobe) Direct jump optimized kprobes Ingo Molnar
2006-11-28  0:05   ` Frank Ch. Eigler
2006-11-28  2:44     ` Satoshi Oshima
2006-11-28 15:01       ` Ingo Molnar
2006-11-28 15:56         ` Masami Hiramatsu
2006-11-28 16:34           ` Ingo Molnar
2006-11-28 17:52             ` Frank Ch. Eigler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).