Show in the error console the path to the dumped memory reports

RESOLVED FIXED in mozilla18

Status

()

Toolkit
about:memory
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: florian, Assigned: florian)

Tracking

Trunk
mozilla18
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
Created attachment 660826 [details] [diff] [review]
Patch

Bug 768470 added a way to dump the memory reports to a file, but the path where they are dumped isn't obvious (to me at least).

On Mac they are in ~/Library/Caches/TemporaryItems/memory-reports-<pid>.json
I didn't know that folder existed, and looked only in /tmp and /var/tmp.

The attached patch dumps the path to the Error Console, exactly like the cycle collector dump does (http://hg.mozilla.org/mozilla-central/annotate/f39786e8364d/xpcom/base/nsCycleCollector.cpp#l1345).
Attachment #660826 - Flags: review?(n.nethercote)
Comment on attachment 660826 [details] [diff] [review]
Patch

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

Great idea, thanks for the patch.

::: xpcom/base/nsMemoryReporterManager.cpp
@@ +1028,5 @@
> +    if (cs) {
> +      nsString path;
> +      if (NS_SUCCEEDED(tmpFile->GetPath(path)))
> +        cs->LogStringMessage(path.get());
> +    }

Just printing the filename by itself looks a bit odd.  Can you change it to something like "nsIMemoryReporterManager::dumpReports() dumped reports to <file>"?

(I realize the CC dump just prints the filename;  bonus points if you change that message similarly.)
Attachment #660826 - Flags: review?(n.nethercote) → review+

Comment 2

5 years ago
when you create CC/GC logs, you get the full path in error console.

Comment 3

5 years ago
Er, I totally misinterpreted "I realize the CC dump just prints the filename" :)

Feel free to change CC/GC error console messages too.
(Assignee)

Comment 4

5 years ago
Created attachment 661175 [details] [diff] [review]
Patch v2
Assignee: nobody → florian
Attachment #660826 - Attachment is obsolete: true
Attachment #661175 - Flags: review?(bugs)

Updated

5 years ago
Attachment #661175 - Flags: review?(bugs) → review+
(Assignee)

Comment 5

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/045c549ff078
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
https://hg.mozilla.org/mozilla-central/rev/045c549ff078
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.