[asterisk-bugs] [JIRA] (ASTERISK-24974) Astobj2: Allow reference debugging to be enabled/disabled by config.
Corey Farrell (JIRA)
noreply at issues.asterisk.org
Fri Apr 24 14:38:32 CDT 2015
[ https://issues.asterisk.org/jira/browse/ASTERISK-24974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Corey Farrell updated ASTERISK-24974:
-------------------------------------
Description:
This patch has rippled out from the original goal of getting better error messages from {{INTERNAL_OBJ}}. I found that providing only a REF_DEBUG version of __ao2_ref and __ao2_alloc resulted in faster performance, so I've expanded this to all code with REF_DEBUG dual ABI. REF_DEBUG no longer has an effect on ABI, it is only used to set reference debugging to enabled by default. Reference debugging can be controlled in asterisk.conf, refdebug=yes|no in the options section.
Test runs of {{/main/astobj2/perf}}:
||Branch||Runtimes (ms)||Average||
|{{master}}|54133, 54045, 53753, 53731, 53692|53870|
|{{patch4}}|53585, 53353, 53216, 53258, 53264|53335|
|{{patch5}}|52455, 52537, 52557, 52663, 52689|52580|
All test runs were done on my Linux Mint 17 workstation, with reference debugging disabled. I watched TV during each run to ensure I wouldn't do anything to effect system load. patch4 is the original scope of changes to __ao2_ref and __ao2_alloc, INTERNAL_OBJ and is_ao2_object. patch5 is the full removal of REF_DEBUG dual ABI.
was:
The error logging from {{INTERNAL_OBJ}} is completely useless without REF_DEBUG enabled, and only very minimally useful with REF_DEBUG. With REF_DEBUG you can associate the error with previous refs log entries, but without caller information this is not very helpful. Without REF_DEBUG you get a pointer in the logs, and no way to associate that pointer to anything.
The patch I'm proposing makes the best possible caller information available to {{INTERNAL_OBJ}}, and actually causes a small improvement in performance of the unit test {{/main/astobj2/perf}}.
Test runs of {{/main/astobj2/perf}}:
||Branch||Runtimes (ms)||Average||
|{{master}}|54133, 54045, 53753, 53731, 53692|53870|
|{{patched}}|53585, 53353, 53216, 53258, 53264|53335|
These ten test runs were done on my Linux Mint 17 workstation. I watched TV during each run to ensure I wouldn't do anything to effect system load. On average the patch code ran the perf test about 1% faster than master.
Note: optimizing AO2 is not a goal of this change. The goal is to provide better debug info, without causing additional overhead. All tests were run with REF_DEBUG disabled, as the fprintf/fflush on ref_log create an enormous overhead.
Summary: Astobj2: Allow reference debugging to be enabled/disabled by config. (was: Astobj2: Improve error logging from INTERNAL_OBJ().)
> Astobj2: Allow reference debugging to be enabled/disabled by config.
> --------------------------------------------------------------------
>
> Key: ASTERISK-24974
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-24974
> Project: Asterisk
> Issue Type: Improvement
> Security Level: None
> Components: Core/AstMM
> Affects Versions: SVN
> Reporter: Corey Farrell
> Assignee: Corey Farrell
> Severity: Minor
>
> This patch has rippled out from the original goal of getting better error messages from {{INTERNAL_OBJ}}. I found that providing only a REF_DEBUG version of __ao2_ref and __ao2_alloc resulted in faster performance, so I've expanded this to all code with REF_DEBUG dual ABI. REF_DEBUG no longer has an effect on ABI, it is only used to set reference debugging to enabled by default. Reference debugging can be controlled in asterisk.conf, refdebug=yes|no in the options section.
> Test runs of {{/main/astobj2/perf}}:
> ||Branch||Runtimes (ms)||Average||
> |{{master}}|54133, 54045, 53753, 53731, 53692|53870|
> |{{patch4}}|53585, 53353, 53216, 53258, 53264|53335|
> |{{patch5}}|52455, 52537, 52557, 52663, 52689|52580|
> All test runs were done on my Linux Mint 17 workstation, with reference debugging disabled. I watched TV during each run to ensure I wouldn't do anything to effect system load. patch4 is the original scope of changes to __ao2_ref and __ao2_alloc, INTERNAL_OBJ and is_ao2_object. patch5 is the full removal of REF_DEBUG dual ABI.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list