Hitachi djprobe mechanism
Richard J Moore
richardj_moore@uk.ibm.com
Tue Nov 8 09:49:00 GMT 2005
OK, that's fine as long as we have an option of force the interrupt form of
probe so that we can handle odd cases where necessary.
- -
Richard J Moore
IBM Linux Technology Centre
Roland McGrath
<roland@redhat.
com> To
Richard J Moore/UK/IBM@IBMGB
09/10/2005 cc
00:23 systemtap@sources.redhat.com
bcc
Subject
Re: Hitachi djprobe mechanism
Richard Henderson has done some work in both gcc and the assembler to emit
DWARF basic block markers. The compiler knows what the jump targets are in
code it generates. For inline assembly, the assembler supports emitting a
marker for every assembler label, and the compiler emits the assembler
directive to enable the assembler's automatic markers around the inline
assembly code it copies out of your `asm' statements. When the tools with
this support are available (not yet), this will cover everything we see in
the kernel, and most user applications built in normal ways, when they are
built with DWARF info.
The basic block markers are in the standard DWARF format specification.
(They are an optional part of the same encoding that provides source line
number information.) Other compilers that, like gcc, have not heretofore
implemented this, can do so just as well as we can.
Of course hand-crafted or specially-generated code could always use
computed jumps to locations not marked with assembler labels. It just
seems very unlikely. In the case of the kernel, we can be sure enough what
the set of code is and know that there isn't any funny business beyond the
ken of our automatic tools. For the most general worst case, probably one
does have to be so conservative that you can only use jmp insertion on
unusually large instructions.
More information about the Systemtap
mailing list