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: Hitachi djprobe mechanism


On Thu, 2005-07-28 at 21:53 -0400, Frank Ch. Eigler wrote:
> But that would render the facility nearly powerless.  Let us try
> harder to characterize those cases where it can safely used as an int3
> substitute.

If I read the djprobe documentation well and if I assume that
inserting/removing the probe can be done safely, independently of how
many bytes I overwrite in the source function, the rules, for now, are
rather simple.

Let's say you want to insert probe at location x. If there is no
relative jmp or indirect call or ret instruction in [x,x+5], you can
insert the probe at location x.

The kerninst papers explain how to avoid the constraint on the "relative
jmp" by relocating it in the allocated instruction buffer and I fail to
see an obvious flaw in it so, I assume it would work if there is a need
to optimize this case.

I have probably missed other cases. Would someone who knows a lot more
about this fill in the missing rules so that I can do a more interesting
statistical analysis of the binaries on my system than simply counting
the number of instructions bigger than 5 ?

Mathieu
-- 


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