Closed
Bug 232471
Opened 22 years ago
Closed 2 years ago
NSS reference count logging
Categories
(NSS :: Libraries, defect, P5)
Tracking
(Not tracked)
RESOLVED
INACTIVE
People
(Reporter: wtc, Unassigned)
Details
Attachments
(2 files)
On 2002-09-24, Brian Ryner sent me two files that
he used for NSS reference count logging. Here
are his instructions:
All you need to do is add nssrefcount.c to the
build (I put it in nss/lib/util/), and then add
NSS_LOG_ADDREF and NSS_LOG_RELEASE calls wherever
a reference count is incremented or decremented.
The format is:
NSS_LOG_ADDREF(pointer, new refcount, "Object Name", sizeof(object))
NSS_LOG_RELEASE(pointer, new refcount, "Object Name")
Generation of the log file is controlled by the
environment variable NSS_MEM_REFCNT_LOG,
NSS_MEM_LOG_CLASSES, and NSS_MEM_LOG_OBJECTS.
These work exactly like the corresponding
Mozilla/XPCOM logging variables described on
http://www.mozilla.org/performance/refcnt-balancer.html ,
and the same perl scripts to generate the refcount
tree will work.
I should note that on Linux I changed to using
libbfd for symbol resolution, so that static
functions would show up, so if you want to
check this in you'll need to link with libbfd
on Linux.
| Reporter | ||
Comment 1•22 years ago
|
||
| Reporter | ||
Comment 2•22 years ago
|
||
Comment 3•22 years ago
|
||
OH, this is logger would go into the pk11_wrappers. All my comments in the
softoken logging bug do not apply. This would give us all the correct
information (assuming we catch all the references when we instrument).
It does require us to know, a priori, that we are debugging reference leaks (it
wouldn't show up in the nightly build log, which I assume is the intent of
Nelson's bug.
Updated•21 years ago
|
QA Contact: bishakhabanerjee → jason.m.reid
Updated•20 years ago
|
QA Contact: jason.m.reid → libraries
Comment 4•4 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.
Assignee: wtc → nobody
Updated•3 years ago
|
Severity: normal → S3
Updated•2 years ago
|
Status: NEW → RESOLVED
Closed: 2 years ago
Priority: -- → P5
Resolution: --- → INACTIVE
You need to log in
before you can comment on or make changes to this bug.
Description
•