Commit graph

188 commits

Author SHA1 Message Date
Nicholas Nethercote
c2306345d5 Bug 1297658 - Avoid unnecessary checking in memory reporters. r=erahm.
This patch removes checking of all the callback calls in memory reporter
CollectReport() functions, because it's not useful.

The patch also does some associated clean-up.

- Replaces some uses of nsIMemoryReporterCallback with the preferred
  nsIHandleReportCallback typedef.

- Replaces aCallback/aCb/aClosure with aHandleRepor/aData for CollectReports()
  parameter names, for consistency.

- Adds MOZ_MUST_USE/[must_use] in a few places in nsIMemoryReporter.idl.

- Uses the MOZ_COLLECT_REPORT macro in all suitable places.

Overall the patch reduces code size by ~300 lines and reduces the size of
libxul by about 37 KiB on my Linux64 builds.

--HG--
extra : rebase_source : e94323614bd10463a0c5134a7276238a7ca1cf23
2016-08-24 15:23:45 +10:00
Jared Wein
fd84c776c7 Bug 1292042 - Enable the keyword-spacing rule for eslint. Most of this patch was autogenerated by 'eslint --fix'. Files with .xml extension needed to be changed by hand due to limitations of custom plugin. r=markh
MozReview-Commit-ID: EMjJ3yWt9Wt

--HG--
extra : rebase_source : 2b8327e5a7cf0bfd190d696ad5fe475f13faa3cc
2016-08-04 03:28:58 -04:00
Rutuja
6b35519b8f Bug 1115006 - Use Downloads.getSystemDownloadsDirectory to get download directory for about:memory on Fennec. r=mconley,margaret
MozReview-Commit-ID: JBod1Ltcz0w

--HG--
extra : rebase_source : 3fdf3b1160f36b77c10641cab4e056c2a77dc151
2016-04-19 10:39:12 -04:00
Dave Townsend
6e44ebad84 Bug 1257246: Update toolkit for eslint 2. r=Gijs
Most of this is fixing functions that in some cases return a value but then
can also run to completion without returning anything. ESLint 2 catches this
where previous versions didn't. Unless there was an obvious other choice I just
made these functions return undefined at the end which is effectively what
already happens.

MozReview-Commit-ID: KHYdAkRvhVr

--HG--
extra : rebase_source : 720cc9d864175248508146a7f4704b4bf3f02439
extra : histedit_source : 6cc0ecbf21a571e1a41d517b67512a3452fac19a
2016-04-05 11:33:48 -07:00
Anup Kumar
57ed59418e Bug 1061521 - Throw Component.exceptions instead of strings in about:memory. r=yoric
MozReview-Commit-ID: DrtCkydDbpg
2015-12-18 09:30:00 -05:00
Dave Townsend
aad445ae43 Bug 1245649: Enable no-nested-ternary. r=mconley
--HG--
extra : commitid : 197imYXFNid
extra : rebase_source : ce71773fbd8f57118ba30ab395524d9200c42162
2016-02-03 21:17:16 -08:00
Christoph Kerschbaumer
c683f66a78 Bug 1225355 - Use channel.asyncOpen2 in toolkit/components/aboutmemory/content/aboutMemory.js (r=sicking) 2015-11-30 20:23:55 -08:00
Carsten "Tomcat" Book
08997000eb Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE
Backed out changeset 647025383676 (bug 1202902)
Backed out changeset d70c7fe532c6 (bug 1202902)
2015-10-07 14:03:21 +02:00
Carsten "Tomcat" Book
e7ef778c9d Backed out 1 changesets (bug 1202902) for causing merge conflicts to mozilla-central
Backed out changeset cfc1820361f5 (bug 1202902)

--HG--
extra : rebase_source : 5d3db72337754bc7ab0ed0c30b2896100411ff92
2015-10-07 12:13:45 +02:00
Shu-yu Guo
d06b6030f6 Bug 1202902 - Scripted fix the world. 2015-10-06 14:00:31 -07:00
Shu-yu Guo
64db2267cf Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00
Eric Rahm
51f1b42cc2 Bug 1142174 - Normalize omni.ja! paths when diffing about:memory reports. r=njn
Paths of the form:
  'jar:file:///tmp/tmp2DqEYgBuildGetter_firefox/firefox/omni.ja!/components/Webapps.js'
are now normalized to:
   'jar:file:///.../omni.ja!/components/Webapps.js'
when diffing about:memory reports. This is particularly useful when checking
for regressions across builds which will often have different install paths.
2015-04-30 18:24:17 -07:00
Christoph Kerschbaumer
fe39ce0539 Bug 1087744: Make JS callers of ios.newChannel call ios.newChannel2 in toolkit/ (r=gijs) 2014-10-24 15:25:34 -07:00
Nicholas Nethercote
84a315c38c Bug 1127570 - Include measurement origins in about:memory's title bar. r=mccr8.
This changes about:memory so that whenever measurements are shown, the origin
of those measurements is visible in the title bar.

- "about:memory (live measurement)" is used when you do "Measure".

- "about:memory (<filename>)" is used when you do "Load...".

- "about:memory (diff of <filename1> and <filename2>)" is used when you do
  "Load and diff...".

- "about:memory" is used in all other cases, e.g. when about:memory is first
  loaded, and after all non-measurement actions (GC, GC, etc.)

--HG--
extra : rebase_source : 4d1da88d17481916cda5018b7a8298e67c916274
2015-02-02 16:53:49 -08:00
Nicholas Nethercote
231a4d7a81 Bug 1127645 - Remove "Read from clipboard" button from about:memory. r=mccr8.
Now that memory reports are gzipped by default (not to mention *huge* when
unzipped), this button is no longer useful. A "load from URL" button (bug
859603) would be much better, but for now let's just remove the useless
functionality so it doesn't get in the way.

--HG--
extra : rebase_source : f6bad57203ce8a7173f876d578413c4f2cb3cc22
2015-02-02 16:44:48 -08:00
Nicholas Nethercote
61271da02f Bug 1059612 - Filter diff-breaking info from memory reports in a more rigorous fashion. r=erahm.
--HG--
extra : rebase_source : 373ae65ebe08a6da9ff63eb3394bc56e56d2fcfe
2014-09-17 21:22:57 -07:00
Shu-yu Guo
15262d36a9 Bug 1001090 - Part 4: Fix errors in chrome code. (r=zombie,gavin,fitzgen,dcamp,bgrins,fabrice,gwagner,margaret,mrbkap,mak,njn,vicamo) 2014-09-15 16:30:46 -07:00
Nicholas Nethercote
985af86677 Bug 1061960 - In about:memory, support the loading of memory reports embedded in crash dumps. r=mccr8.
--HG--
extra : rebase_source : c62c396c0b0a4500761242c1dca5ae2ce04b0af4
2014-09-04 16:04:54 -07:00
Nicholas Nethercote
94f8ec5cee Bug 1061066 - Make DMD work properly with e10s. r=mccr8.
--HG--
extra : rebase_source : 35ff4f1b3c7d4af91cbc5f813030136ffc3b70e4
2014-09-01 17:22:53 -07:00
Eric Rahm
4c04003540 Bug 1056954 - Normalize pid values when diffing. r=njn 2014-08-22 15:45:44 -07:00
Nicholas Nethercote
194a53e7c2 Bug 1054318 - Replace multiple addresses in paths when diffing memory reports. r=erahm.
--HG--
extra : rebase_source : 317c4b5c371ff084673d4ada81143b5a8955151a
2014-08-19 18:28:42 -07:00
Nicholas Nethercote
ac2d623ffd No bug. Remove two "njn: ..." comments I accidentally left in. r=me.
DONTBUILD because the patches contains only trivial comment changes.

--HG--
extra : rebase_source : ecc0bd10c43c6d4223f5301ff11cbd2a56c9912b
2014-08-06 16:19:55 -07:00
Nicholas Nethercote
c189bc06ac Bug 1035570 (follow-up) - Fix a trivial tool-tip botch in about:memory. r=mccr8.
--HG--
extra : rebase_source : 8755dbb4e26b1fc68399ed8e8bd9fa2af78375aa
2014-07-28 15:42:17 -07:00
Nicholas Nethercote
c07ebda3e2 Bug 1035570 (part 3) - DMD: Add DMDAnalyzeHeap(), a heap snapshot function. r=erahm,mccr8.
The patch also adds DMDAnalyzeReports() as a synonym for DMDReportAndDump(),
and deprecates the latter.

--HG--
extra : rebase_source : 651246aa7a0a301f804c124f25beb0e8ed6cd67f
2014-05-29 23:46:09 -07:00
Jim Blandy
7e20285e70 Bug 914753: Make Emacs file variable header lines correct, or at least consistent. DONTBUILD r=ehsan
The -*- file variable lines -*- establish per-file settings that Emacs will
pick up. This patch makes the following changes to those lines (and touches
nothing else):

 - Never set the buffer's mode.

   Years ago, Emacs did not have a good JavaScript mode, so it made sense
   to use Java or C++ mode in .js files. However, Emacs has had js-mode for
   years now; it's perfectly serviceable, and is available and enabled by
   default in all major Emacs packagings.

   Selecting a mode in the -*- file variable line -*- is almost always the
   wrong thing to do anyway. It overrides Emacs's default choice, which is
   (now) reasonable; and even worse, it overrides settings the user might
   have made in their '.emacs' file for that file extension. It's only
   useful when there's something specific about that particular file that
   makes a particular mode appropriate.

 - Correctly propagate settings that establish the correct indentation
   level for this file: c-basic-offset and js2-basic-offset should be
   js-indent-level. Whatever value they're given should be preserved;
   different parts of our tree use different indentation styles.

 - We don't use tabs in Mozilla JS code. Always set indent-tabs-mode: nil.
   Remove tab-width: settings, at least in files that don't contain tab
   characters.

 - Remove js2-mode settings that belong in the user's .emacs file, like
   js2-skip-preprocessor-directives.
2014-06-24 22:12:07 -07:00
Nicholas Nethercote
aaf6fb2124 Bug 1010064 - Allow memory reports to be anonymized. r=bsmedberg.
--HG--
extra : rebase_source : 5eb756b17a97e751deb0f47e909fdb35533cb23b
2014-05-20 23:06:54 -07:00
Eric Rahm
d1d8e97f95 Bug 1022004 - Support loading memory reports that already have heap-unclassified defined. r=njn 2014-06-07 18:35:18 -07:00
Nicholas Nethercote
c6a7e959de Bug 1005489 - Implement better sub-tree sorting and significance detection in about:memory's diff mode. r=mccr8.
--HG--
extra : rebase_source : 5a157d0ed2f099550aa2b803ac4f6f172b59ba44
2014-05-28 20:37:59 -07:00
Nicholas Nethercote
d71b0cc308 Bug 1014249 - Beef up the "is DMD enabled?" and "is DMD running?" checks. r=mccr8.
--HG--
extra : rebase_source : 868ce1a1e470e45f51447f5126982aaeb51905f1
2014-05-22 19:45:14 -07:00
Nicholas Nethercote
354e7e9196 Bug 1013652 - Add a "DMD" button to about:memory when DMD is enabled. r=mccr8.
--HG--
extra : rebase_source : 368251faf2fbadad106a2d5fab3be56d455d16e9
2014-05-20 19:29:37 -07:00
Nicholas Nethercote
c17eeed597 Bug 1005442 - Strip moz-nullprincipal UUIDs when diffing memory reports. r=mccr8.
--HG--
extra : rebase_source : 83e9f2d08b1cb1672b9bef0fddcd8bd34cfa4e18
2014-05-13 18:14:29 -07:00
Jed Davis
e4ced412bb Bug 973090 - IPC remoting for child GC/CC logging. r=mccr8, r=bent
This has a few semi-interdependent pieces:

* Factoring out the file opening/closing/renaming from the GC/CC logging.

* Using IPC to have the child log to files that the parent opened.

* Changing nsIMemoryInfoDumper.dumpGCAndCCLogsToFile to report completion
  of child process logging (which was impossible before this, and which is
  needed to have a meaningful test case).

* Changing about:memory to dump logs for child processes, matching the
  behavior of the "Measure" button, because it can tell the user where
  they are now.

* Add a test for multiprocess GC/CC log dumping (only of the XPCOM
  interface, not by clicking buttons and scraping the about:memory page,
  but done as a chrome mochitest to start remote browsers); based on
  test_memoryReporters2.xul in the same directory.
2014-05-13 13:13:00 -04:00
Nicholas Nethercote
dfb5f8e5be Bug 986300 - Fix a tricky corner case involving memory report diffs. r=kats.
--HG--
extra : rebase_source : 001ae6ee0e81c40a7437ccf65add3e735fada6fa
2014-03-20 19:44:23 -07:00
Wes Johnston
98314fbfff Bug 961369 - Fallback when no file picker available in about:memory. r=njn,mfinkle 2014-02-05 10:04:32 -08:00
Nicholas Nethercote
9c25748c63 Bug 903131 - Add save GC/CC logs buttons to about:memory. r=njn,mccr8.
--HG--
extra : rebase_source : 56af9b89675394b5a219f699b96c1d26c00adc38
2014-01-31 14:43:08 -08:00
Nicholas Nethercote
17667da00b Bug 945973 (part 3) - Fix some trivial reporter/report confusions in aboutMemory.js. r=mccr8.
--HG--
extra : rebase_source : 12eec13cd507100fa29bf798372784d5d8bcfbdb
2013-12-03 20:20:15 -08:00
Nicholas Nethercote
da333f0919 Bug 945973 (part 2) - Don't complain if there aren't any "explicit" reports for a process. r=mccr8.
--HG--
extra : rebase_source : 05129260b8a3e7cfbdadcecffe4c18715254323c
2013-12-03 20:19:41 -08:00
Nicholas Nethercote
51c80b126d Bug 945973 (part 1) - Remove about:memory's is-a-sentence description check. r=mccr8.
--HG--
extra : rebase_source : bf47145a953a23b73fa1e7c441b695ffeceafbb8
2013-12-03 20:10:59 -08:00
Nicholas Nethercote
a14687b578 Bug 946484 - Ignore "redundant/"-prefixed memory reports. r=khuey.
--HG--
extra : rebase_source : 9ee5e9c208b37f361e0cfa0b599ced801428e93d
2013-12-04 16:21:55 -08:00
Nicholas Nethercote
85e32e4d49 Bug 927740 (part 2) - Make about:memory's "Minimize Memory Usage" button affect child processes, like the "GC" and "CC" buttons. r=khuey.
--HG--
extra : rebase_source : 555f0e6ca11caa73e33f48a941ee119181c28b74
2013-12-02 20:07:02 -08:00
Nicholas Nethercote
8aa18001f7 Bug 929797 - Implement proper memory reporting for child processes. r=khuey.
--HG--
extra : rebase_source : f0788757afc2097830295170120e1e2094993cc7
2013-10-22 22:26:24 -07:00
Nicholas Nethercote
652e854b1c Bug 930851 (part 4) - Prepare aboutMemory.js for asynchronous memory report processing. r=khuey. 2013-10-15 18:08:35 -07:00
Nicholas Nethercote
6796f7febc Bug 930851 (part 2) - Inline some functions in aboutMemory.js that have a single call site. r=johns.
--HG--
extra : rebase_source : 8b669e495ffcd6cab292767abf5b85cca3eb14f5
2013-10-15 17:16:13 -07:00
Nicholas Nethercote
498ce38434 Bug 929826 - Improve about:memory's UI for the multi-process case. r=johns.
--HG--
extra : rebase_source : c248a0127c7d160fc0016dabca1f3561233a577c
2013-10-22 22:27:58 -07:00
Nathan Froyd
2041bb5c1a Bug 924638 - use Services.jsm more in about:memory; r=njn 2013-10-08 16:28:21 -04:00
Nicholas Nethercote
dc5c29f71c Bug 913260 (part 4) - Use distinguished amounts for all the memory measurements done by telemetry. r=mccr8.
CLOSED TREE
2013-09-19 15:52:30 -07:00
Nicholas Nethercote
952691a40d Bug 913260 (part 3) - Formalize the concept of "distinguished amounts" in the memory reporter manager. r=mccr8. 2013-09-19 15:52:28 -07:00
Phil Ringnalda
12216d4f00 Backed out 3 changesets (bug 913260)
CLOSED TREE

Backed out changeset 9195be8a50cb (bug 913260)
Backed out changeset 09c71a3e7b85 (bug 913260)
Backed out changeset 8a8691a26012 (bug 913260)
2013-09-24 20:31:00 -07:00
Nicholas Nethercote
a51a1d18a4 Bug 913260 (part 4) - Use distinguished amounts for all the memory measurements done by telemetry. r=mccr8.
--HG--
extra : rebase_source : 0e9db51b137770ba7db15a99a4ec1e87071d2f47
2013-09-19 15:52:30 -07:00
Nicholas Nethercote
426445c26e Bug 913260 (part 3) - Formalize the concept of "distinguished amounts" in the memory reporter manager. r=mccr8.
--HG--
extra : rebase_source : cc6f50d85f384ed665d44b2e8850618fd8a56fa5
2013-09-19 15:52:28 -07:00