[asterisk-dev] Astobj2 debugging change proposal

George Joseph george.joseph at fairview5.com
Sun Jun 8 10:03:54 CDT 2014


Right now, the non-ref debugging code in astobj2 is triggered by a mix of
AST_DEVMODE and AO2_DEBUG and both get set if you want to run the test
framework.  I've noticed though that the inclusion of the debugging code
can actually hide problems as well as highlight them, especially related to
performance and locking.   Case in point:  Try running 'test execute
category /main/astobj2 name thrash' with REF_DEBUG turned on and off.
 While the test passes both ways, the timing is significantly different
(and not what you'd expect).  Luckily, you can turn REF_DEBUG on and off
from menuselect.

To provide a little more flexibility and visibility, I'd like to propose
the following...

1.  Change astobj2 so the non-ref debugging code is dependent on AO2_DEBUG
solely instead of the mix of AST_DEVMODE and AO2_DEBUG.  (REF_DEBUG would
remain as is)

2.  Remove the code that automatically sets AO2_DEBUG if TEST_FRAMEWORK is
defined.

3.  Add AO2_DEBUG to the menuselect extended compiler flags right next to
REF_DEBUG.

This way you can run the test framework in either production or debugging
mode.  The code change to do this is trivial but I thought I'd run it by
you guys first.

Thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140608/08d1b7fb/attachment.html>


More information about the asterisk-dev mailing list