Closed
Bug 1273301
Opened 8 years ago
Closed 7 years ago
Use DMD to record allocations during a specific segment of the code
Categories
(Core :: DMD, defect)
Core
DMD
Tracking
()
RESOLVED
INCOMPLETE
Tracking | Status | |
---|---|---|
firefox49 | --- | affected |
People
(Reporter: mccr8, Assigned: mccr8)
References
Details
Attachments
(2 files)
3.33 KB,
patch
|
Details | Diff | Splinter Review | |
57.03 KB,
text/plain
|
Details |
I'm looking at temporary increases in memory usage during IPC serialization/deserialization. I'd like to be able to record all allocations during a certain part of the code, with a StartRecording() and StopRecording() kind of thing. It turns out this is reasonably easy to implement this by misusing dmd::ResetEverything(). The stacks I'm getting are bogus. I'm not sure if I'm just having some problem with DMD, or if the way I'm using ResetEverything is causing issues.
Assignee | ||
Comment 1•8 years ago
|
||
Assignee | ||
Comment 2•8 years ago
|
||
I had to use GCC because Clang was giving me weird stacks. I might hack up an "Analyze and Reset" method because with my current approach you get some noise from the actual logging process.
Assignee | ||
Comment 3•8 years ago
|
||
Anyways, in the log, you can see pretty easily the redundant allocation that is happening: there are 3 separate buffers of 8,192 bytes, inside CacheFileChunk::EnsureBufSize(), Pickle::Resize() and the nsCString that NS_ReadInputStreamToString() stores data into.
Assignee | ||
Comment 4•8 years ago
|
||
This isn't something that needs to be tracked for e10s, because it is just a local diagnostic tool, but I thought I'd make it block bug 1262918 to give it more visibility. The patch here is a little problematic. The GCing that DMD does causes a UAF crash with this patch, so I just commented it out. I was also hitting a JS assertion from adding something to the hash table of allocated addresses that is already in there. I have no idea how that could happen.
Blocks: 1262918
Assignee | ||
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•