This patch bases on the work of krystalyang2 with minor bug fixes.
The patch includes several major parts,
1. mark nursery strings pointed by tenured strings as
non-deduplicatable,
2. deduplicate strings when they are moved to tenured from nursery, and
3. adjust dependent strings to correct their pointers to the base
string and external buffer after tenuring.
4. reorder store buffer processing to trace the string whole cell buffer
first, since strings traced through the whole cell buffer need to be marked
non-deduplicatable.
(Part 4 was originally phabricator D77715 but is now merged in here.)
Differential Revision: https://phabricator.services.mozilla.com/D74366
Three of the about:memory tests have failures when they are run locally. In all
three cases it is due to the tests expecting a socket process that isn't
present. On automation the tests succeed with or without the socket process
code.
Bug 1515390 introduced the socket process code. These tests now run as "1proc"
tests, which might explain why this socket process code is no longer necessary.
This commit removes the socket process code, which means the tests now succeed
when run locally. No change is seen on automation, where the tests still pass.
Differential Revision: https://phabricator.services.mozilla.com/D73582
In the tests we now explicitly use "Main Process" (or similar) for the process
name in various places to avoid having to filter out a PID.
Also in `test_aboutmemory[34].xhtml`, the main process entries now appear
first, as they should, because the sorting code now looks for a "Main Process"
prefix, rather than an exact match.
Depends on D72995
Differential Revision: https://phabricator.services.mozilla.com/D73164
This is modelled on the corresponding code in
`RDDParent::RecvRequestMemoryReport()`.
Also rename it `Socket` to match other content processes like `GPU` and `RDD`.
Differential Revision: https://phabricator.services.mozilla.com/D72995
This commit clarifies that only some OS-level allocations are covered; the old
wording made it sound like they all were.
It also moves the allocator-level allocations first in the list, because
they're more common.
Depends on D43842
Differential Revision: https://phabricator.services.mozilla.com/D69287
This patch uses the low memory resource notification facility to detect
scenarios where physical memory is running low without polling. This is a
significant change compared to the previous behavior which measured both
available virtual memory (only on 32-bit builds) and available commit space.
Since we're not trying to avoid OOMs anymore we don't save memory reports
anymore when hitting a low-memory condition.
Differential Revision: https://phabricator.services.mozilla.com/D50471
The arrows to jump to the next file aren't sticky but they wouldn't have been visible before this patch so I still think it's an incremental improvement.
Differential Revision: https://phabricator.services.mozilla.com/D39121
In Japanese (and Chinese?) locales the box-drawing chars may be twice the width
of ASCII chars, which messes up about:memory's layout. By explicitly specifying
the language and font-family, we increase the chance that single-width
box-drawing chars are used.
Differential Revision: https://phabricator.services.mozilla.com/D36287
Result of running:
$ mach eslint -funix toolkit/ | sed -Ee 's/:.+//' - | xargs sed -E \
-e 's/throw ((["`])[^"]+\2);/throw new Error(\1);/g' \
-e 's/throw ((["`])[^"]+\2 \+ [^ ";]+);/throw new Error(\1);/g' \
-e 's/throw \(/throw new Error(/g' -i
...and then reverting a couple of places where comments were touched,
as well as changes to toolkit/components/ctypes/tests/unit/test_jsctypes.js
that required expectation changes to
toolkit/components/ctypes/tests/chrome/test_ctypes.xul
Differential Revision: https://phabricator.services.mozilla.com/D27448
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8
This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:
ChromeUtils.import("resource://gre/modules/Services.jsm");
is approximately the same as the following, in the new model:
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs
This was done using the followng script:
https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16750
This normalizes thread IDs (tid) to use the form 'tid=NNN'. It also
normalizes threadpool numbers, for example 'Foo #1 (tid=1234)' is
mapped to 'Foo #N (tid=NNN)'.
This normalizes thread IDs (tid) to use the form 'tid=NNN'. It also
normalizes threadpool numbers, for example 'Foo #1 (tid=1234)' is
mapped to 'Foo #N (tid=NNN)'.