[Asterisk-code-review] RFC: ao2 reference storage location logging. (asterisk[master])
Corey Farrell
asteriskteam at digium.com
Sat Jul 2 16:33:42 CDT 2016
Hello Anonymous Coward #1000019,
I'd like you to reexamine a change. Please visit
https://gerrit.asterisk.org/3141
to look at the new patch set (#2).
Change subject: RFC: ao2 reference storage location logging.
......................................................................
RFC: ao2 reference storage location logging.
This is not ready to be committed. For now the goal is to see if this
change will be received, and get feedback on the changes to astobj2.h.
This change allows ao2_ref/ao2_alloc to record REF_DEBUG information
that allows refcounter.py to find matching ref + unref and filter them
out of the results. This can be very helpful with certain objects like
formats that are long lived and widely used.
For initial reviews please focus on API's added to astobj2.h. I want
to determine a good API to be used for associating the storage location
with REF_DEBUG output. Other changes are in place to show a working
example. This has been tested using tests/bridge/hold_redirect. No
leaks are fixed, but the output from refcounter.py is reduced by 66% due
to matching of some ref/unref for leaked objects. See JIRA for example
output.
As a bonus this commit records the size of AO2 allocations to the
REFS_DEBUG log. Currently this is just printed in the output from
refcounter.py, but in the future it could be used to detect indirect
reference leaks - where one object leaks and holds a reference to
another.
ASTERISK-26171
Change-Id: Iacb0a51cefaa98c83eab18aa2b7d18850bb33951
---
M contrib/scripts/refcounter.py
M include/asterisk/astobj2.h
M include/asterisk/codec.h
M include/asterisk/format.h
M include/asterisk/format_cache.h
M include/asterisk/format_cap.h
M include/asterisk/stasis.h
M include/asterisk/utils.h
M main/astobj2.c
M main/astobj2_container.c
M main/codec.c
M main/format.c
M main/format_cache.c
M main/format_cap.c
M main/frame.c
M main/rtp_engine.c
M main/stasis.c
M main/stasis_cache.c
M main/stasis_cache_pattern.c
M main/stasis_message.c
M main/threadpool.c
M main/translate.c
22 files changed, 324 insertions(+), 215 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/41/3141/2
--
To view, visit https://gerrit.asterisk.org/3141
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iacb0a51cefaa98c83eab18aa2b7d18850bb33951
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Anonymous Coward #1000019
More information about the asterisk-code-review
mailing list