Closed
Bug 890135
Opened 11 years ago
Closed 11 years ago
Switch B2G's "gc log" dump to produce an all-traces log
Categories
(Core :: General, defect)
Core
General
Tracking
()
People
(Reporter: justin.lebar+bug, Assigned: justin.lebar+bug)
Details
(Whiteboard: [MemShrink][LeoVB+])
Attachments
(2 files, 1 obsolete file)
(deleted),
patch
|
mccr8
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Details | Diff | Splinter Review |
Right now when you do
echo "gc log" > /data/local/debug_info_trigger
the logs we produce are not all-traces logs. This makes debugging unnecessarily difficult.
I don't see any reason not to always produce all-traces logs. If there is a reason, we can definitely make it optional.
Patch coming.
Assignee | ||
Updated•11 years ago
|
Whiteboard: [MemShrink]
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #771142 -
Flags: review?(continuation)
Comment 2•11 years ago
|
||
Have you tested this out? The CC logs are going to be much bigger, plus slightly slower because they run an extra GC. I don't know if that matters or not. GC logs will be the same size.
Assignee | ||
Comment 3•11 years ago
|
||
Yes, I used it in bug 889984. It was super helpful.
The only concern I'd have about the logs being bigger is that we might run out of space in /data/local/tmp on the phone. That doesn't seem to be happening right now, but if we get into that situation, we can always compress the logs while we write them out.
Updated•11 years ago
|
Attachment #771142 -
Flags: review?(continuation) → review+
Comment 4•11 years ago
|
||
For me the non-all-trace logs have been more useful. allTrace logs just occasionally just too
huge to analyze easily, and non-alltraces tend to contain the useful stuff - of course that depends
on the case.
Comment 5•11 years ago
|
||
It depends on what kind of leak it is. In this particular case, bug 889984, the leaked objects were being held alive by a window, so AllTraces was needed to get the full story. It would be nice to have both, but this is just for B2G so Justin can adjust it as he likes.
Assignee | ||
Comment 6•11 years ago
|
||
If you've seen circumstances in which the non-all-trace logs are useful, I'll add it -- it's easy enough to write a patch to make that work. It's better to err on the side of more options, because when you hit the leak, it's too late to rebuild.
Assignee | ||
Comment 7•11 years ago
|
||
kats, johns: Can I change nsIMemoryInfoDumper::dumpGCAndCCLogsToFile() to include a new boolean argument?
I don't think either of you is using that function, but I wanted to check.
Flags: needinfo?(jschoenick)
Flags: needinfo?(bugmail.mozilla)
Comment 8•11 years ago
|
||
(In reply to Justin Lebar [:jlebar] from comment #7)
> I don't think either of you is using that function, but I wanted to check.
AWSY desktop, at least, is not using any of the dump-to-file functions
Flags: needinfo?(jschoenick)
Comment 9•11 years ago
|
||
AWSY mobile is not using that function either, so go right ahead. Thanks for checking!
Flags: needinfo?(bugmail.mozilla)
Assignee | ||
Comment 10•11 years ago
|
||
Attachment #772058 -
Flags: review?(continuation)
Assignee | ||
Updated•11 years ago
|
Attachment #771142 -
Attachment is obsolete: true
Assignee | ||
Comment 11•11 years ago
|
||
B2G changes, which I'll merge after we land this:
https://github.com/jlebar/B2G/tree/fix-get-gc-cc-log
Comment 12•11 years ago
|
||
Comment on attachment 772058 [details] [diff] [review]
Patch, v2
Review of attachment 772058 [details] [diff] [review]:
-----------------------------------------------------------------
::: xpcom/base/nsIMemoryInfoDumper.idl
@@ +133,5 @@
> *
> + * @param aDumpAllTraces indicates whether we should run an all-traces CC log.
> + * An all-traces log visits all objects in the CC heap, while a
> + * non-all-traces log avoids visiting some objects which we know are
> + * reachable.
It might be a little confusing to say "all objects" here, given that all all-traces log may not actually visit all CCed objects that are in the heap. Maybe you could just add a disclaimer to that effect?
@@ +136,5 @@
> + * non-all-traces log avoids visiting some objects which we know are
> + * reachable.
> + *
> + * All-traces logs are much bigger than the alternative, but they may be
> + * helpful when trying to understand why a particular object is alive.
It would be good to say when it is helpful. Maybe something like "For instance, an object that is being held alive by a currently displayed document" or whatever the correct terminology is there.
Attachment #772058 -
Flags: review?(continuation) → review+
Assignee | ||
Comment 13•11 years ago
|
||
> It might be a little confusing to say "all objects" here, given that all all-traces log
> may not actually visit all CCed objects that are in the heap.
What objects are and aren't covered by an all-traces log?
Assignee | ||
Comment 14•11 years ago
|
||
Actually, I'm going to merge my changes into B2G now, because I'm about to ask someone to take a gc log, and the tool doesn't work as-is.
Comment 15•11 years ago
|
||
(In reply to Justin Lebar [:jlebar] from comment #14)
> Actually, I'm going to merge my changes into B2G now, because I'm about to
> ask someone to take a gc log, and the tool doesn't work as-is.
Sounds good.
Yeah, it is hard to describe the set of objects visited by all traces. I'll try to think of something...
Assignee | ||
Comment 16•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → justin.lebar+bug
Comment 17•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Assignee | ||
Comment 18•11 years ago
|
||
Zero risk, only run during debugging, necessary for leo blocker bug 893012.
blocking-b2g: --- → leo+
Comment 19•11 years ago
|
||
This doesn't cleanly apply, as b2g18 doesn't have the
nsCOMPtr<nsIMemoryInfoDumper> dumper = do_GetService("@mozilla.org/memory-info-dumper;1");
stuff. I'll try to figure out how to backport it I guess.
Updated•11 years ago
|
Whiteboard: [MemShrink] → [MemShrink][mccr8 will backport]
Comment 20•11 years ago
|
||
I haven't entirely made sure this finishes building.
Comment 21•11 years ago
|
||
Updated•11 years ago
|
Whiteboard: [MemShrink][mccr8 will backport] → [MemShrink]
Comment 22•11 years ago
|
||
status-b2g-v1.1hd:
--- → fixed
status-firefox23:
--- → wontfix
status-firefox24:
--- → wontfix
status-firefox25:
--- → fixed
Updated•11 years ago
|
Whiteboard: [MemShrink] → [MemShrink][LeoVB+]
You need to log in
before you can comment on or make changes to this bug.
Description
•