duplicate body remover
Frank Ch. Eigler
fche@redhat.com
Thu Oct 19 18:47:00 GMT 2006
Li Guanglei <guanglei@cn.ibm.com> writes:
> [...] today when I tried to shrink the size of the generate .c file
> from stap,
The biggest current source of repetition is the entry- and
registration-related functions, not the final probe handlers or
auxiliary functions. I'm close to checking in a major improvement on
this front.
> [...]
> + if(typeid(*statements[i])==typeid(null_statement))
(We try to avoid run-time typing checks like that - it indicates poor
OO design.)
While your code does shrink pass-2 output, as David said, it is almost
certainly unnecessary given the pass-3-level duplicate elimination for
probe handlers.
- FChE
More information about the Systemtap
mailing list