[sr-dev] About new debugger module
Daniel-Constantin Mierla
miconda at gmail.com
Thu Feb 11 19:14:03 CET 2010
Hello,
On 2/11/10 7:06 PM, Marius Zbihlei wrote:
>
> Hello,
>
> I don't see a problem with the malloc's as performance is out of the
> question.
>
not performance, but fragmentation. I wouldn't like chopping the sip
worker memory.
> I don't think anyone tries to do profiling with the debugger module.
> It might be a problem with the user that has ownership of the pointer.
> I've try with some static buffer but this tends to get complicated as
> recursive calls are made to the printing function.
>
> I don't know about your suggestion for a simplified action_info
> struct. The problem with the size of the patch is that kamailio
> support expression is actions, which can have there own action list
> and such on. Probably it will be better not to touch the route_* files
> in core, just duplicate the print mechanism in modules/debugger. This
> will allow for some rather nice optimization (I don't need to handle
> both the DBG() case and the debugger output case) and support only the
> necessary bits.
>
The debugger stops at action evaluation, so I haven't considered
printing the expression. The list of action_info was supposed to be in
debugger module for what I started, but no time to finish it. You patch
extended the idea in my mind to make it available everywhere and use it
in core.
Cheers,
Daniel
>
> Cheers
> Marius
>
>
> > The patch is a little on the long side, and a bit intrusive to my
> > liking , it you have other suggestion please let me now.
>
> indeed a bit long. I was thinking to have some static tables:
>
> struct action_info {
> int type;
> char *name;
> };
>
> struct action_info _sr_actions_list[] = {
> {FORWARD_T, "forward"},
> {IF_T, "if"},
> ...
> {0, 0}
> };
>
> Maybe same for expressions, operators, etc. Would become easy everywhere
> to get the action name (also easy to generate the list of actions for
> documentation purposes). The core print functions will get simplified a
> lot, since only few cases need special handling.
>
> What I do not like about printing to buffer now is alloc every time. I
> was thinking to a less verbose version, just to print the action name,
> but more details are probably better when debugging.
>
> Cheers,
> Daniel
>
> >
> > Cheers
> > Marius
> >
> >
> > _______________________________________________
> > sr-dev mailing list
> > sr-dev at lists.sip-router.org
> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
> >
>
> --
> Daniel-Constantin Mierla
> SIP Server Professional Solutions
> * http://www.asipto.com/
>
>
--
Daniel-Constantin Mierla
SIP Server Professional Solutions
* http://www.asipto.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20100211/6b6db86b/attachment.htm>
More information about the sr-dev
mailing list