<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
On 2/11/10 7:06 PM, Marius Zbihlei wrote:
<blockquote
 cite="mid:E2A35B0687F8DE46B69CE1FB9433CF24CD9086@WEBEXCHANGE.webde.local"
 type="cite">
  <meta http-equiv="Content-Type"
 content="text/html; charset=ISO-8859-1">
  <meta name="Generator"
 content="MS Exchange Server version 6.5.7654.12">
  <title>RE: [sr-dev] About new debugger module</title>
<!-- Converted from text/plain format -->
  <p><font size="2">Hello,<br>
  <br>
I don't see a problem with the malloc's as performance is out of the
question.</font></p>
</blockquote>
not performance, but fragmentation. I wouldn't like chopping the sip
worker memory.<br>
<br>
<blockquote
 cite="mid:E2A35B0687F8DE46B69CE1FB9433CF24CD9086@WEBEXCHANGE.webde.local"
 type="cite">
  <p><font size="2"> 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.<br>
  <br>
&nbsp;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.<br>
  </font></p>
</blockquote>
<br>
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.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<br>
<blockquote
 cite="mid:E2A35B0687F8DE46B69CE1FB9433CF24CD9086@WEBEXCHANGE.webde.local"
 type="cite">
  <p><font size="2"><br>
Cheers<br>
Marius<br>
  <br>
  <br>
&gt; The patch is a little on the long side, and a bit intrusive to my<br>
&gt; liking , it you have other suggestion please let me now.<br>
  <br>
indeed a bit long. I was thinking to have some static tables:<br>
  <br>
struct action_info {<br>
int type;<br>
char *name;<br>
};<br>
  <br>
struct action_info _sr_actions_list[] = {<br>
&nbsp;&nbsp; {FORWARD_T, "forward"},<br>
&nbsp;&nbsp; {IF_T, "if"},<br>
...<br>
&nbsp;&nbsp; {0, 0}<br>
};<br>
  <br>
Maybe same for expressions, operators, etc. Would become easy everywhere<br>
to get the action name (also easy to generate the list of actions for<br>
documentation purposes). The core print functions will get simplified a<br>
lot, since only few cases need special handling.<br>
  <br>
What I do not like about printing to buffer now is alloc every time. I<br>
was thinking to a less verbose version, just to print the action name,<br>
but more details are probably better when debugging.<br>
  <br>
Cheers,<br>
Daniel<br>
  <br>
&gt;<br>
&gt; Cheers<br>
&gt; Marius<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; sr-dev mailing list<br>
&gt; <a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
&gt; <a moz-do-not-send="true"
 href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
&gt;&nbsp;&nbsp;&nbsp;<br>
  <br>
--<br>
Daniel-Constantin Mierla<br>
SIP Server Professional Solutions<br>
* <a moz-do-not-send="true" href="http://www.asipto.com/">http://www.asipto.com/</a><br>
  <br>
  <br>
  </font>
  </p>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
SIP Server Professional Solutions
* <a class="moz-txt-link-freetext" href="http://www.asipto.com/">http://www.asipto.com/</a>
</pre>
</body>
</html>