Closed Bug 1476371 Opened 7 years ago Closed 7 years ago

Normalize thread names/TIDs in about:memory diffs

Categories

(Toolkit :: about:memory, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox63 --- wontfix
firefox64 --- wontfix
firefox65 --- fixed

People

(Reporter: kmag, Assigned: erahm)

References

Details

Attachments

(1 file)

Bug 1475899 adds a memory reporter for the committed size of thread stacks. Since multiple threads can have the same name, each of the entries has a numeric thread ID appended to it, which will change in each session. Threads from thread pools also have separate numeric IDs appended to them, which will vary depending on exactly how the threads are spun up and shut down. These should be normalized so that they're useful in diffs. For instance: explicit/thread-stacks/DNS Resolver #1 (tid=4932) should be normalized to something like: explicit/thread-stacks/DNS Resolver #N (tid=NNN)
It would be nice if we had a principled way to indicate IDs that require normalization. I have contemplated various ones in the past -- by putting something into the memory report path itself -- but I never came up with something that wasn't horrible. So currently we just have hard-coded patterns to look for within aboutMemory.js.
This normalizes thread IDs (tid) to use the form 'tid=NNN'. It also normalizes threadpool numbers, for example 'Foo #1 (tid=1234)' is mapped to 'Foo #N (tid=NNN)'. Nick, I ran into this looking at some diffs today, this makes things a bit more bearable.
Attachment #9021370 - Flags: review?(n.nethercote)
Assignee: kmaglione+bmo → erahm
Status: NEW → ASSIGNED
Comment on attachment 9021370 [details] [diff] [review] Normalize thread names in about:memory diffs Review of attachment 9021370 [details] [diff] [review]: ----------------------------------------------------------------- I give you a gold star for updating the tests!
Attachment #9021370 - Flags: review?(n.nethercote) → review+
Pushed by erahm@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/2590832f3440 Normalize thread names in about:memory diffs. r=njn
Backout by nbeleuzu@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/712cf5b07342 Backed out changeset 2590832f3440 for Linting opt failrue on aboutMemory.js. CLOSED TREE
Pushed by erahm@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/cde71c0b976d Normalize thread names in about:memory diffs. r=njn
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: