Граф коммитов

68 Коммитов

Автор SHA1 Сообщение Дата
Nika Layzell 71760158e8 Bug 1414974 - Part 5: Rework nsWindowMemoryReporter to only examine inner windows, r=mccr8
MozReview-Commit-ID: 3be0C8OXSKo
2017-11-09 10:44:48 -05:00
Eric Rahm c50f041b28 Bug 1376038 - Part 3: Combine ghost window reporter with window reporter. r=njn
This combines the GhostWindowsReporter with the nsWindowMemoryReporter. It has
the benefit of removing a reporter of a single value and also guarantees that
we use the latests ghost windows value that is calculated in
|nsWindowMemoryReporter::CollectReports| rather than a possibly cached value
from a previous run.

--HG--
extra : histedit_source : bef59afe7b79cae8050460ee1bdc4247daebc21f
2017-09-06 16:06:58 -07:00
Eric Rahm 197f29015a Bug 1376038 - Part 1: Use a cached ghost window value for the distinguished amount. r=mccr8
We already periodically calculate the ghost window amount after cycle
collection, this just uses a cached value of that for the distinguished amount.
This avoids the overhead of a recalculating the value when reporting telemetry.

--HG--
extra : histedit_source : 4ba3ee62fd2871a87970faca8a70b2284e83981d%2C9246ac39cea50c3bb0d1693d8e831c3b3ad33ad9
2017-07-11 13:58:20 -07:00
Nicholas Nethercote 9ab2597a8d Bug 1387956 (part 2) - Overhaul handling of nsWindowSizes. r=mccr8.
This patch does the following.

- Moves nsWindowSizes from nsWindowMemoryReporter.h to its own file,
  nsWindowSizes.h, so it can be included more widely without exposing
  nsWindowMemoryReporter.

- Merges nsArenaMemoryStats.h (which defines nsTabSizes and nsArenaMemoryStats)
  into nsWindowSizes.h.

- Renames nsArenaMemoryStats as nsArenaSizes, and nsWindowSizes::mArenaStats as
  nsWindowSizes::mArenaSizes. This is the more usual naming scheme for such
  types.

- Renames FRAME_ID_STAT_FIELD as NS_ARENA_SIZES_FIELD.

- Passes nsWindowSizes to PresShell::AddSizeOfIncludingThis() and
  nsPresArena::AddSizeOfExcludingThis(), instead of a bunch of smaller things.
  One nice consequence is that the odd nsArenaMemoryStats::mOther field is no
  longer necessary, because we can update nsWindowSizes::mLayoutPresShellSize
  directly in nsPresArena::AddSizeOfExcludingThis().

- Adds |const| to a few methods.

MozReview-Commit-ID: EpgFWKFqy7Y
2017-08-10 14:14:09 +10:00
Ryan VanderMeulen cc7a4548cc Backed out 3 changesets (bug 1376038) to see if it affects the ghost window numbers in bug 1388111.
Backed out changeset b89df6ea668a (bug 1376038)
Backed out changeset ae6472c17577 (bug 1376038)
Backed out changeset 8c99b4e8e6c1 (bug 1376038)
2017-08-07 21:11:42 -04:00
Nicholas Nethercote 49eb219ff5 Bug 1383982 (attempt 2) - Introduce a general mechanism for measuring memory usage of graph-like structures. r=erahm.
--HG--
extra : rebase_source : 7075f9570a4262158351ce9ac3ca8360ea4d5394
2017-07-28 20:10:04 +10:00
Sebastian Hengst 9077ac8886 Backed out changeset a57d8f30d1bf (bug 1383982) for build bustage at nsGlobalWindow.cpp:13826: 'class nsWindowSizes' has no member named 'mMallocSizeOf'. r=backout 2017-07-28 09:50:48 +02:00
Nicholas Nethercote 5c3abe8aab Bug 1383982 - Introduce a general mechanism for measuring memory usage of graph-like structures. r=erahm.
All the SizeOf{In,Ex}cludingThis() functions take a MallocSizeOf function
which measures memory blocks. This patch introduces a new type, SizeOfState,
which includes a MallocSizeOf function *and* a table of already-measured
pointers, called SeenPtrs. This gives us a general mechanism to measure
graph-like data structures, by recording which nodes have already been
measured. (This approach is used in a number of existing reporters, but not in
a uniform fashion.)

The patch also converts the window memory reporting to use SizeOfState in a lot
of places, all the way through to the measurement of Elements. This is a
precursor for bug 1383977 which will measure Stylo elements, which involve
Arcs.

The patch also converts the existing mAlreadyMeasuredOrphanTrees table in the
OrphanReporter to use the new mechanism.

--HG--
extra : rebase_source : 2c23285f8b6c3b667560a9d14014efc4633aed51
2017-07-28 15:03:44 +10:00
Andrea Marchesini d06ba4ca6f Bug 1382768 - Performance API must be a memory reporter, r=bz 2017-07-27 09:05:51 +02:00
Eric Rahm 3862a0db5c Bug 1376038 - Part 3: Combine ghost window reporter with window reporter. r=njn
This combines the GhostWindowsReporter with the nsWindowMemoryReporter. It has
the benefit of removing a reporter of a single value and also guarantees that
we use the latests ghost windows value that is calculated in
|nsWindowMemoryReporter::CollectReports| rather than a possibly cached value
from a previous run.
2017-07-11 13:58:23 -07:00
Eric Rahm 0dc3c70d24 Bug 1376038 - Part 1: Use a cached ghost window value for the distinguished amount. r=mccr8
We already periodically calculate the ghost window amount after cycle
collection, this just uses a cached value of that for the distinguished amount.
This avoids the overhead of a recalculating the value when reporting telemetry.
2017-07-11 13:58:20 -07:00
Jonathan Kew 20b8376ffd Bug 1368654 - pt 1 - Implement memory reporter support for FrameProperties. r=mats 2017-05-31 19:52:47 +01:00
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
Jonathan Watt b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Andrea Marchesini 8723eb439d Bug 1278816 - Move Performance API into dom/performance, r=smaug
--HG--
rename : dom/base/PerformanceEntry.cpp => dom/performance/PerformanceEntry.cpp
rename : dom/base/PerformanceEntry.h => dom/performance/PerformanceEntry.h
rename : dom/base/PerformanceMark.cpp => dom/performance/PerformanceMark.cpp
rename : dom/base/PerformanceMark.h => dom/performance/PerformanceMark.h
rename : dom/base/PerformanceMeasure.cpp => dom/performance/PerformanceMeasure.cpp
rename : dom/base/PerformanceMeasure.h => dom/performance/PerformanceMeasure.h
rename : dom/base/PerformanceObserver.cpp => dom/performance/PerformanceObserver.cpp
rename : dom/base/PerformanceObserver.h => dom/performance/PerformanceObserver.h
rename : dom/base/PerformanceObserverEntryList.cpp => dom/performance/PerformanceObserverEntryList.cpp
rename : dom/base/PerformanceObserverEntryList.h => dom/performance/PerformanceObserverEntryList.h
rename : dom/base/PerformanceResourceTiming.cpp => dom/performance/PerformanceResourceTiming.cpp
rename : dom/base/PerformanceResourceTiming.h => dom/performance/PerformanceResourceTiming.h
rename : dom/base/nsPerformance.cpp => dom/performance/nsPerformance.cpp
rename : dom/base/nsPerformance.h => dom/performance/nsPerformance.h
rename : dom/base/test/performance_observer.html => dom/performance/tests/performance_observer.html
rename : dom/base/test/test_performance_observer.html => dom/performance/tests/test_performance_observer.html
rename : dom/base/test/test_performance_observer.js => dom/performance/tests/test_performance_observer.js
rename : dom/base/test/test_performance_user_timing.html => dom/performance/tests/test_performance_user_timing.html
rename : dom/base/test/test_performance_user_timing.js => dom/performance/tests/test_performance_user_timing.js
2016-06-09 12:42:21 +02:00
Kyle Huey a1459ad2d7 Bug 1241763: Don't fire dom-window-destroyed on outer windows. r=bz 2016-01-22 10:27:54 -08:00
Andrea Marchesini e6f385fb3d Bug 1148527 - Indentation fix after bug 1145631, r=ehsan 2015-03-27 18:52:19 +00:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Ehsan Akhgari 961f45f728 Bug 1117264 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/base code; r=baku 2015-01-06 11:52:45 -05:00
Ehsan Akhgari 0653303071 Bug 1060987 - Fix more bad implicit constructors in DOM; r=baku
--HG--
extra : rebase_source : 01709017e97fdc96d1d53eb881efc1792118edc4
2014-09-01 20:49:25 -04:00
Phil Ringnalda 117bb1a341 Backed out 6 changesets (bug 1060982, bug 1061058, bug 1060987, bug 1061060, bug 1060930) for build bustage
CLOSED TREE

Backed out changeset c23b8418e6be (bug 1060987)
Backed out changeset a8cddc6bdffc (bug 1061060)
Backed out changeset b5af5cbdac3f (bug 1060982)
Backed out changeset 4912d451011a (bug 1060930)
Backed out changeset bdacbf453238 (bug 1061058)
Backed out changeset da6c71a8f5ae (bug 1060987)
2014-09-01 16:48:51 -07:00
Ehsan Akhgari 6c932dea6c Bug 1060987 - Fix more bad implicit constructors in DOM; r=baku 2014-09-01 18:00:53 -04:00
Benoit Jacob ec742680c8 Bug 1028588 - Fix dangerous public destructors in the rest of dom/ - r=ehsan 2014-06-23 15:56:07 -04: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
Jonathan Watt d7f9b418fd Bug 590790, part 1 - Add getTotalSize() methods to nsWindowSizes and nsArenaMemoryStats. r=njn 2014-05-08 10:52:13 +01:00
Andrew McCreight 2243646948 Bug 977940, part 2 - Don't automatically trigger the ghost window detector during ICC. r=smaug 2014-03-08 05:38:53 -08:00
Andrew McCreight 260d421e2f Bug 977940, part 1 - Don't run the ghost window detector more than every 45 seconds. r=smaug 2014-03-08 05:38:52 -08:00
Andrew McCreight 3a5c9d4829 Bug 978203 - Don't include nsWindowMemoryReporter.h in nsINode.h. r=smaug 2014-03-04 15:39:42 -08:00
Wes Kocher ea2ff28ca4 Backed out changeset 3f8a7062ad8d (bug 978203) for build bustage on a CLOSED TREE 2014-03-04 14:15:33 -08:00
Andrew McCreight 01a28066ae Bug 978203 - Don't include nsWindowMemoryReporter.h in nsINode.h. r=smaug 2014-03-04 13:33:44 -08:00
Andrew McCreight 798ec9614e Bug 966762 - Add chrome JS function to unlink ghost windows. r=smaug 2014-02-20 12:55:40 -08:00
Andrew McCreight 6c86943613 Backout bug 966762 for Valgrind leaks 2014-02-19 17:17:58 -08:00
Andrew McCreight 7cd422c324 Bug 966762 - Add chrome JS function to unlink ghost windows. r=smaug 2014-02-19 13:27:15 -08:00
Nicholas Nethercote 91175eb896 Bug 955942 (part 2) - Remove MemoryUniReporter. r=mccr8.
--HG--
extra : rebase_source : 9d70016cb19637ffece6409a184bf41d574cc6b4
2013-12-07 22:09:10 -08:00
Nathan Froyd 4e5308cf32 Bug 946781 - part 4 - revert measuring the proto and iface cache on nsGlobalWindow (bug 922094); r=me 2013-12-06 13:11:53 -05:00
Nathan Froyd cd5c4eb51e Bug 922094 - part 1 - report proto/iface cache size to about:memory; r=njn
This is just the nsWindowMemoryReporter bits; the actual measurements come later.
2013-11-21 09:13:31 -05:00
Nathan Froyd 9a334097ab Bug 937227 - zero-initialize fields in nsWindowSizes; r=njn 2013-11-11 14:18:49 -05:00
Birunthan Mohanathas 98f3b9652a Bug 784739 - Switch from NULL to nullptr in dom/ (1/2); r=ehsan 2013-10-28 10:04:12 -04:00
Kyle Huey dd9f94690a Bug 904720: Count event listeners. r=njn,smaug 2013-10-28 17:47:18 +08:00
Nicholas Nethercote dac7e13e71 Bug 918207 - Support per-tab memory profiling. r=billm,mccr8,till,smaug,nfroyd.
--HG--
extra : rebase_source : 7603eaedbd761c6b231b1b911f719388864755e6
2013-10-22 14:53:26 -07: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 0069cbfda7 Bug 913260 (part 2) - Tweak ghost window reporters. r=mccr8. 2013-09-18 19:01:29 -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 7bdc4e988e Bug 913260 (part 2) - Tweak ghost window reporters. r=mccr8.
--HG--
extra : rebase_source : db98ac69096f942608ead78709265609593e85d6
2013-09-18 19:01:29 -07:00
Nicholas Nethercote 7983bb2a7f Bug 910517 (3rd attempt) - Remove nsIMemoryReporter, and rename nsIMemoryMultiReporter as nsIMemoryReporter. r=mmcr8.
--HG--
rename : content/canvas/src/WebGLMemoryMultiReporterWrapper.h => content/canvas/src/WebGLMemoryReporterWrapper.h
extra : rebase_source : 2b2a1b2667d6562fcf803ec48b4a8c10fdd519a3
2013-08-27 16:24:51 -07:00
Nicholas Nethercote 12d6eb61be Bug 831193 (part 21) - Make NumGhostsReporter a subclass of MemoryReporterBase. r=jlebar.
--HG--
extra : rebase_source : 8777a4dabebdb5928c200401445d7c29f5bf3bcb
2013-08-22 22:26:23 -07:00
Catalin Iacob 6f4758d23e Bug 798914 (part 5) - Use newly introduced mozilla::MallocSizeOf instead of nsMallocSizeOfFun. r=njn.
--HG--
extra : rebase_source : fc472490dd978d165f02f77ed37f07aed6e5bb61
2013-06-23 14:03:39 +02:00
Nicholas Nethercote 23f321407b Bug 826521 (part 2) - Report memory used by event targets, especially XHRs. r=bz.
--HG--
extra : rebase_source : 543f0e367ce73477d62eca544137a101108a97be
2013-01-17 21:21:43 -08:00
Ehsan Akhgari e368dc9c85 Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00