Closed Bug 1470268 Opened 4 years ago Closed 4 years ago

Add ability to filter allocations reported by dmd.py

Categories

(Core :: DMD, enhancement)

58 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: erahm, Assigned: erahm)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

As a user I'd like to be able to limit the output of dmd.py to only include stacks that go through certain pieces of code. For example I'd like investigate font related allocations that come from 'libfontconfig' without have to look at other allocations.
This adds an '--allocation-filter' param that can be used to limit output to
only allocations that include the filter in their stack. For example:
  dmd.py --allocation-filter fontconfig dmd.json.gz
limits its output to just allocations that have an instance of 'fontconfig' in
in one of their stack frames.
Attachment #8986879 - Flags: review?(n.nethercote)
Assignee: nobody → erahm
Status: NEW → ASSIGNED
Comment on attachment 8986879 [details] [diff] [review]
Add allocation filter to dmd.py

Review of attachment 8986879 [details] [diff] [review]:
-----------------------------------------------------------------

It would be nice to have a test, but getting reliable stacks is hard.
Attachment #8986879 - Flags: review?(n.nethercote) → review+
(In reply to Nicholas Nethercote [:njn] from comment #2)
> Comment on attachment 8986879 [details] [diff] [review]
> Add allocation filter to dmd.py
> 
> Review of attachment 8986879 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> It would be nice to have a test, but getting reliable stacks is hard.

I'll file a follow-up for adding pure python tests + synthetic dmd.json files.
Blocks: 1470538
https://hg.mozilla.org/mozilla-central/rev/3b8204a5fa3a
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.