instruction-analysis API(s)

Jim Keniston jkenisto at us.ibm.com
Fri Feb 6 23:58:58 UTC 2009


On Fri, 2009-02-06 at 15:49 -0500, Masami Hiramatsu wrote:
> Hi Jim,
> 
> I'm also interested in the instruction decoder.
> If you don't mind, could we share the API specification?
> I'd like to port djprobe on it.

I'm enclosing the little x86 instruction-analysis protoype I hacked
together (insn_x86.*), along with a copy of systemtap's
runtime/uprobes2/uprobes_x86.c, which I modified to use it.

But again, we haven't really settled on an API.  For example, my x86
prototype doesn't collect all the info that kvm needs.  We're thinking
that adapting some existing code (like kvm in the x86 case) might be
more palatable to LKML.

Jim

> 
> Thanks!
> 
> Jim Keniston wrote:
> > Hi, Roland.  Back in a conference call in December, we discussed
> > approaches to refactoring utrace-related code such as uprobes, to
> > make some of the services provided there more generally available.
> > In particular, you suggested an "instruction analysis" service that
> > various subsystems could exploit -- kprobes and uprobes/ubp at first,
> > and eventually perhaps gdb, perfmon, kvm, ftrace, and djprobes.
> > 
...
> > Srikar Dronamraju and I are exploring two different approaches to an
> > x86 instruction-parsing service.  Since x86 kvm seems to have one of
> > the most systematic and thorough approaches, Srikar is prototyping a
> > generalization of kvm's x86_decode_insn() to make it support kprobes,
> > and eventually uprobes.  (Note that kvm does NOT appear to be a good
> > starting place on powerpc and s390.)  Approaching from the minimalist
> > side, I've implemented an x86 instruction-parsing API with just enough
> > smarts (so far) to support kprobes and uprobes.
> > 
> > We'd be interested to know whether these efforts are consistent
> > with what you have in mind.
> > 
> > See more details below.
> > 
> > Jim
...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: insn_x86.c
Type: text/x-csrc
Size: 7705 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/utrace-devel/attachments/20090206/ad686f67/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: insn_x86.h
Type: text/x-chdr
Size: 3060 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/utrace-devel/attachments/20090206/ad686f67/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uprobes_x86.c
Type: text/x-csrc
Size: 19871 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/utrace-devel/attachments/20090206/ad686f67/attachment-0002.bin>


More information about the utrace-devel mailing list