Changes between Version 1 and Version 2 of Group_Lock


Ignore:
Timestamp:
Feb 21, 2013 7:58:17 AM (11 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Group_Lock

    v1 v2  
    129129 
    130130 
     131== Debugging == 
     132 
     133To enable debugging, declare {{{PJ_GRP_LOCK_DEBUG}}} to non-zero in your {{{config_site.h}}}. With this, now every call to {{{pj_grp_lock_dec_ref()}}} will cause the group lock state to be printed to log at level four. This info includes the current value of the reference counter, along with the source file and line number info of the code that adds the reference counter. 
     134 
     135Note though that each {{{pj_grp_lock_acquire()}}} and {{{pj_grp_lock_release()}}} also increments and decrements the reference counter, hence they will also cause info to be dump. 
     136 
     137If you after this find out that the leaking reference is caused by timer, you can enable timer heap debugging by setting {{{PJ_TIMER_DEBUG}}} to non-zero and call {{{pj_timer_heap_dump()}}} to dump the state of the timer heap including information about the source file and line number of code that registered currently active timer entries. 
     138 
    131139{{{ 
    132140#!html