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

1265 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Kris Maglione 6aa06b33a7 Bug 1645510: Part 2 - Avoid using the unprivileged junk scope where possible. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D79720
2020-06-27 03:06:28 +00:00
Tom Schuster 4f64f475f2 Bug 1595046 - Make it possible to inspect every exception value in the web console. r=jonco,baku,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D64437
2020-05-08 20:54:17 +00:00
Steve Fink 3b17c8c75a Bug 1633176 - re-land incremental weakmap marking
Differential Revision: https://phabricator.services.mozilla.com/D74079
2020-05-06 16:38:33 +00:00
Steve Fink 685bd6c5b0 Backed out incremental weakmap marking (bug 1167452 and bug 1633176) to postpone until after Fx77
Differential Revision: https://phabricator.services.mozilla.com/D73394
2020-05-01 00:53:15 +00:00
Jon Coppeard 72eac88fe9 Bug 1633752 - Calculate non-incremental threshold based on heap size and increase it for smaller heaps r=sfink
This adds a splits the non-incremental threshold parameter into one for small heaps and one for large.  What counts as large and small are controlled by the existing parameters that were previously used for dynamic heap growth.  I also renamed the parameter from "non-incremental threshold" to "incremental limit".

The small heap parameter is increased to 1.4.  This avoids non-incremental GC on facebook and reddit as reported in the dependent bugs and allows us to remove the splay latency hack that was previously necessary.

Differential Revision: https://phabricator.services.mozilla.com/D72903
2020-04-29 07:45:19 +00:00
Jon Coppeard d92a182d73 Bug 1633457 - Rename some GC parameters for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D73012
2020-04-29 21:54:22 +00:00
Jon Coppeard 3f616ab772 Bug 1633405 - Remove dynamic GC options that are enabled everywhere r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D72696
2020-04-28 07:59:47 +00:00
Noemi Erli ccaad0ebc4 Backed out changeset 1fc50aa5c6bc (bug 1633405) for causing bustages in bigint.js CLOSED TREE 2020-04-28 13:49:51 +03:00
Jon Coppeard 896414dfa7 Bug 1633405 - Remove dynamic GC options that are enabled everywhere r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D72696
2020-04-28 07:59:47 +00:00
Sylvestre Ledru 34acbb653a Bug 1619165 - Reformat recent changes to the Google coding style r=andi
First reformat with clang-format 10

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D68802
2020-04-25 09:40:08 +00:00
Jon Coppeard b1f2f8e77a Bug 1630961 - Remove unused heurisitic to delaying GCs that may cause resets r=sfink
A while back we added a heuristic to delay a GC if it would cause a reset (bug 1367455), but it was turned off after it caused a performance regression and hasn't been reenabled since.

Telemetry shows that that only 0.2% of GCs get reset anyway so we should probably just remove this.

Depends on D71328

Differential Revision: https://phabricator.services.mozilla.com/D71329
2020-04-17 17:41:53 +00:00
Steve Fink 744c7084c2 Bug 1167452 - Add a pref to control incremental weakmap marking r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D64824

--HG--
extra : moz-landing-system : lando
2020-04-15 04:30:30 +00:00
Andreas Farre 9e36af2ab6 Bug 1620594 - Part 3: Use default target for timers using SystemGroup. r=nika
Depends on D67632

Differential Revision: https://phabricator.services.mozilla.com/D67633

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:46 +00:00
Andreas Farre 36eaf82163 Bug 1620594 - Part 2: Use SchedulerGroup::Dispatch instead of SystemGroup::Dispatch. r=nika
Depends on D67631

Differential Revision: https://phabricator.services.mozilla.com/D67632

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:33 +00:00
Tetsuharu OHZEKI 19cfb39679 Bug 1597442 - Remove the usage of nsIDocShellTreeItem from nsJSContext::MaybeRunNextCollectorSlice(). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D63609

--HG--
extra : moz-landing-system : lando
2020-03-31 11:57:02 +00:00
Jon Coppeard c1e3671c97 Bug 1624810 - Set the multi-zone JS holder flag on appropriate cycle collected classes r=mccr8
Set the flag on the affected classes, which are:
 - CallbackTimeoutHandler
 - nsJSArgArray
 - CallbackObject
 - Console
 - MessageEvent
 - IDBIndexCursor
 - ExtendableMessageEvent
 - JSPurpleBuffer

Differential Revision: https://phabricator.services.mozilla.com/D68196

--HG--
extra : moz-landing-system : lando
2020-03-26 10:49:06 +00:00
Sebastian Streich 2ed0dc6ea9 Bug 1620684 - Refactor nsJSEnv r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D66042

--HG--
extra : moz-landing-system : lando
2020-03-10 14:21:03 +00:00
Andrew McCreight d5d2276a11 Bug 1620623 - Ignore memory-pressure if we've begun to shut down. r=smaug
If we're in the middle of shutting down a content process, don't GC if we get a
memory pressure event. Shutting down the process is a better way to free memory!
This doesn't seem to happen much, presumably because once we've started
shutting down the content process we ignore new messages, like ones telling
us to do memory-pressure.

Differential Revision: https://phabricator.services.mozilla.com/D65755

--HG--
extra : moz-landing-system : lando
2020-03-06 20:57:08 +00:00
Andrew McCreight cb53fa9bf8 Bug 1619455 - Kill GC/CC timers on content-child-will-shutdown. r=smaug
Hopefully this will reduce the number of shutdown hangs in child processes.

Differential Revision: https://phabricator.services.mozilla.com/D65131

--HG--
extra : moz-landing-system : lando
2020-03-03 16:59:27 +00:00
Andrew McCreight 4babb2b5ab Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown
Patch by bhackett and jlaster. Also reviewed by mccr8.

Differential Revision: https://phabricator.services.mozilla.com/D60197

--HG--
extra : moz-landing-system : lando
2020-02-27 17:39:15 +00:00
Ciure Andrei 00dd87f6f4 Backed out changeset d407a28318e6 (bug 1609815) for causing windows ming bustages CLOSED TREE
--HG--
extra : histedit_source : b2c748e31e0f6ba8fcf9960a336e0bbd361b07e6
2020-02-27 07:05:19 +02:00
Andrew McCreight b197e1f783 Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown
Patch by bhackett and jlaster. Also reviewed by mccr8.

Differential Revision: https://phabricator.services.mozilla.com/D60197

--HG--
extra : moz-landing-system : lando
2020-02-27 04:43:48 +00:00
Simon Giesecke d94419173b Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/base. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D63102

--HG--
extra : moz-landing-system : lando
2020-02-21 10:41:47 +00:00
Nazım Can Altınova d8afe0647a Bug 1609708 - Rename PROFILER_TRACING to PROFILER_TRACING_MARKER. r=gerald
Depends on D60229

Differential Revision: https://phabricator.services.mozilla.com/D60231

--HG--
extra : moz-landing-system : lando
2020-01-17 21:29:15 +00:00
Chris Peterson 406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

Differential Revision: https://phabricator.services.mozilla.com/D56440

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
Jeff Walden 62a130ba0a Bug 1602882 - Move array operations to a new js/Array.h header. r=sfink,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D56595

--HG--
extra : moz-landing-system : lando
2019-12-11 06:17:44 +00:00
Jon Coppeard c64814f433 Bug 1600565 - Fix changes to CCRunnerFired made during previous refactoring r=mccr8
One thing I inadvertantly changed was that didDoWork gets set to true even if we don't call FireForgetSkippable and execute what was the third branch of the if statement:

https://searchfox.org/mozilla-central/rev/883d58bccf1a36465ef5ee14b62db0a9925ab85b/dom/base/nsJSEnvironment.cpp#1878-1883

Differential Revision: https://phabricator.services.mozilla.com/D56021

--HG--
extra : moz-landing-system : lando
2019-12-05 18:14:12 +00:00
Gabriele Svelto ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55442

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Dorel Luca a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55442

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
Jon Coppeard 59a54ab596 Bug 1599445 - Refactor CCRunnerFired function by writing it as a state machine r=mccr8
This makes the function into a state machine implemented with a switch statement and gets rid of the recursive call. This results in a little duplication of logic but hopefully it is easier to understand overall. What do you think?

Differential Revision: https://phabricator.services.mozilla.com/D54750

--HG--
extra : moz-landing-system : lando
2019-11-27 10:18:17 +00:00
Doug Thayer 97c5d40384 Bug 1586920 - Sometimes include dynamic string of label frames in BHR r=nika
This adds two AUTO_PROFILER_LABEL_DYNAMIC_... macros and updates select
usages of the old macros to use the new ones. These new macros cause
the dynamic string of the label to be included in BHR stacks.

We don't want to do this all of the time, as in many cases we may not
be interested enough in the dynamic string or it may be sensitive
information, but it is rather important information for certain cases.

This uses the same buffer that we use for the strings for JS frames,
and if we fail to fit into that buffer we just append the raw label.

If the string is too long for our static buffer (128 bytes), we just
leave it truncated, as it should be stable and we may be able to infer
from the truncated form what the full form would be.

Differential Revision: https://phabricator.services.mozilla.com/D51665

--HG--
extra : moz-landing-system : lando
2019-11-11 20:27:44 +00:00
Jon Coppeard 902b013ad7 Bug 1592598 - Ensure CC selected zones are scheduled for GC r=sfink,mccr8
The problem is that a GC can be triggered in a number of ways, so scheduling zones in nsJSContext::GarbageCollectNow is not effective. This patch schedules these zones in the GC callback, which is always called at the start of GC. This means we have to change the internal logic slightly to allow the GC callback to schedule addional zones; previously this state was saved and restored before/after running the callback.

Differential Revision: https://phabricator.services.mozilla.com/D51145

--HG--
extra : moz-landing-system : lando
2019-10-30 21:39:07 +00:00
Jon Coppeard 54bb6cf850 Bug 1585697 - Refactor nsJSContext::EndCycleCollectionCallback to split out telemetry and logging code into CycleCollectorStats methods r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D47922

--HG--
extra : moz-landing-system : lando
2019-10-02 17:19:24 +00:00
Jon Coppeard 0485aa7053 Bug 1585697 - Move forget skippable stats into CycleCollectorStats class r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D47920

--HG--
extra : moz-landing-system : lando
2019-10-02 17:19:09 +00:00
Jon Coppeard 53ac617cd2 Bug 1585697 - Make CycleCollectorStats instance static for consistency with other globals r=mccr8
I'm not sure what if there's a preference either way, but all the other globals in nsJSEnvironement.cpp are static so I made the CycleCollectorStats global static too.

Differential Revision: https://phabricator.services.mozilla.com/D47919

--HG--
extra : moz-landing-system : lando
2019-10-02 17:19:00 +00:00
Jon Coppeard acce9ba546 Bug 1585697 - Move CycleCollectorStats definition to the top of the file r=mccr8
This needs to be defined before FireForgetSkippable for the subsequnt patches.

Differential Revision: https://phabricator.services.mozilla.com/D47918

--HG--
extra : moz-landing-system : lando
2019-10-02 17:18:44 +00:00
Jon Coppeard 7630259d43 Bug 1580883 - Use TimeDuration for CycleCollectorStats members r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D45697

--HG--
extra : moz-landing-system : lando
2019-09-18 12:48:46 +00:00
Jon Coppeard f326bb945c Bug 1580883 - Use TimeDuration for remaining global in nsJSEnvironment.cpp r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D45696

--HG--
extra : moz-landing-system : lando
2019-09-18 12:48:32 +00:00
Jon Coppeard 99e7fae124 Bug 1580883 - Use TimeDuration for constants in nsJSEnvironment.cpp r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D45695

--HG--
extra : moz-landing-system : lando
2019-09-18 12:48:23 +00:00
Jon Coppeard 559e2c332d Bug 1580883 - Use TimeStamp/TimeDuration APIs instead of PRTime/PR_Now() in nsJSEnvironment.cpp r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D45693

--HG--
extra : moz-landing-system : lando
2019-09-18 12:48:09 +00:00
Karl Tomlinson 8361c71fb3 Bug 1578623 add stack support to AsyncErrorReporter r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D44608

--HG--
extra : moz-landing-system : lando
2019-09-09 00:41:46 +00:00
Jon Coppeard 0de32dc6cd Bug 1580474 - Replace #defines with constants in nsJSEnvironment files r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D45531

--HG--
extra : moz-landing-system : lando
2019-09-12 09:56:52 +00:00
Noemi Erli d988a687b9 Backed out 9 changesets (bug 1578623) for causing Windows build bustages CLOSED TREE
Backed out changeset 52a86c60c866 (bug 1578623)
Backed out changeset e4fddd3d24b4 (bug 1578623)
Backed out changeset 65a7c4daec27 (bug 1578623)
Backed out changeset 3badf9215788 (bug 1578623)
Backed out changeset 71e58ee8f684 (bug 1578623)
Backed out changeset 0128e12a910f (bug 1578623)
Backed out changeset 8242877392bd (bug 1578623)
Backed out changeset 6d7be8a22f8b (bug 1578623)
Backed out changeset 3be609a9be36 (bug 1578623)

--HG--
extra : amend_source : b76d374926d247982773b58d12cb26e33d9972e8
2019-09-09 03:37:09 +03:00
Karl Tomlinson dcc752541e Bug 1578623 add stack support to AsyncErrorReporter r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D44608

--HG--
extra : moz-landing-system : lando
2019-09-06 02:10:32 +00:00
Jon Coppeard 335ff4bf5d Bug 1518138 - Make RunNextCollectorTimer trigger full GCs to address out of memory errors running JS reftests r=smaug
This doesn't fix the underlying problem but makes RunNextCollectorTimer more aggressive in what it does. Testing shows this substantially reduces the max GC heap size while running these tests as well as vsize and RSS. Hopefully this will fix the problem with the tests failing while we work out a good solution for the underlying issue.

Differential Revision: https://phabricator.services.mozilla.com/D44378

--HG--
extra : moz-landing-system : lando
2019-09-03 12:21:45 +00:00
Andrew Creskey 7134be5031 Bug 1575938 Convert dom/JSEnvironment GC timing constants to StaticPref r=edgar
Converted the following to StaticPrefs so that we can easily test variations:

NS_GC_DELAY
NS_SHRINK_GC_BUFFERS_DELAY
NS_FIRST_GC_DELAY
NS_FULL_GC_DELAY
NS_INTERSLICE_GC_DELAY

NS_USER_INTERACTION_INTERVAL

Differential Revision: https://phabricator.services.mozilla.com/D43112

--HG--
extra : moz-landing-system : lando
2019-08-26 15:51:01 +00:00
Jon Coppeard 992d6b6ce5 Bug 1570905 - Rework the GC triggers to make the incremental trigger the default and the non-incremental trigger some factor of this r=sfink?
Differential Revision: https://phabricator.services.mozilla.com/D41606

--HG--
extra : moz-landing-system : lando
2019-08-13 08:40:36 +00:00
Jon Coppeard 2d89bbf3df Bug 1569564 - Remove the original malloc counter infrastructure r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D39735

--HG--
extra : moz-landing-system : lando
2019-07-31 09:13:36 +00:00