Closed Bug 1179657 Opened 6 years ago Closed 6 years ago

Remove PL_DHASHMETER

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

Attachments

(1 file)

When PL_DHASHMETER is enabled, we collect lots of stats about each
PLDHashTable. You can then print these out on a per-table basis by calling
PL_DHashTableDumpMeter(), but you have to provide a PLDHashEnumerator function.

This code is unused and totally busted and has been for who knows how long.
(PLDHashStats has two fields named |mSearches|, for example.)

IMO this whole approach isn't a good way of doing stats gathering: it's too
invasive, too prone to breakage, and too awkward to use. A better way is to
just insert temporary, ad hoc fprintf(stderr, ...) calls in the places of
interest and then use simple post-processing to gather counts. I've been doing
this for years, and a while back Brendan -- who I assume is the author of this
code, because it sure feels like his style -- admitted to me that he'd come
around to my opinion on this topic.

Also, this code's presence complicates the removal of PL_DHashTableEnumerate().
It doesn't make removal impossible, but it's yet one more reason to remove it.
Attachment #8628649 - Flags: review?(nfroyd)
Attachment #8628649 - Flags: review?(nfroyd) → review+
https://hg.mozilla.org/mozilla-central/rev/486e9c117ecc
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.