This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: duplicate body remover
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Li Guanglei <guanglei at cn dot ibm dot com>
- Cc: "systemtap at sourceware dot org" <systemtap at sourceware dot org>
- Date: 19 Oct 2006 14:46:58 -0400
- Subject: Re: duplicate body remover
- References: <45379A7C.6040004@cn.ibm.com>
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