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

86 Коммитов

Автор SHA1 Сообщение Дата
Kris Maglione 6423b7be40 Bug 1476405: Part 5 - Create nsThread wrapper and use reasonable stack size for BackgroundHangMonitor. r=erahm
BackgroundHangMonitor is a special snowflake, and uses PR_CreateThread
directly, for some reason.

MozReview-Commit-ID: 2Qg28EqDwM7

--HG--
extra : rebase_source : b59ac1b42ae283a1bcabe4e24ac3df92a11de6e2
extra : intermediate-source : 771288dbf8529d45786b42a21dc66b180bb674ca
extra : source : b2a99f50e642cc3dc41ab540e7639d2c39bbe75b
2018-07-20 13:31:14 -07:00
Cosmin Sabou 778ca4f84f Backed out 8 changesets (bug 1476405) for causing frequent failures in bug 1479022. a=backout
Backed out changeset ad1674e9152d (bug 1476405)
Backed out changeset e0a021b27d2c (bug 1476405)
Backed out changeset 771288dbf852 (bug 1476405)
Backed out changeset aeebad4f2dc3 (bug 1476405)
Backed out changeset 4831cbfd03de (bug 1476405)
Backed out changeset 0b0c243a1827 (bug 1476405)
Backed out changeset 236b366fdf37 (bug 1476405)
Backed out changeset c767b1b618fb (bug 1476405)
2018-07-28 01:25:25 +03:00
Kris Maglione 17c3f2e113 Bug 1476405: Part 5 - Create nsThread wrapper and use reasonable stack size for BackgroundHangMonitor. r=erahm
BackgroundHangMonitor is a special snowflake, and uses PR_CreateThread
directly, for some reason.

MozReview-Commit-ID: 2Qg28EqDwM7

--HG--
extra : source : b2a99f50e642cc3dc41ab540e7639d2c39bbe75b
extra : histedit_source : 603bd726eafdb53aaafd98337b41da1259464cc7
2018-07-20 13:31:14 -07:00
Coroiu Cristina 6d037d0cba Backed out 9 changesets (bug 1476405) for causing leaks
Backed out changeset 4113d6fb3c1c (bug 1476405)
Backed out changeset cb7f7cc32687 (bug 1476405)
Backed out changeset 6d18a8bd5ee3 (bug 1476405)
Backed out changeset b2a99f50e642 (bug 1476405)
Backed out changeset b5b9d295545d (bug 1476405)
Backed out changeset f092a32a3639 (bug 1476405)
Backed out changeset 6c154f4d9dd9 (bug 1476405)
Backed out changeset d0ebb3aa8e0f (bug 1476405)
Backed out changeset 06b8093ddc6a (bug 1476405)
2018-07-27 08:56:36 +03:00
Kris Maglione b31ab147b7 Bug 1476405: Part 5 - Create nsThread wrapper and use reasonable stack size for BackgroundHangMonitor. r=erahm
BackgroundHangMonitor is a special snowflake, and uses PR_CreateThread
directly, for some reason.

MozReview-Commit-ID: 2Qg28EqDwM7

--HG--
extra : rebase_source : dd924decb23d1d8107eb317be5d2ac1b92328408
2018-07-20 13:31:14 -07:00
Brian Hackett 9f0fe229f0 Bug 1465294 Part 12 - Don't create background hang thread in middleman processes, r=froydnj.
--HG--
extra : rebase_source : 87f94ca6f8da17fcc4229c1b57ddd998a8b83509
2018-07-23 14:56:42 +00:00
Nathan Froyd 6026bc4fec Bug 1471347 - part 2 - store an nsCString for SharedLibrary::mBreakpadId; r=njn
Similar to the previous part, we convert mBreakpadId to an nsCString to
avoid issues with locale-dependent std::string operations.

There are a lot of non-profiler changes here because a bunch of things
depend on the SharedLibrary object that the profiler defines.
2018-07-19 10:32:07 -04:00
Doug Thayer 10ff9c706f Bug 1448040 - Remove HangMonitor/ChromeHangs r=Nika
Fairly straightforward, just a blanket removal. Haven't heard
anything on dev-platform or fx-data-dev regarding this removal,
so I think it's likely safe to remove on Nightly, and we can
revert if anyone makes a fuss.

As part of removing the HangMonitor, I renamed a few things and
reorganized the namespaces to not depend on a HangMonitor
namespace. Hopefully this doesn't produce too much noise in the
diff, it just seemed appropriate to move everything around
rather than keep dangling vestiges of the old system.

MozReview-Commit-ID: 8C8NFnOP5GU

--HG--
extra : rebase_source : dd000a05bfc2da40c586644d33ca4508fa5330f6
2018-04-29 18:21:20 -07:00
Andrew McCreight 7a7fa7e3d7 Bug 1467549 - Disable the BackgroundHangReporter in ASan builds. r=Nika
This is causing LSan leaks which don't have an easy fix, and we're
already not running it in debug builds, so it can't hurt too much.

MozReview-Commit-ID: I8nDnWIz9qr

--HG--
extra : rebase_source : 9ce513df2db60aa6a31c97ce7dcf6db54b5d160b
2018-06-07 12:32:57 -07:00
Dorel Luca 2bc18183da Backed out changeset bad278043bc9 (bug 1467549) for build bustage on asan builds. CLOSED TREE 2018-06-20 01:50:38 +03:00
Andrew McCreight 690e18b261 Bug 1467549 - Disable the BackgroundHangReporter in ASan builds. r=Nika
This is causing LSan leaks which don't have an easy fix, and we're
already not running it in debug builds, so it can't hurt too much.

MozReview-Commit-ID: I8nDnWIz9qr

--HG--
extra : rebase_source : 151ca17541860f91bebbe2c795a3f5aac89cd1f0
2018-06-07 12:32:57 -07:00
Cosmin Sabou 0f45148664 Backed out changeset 531593bacc4e (bug 1448040) for Android build bustages on HangAnnotations.h. CLOSED TREE
--HG--
extra : rebase_source : ea3618023c548a8ca6ca14749633c194606af52f
2018-06-07 19:22:31 +03:00
Doug Thayer 87bf13e093 Bug 1448040 - Remove HangMonitor/ChromeHangs r=Nika
Fairly straightforward, just a blanket removal. Haven't heard
anything on dev-platform or fx-data-dev regarding this removal,
so I think it's likely safe to remove on Nightly, and we can
revert if anyone makes a fuss.

As part of removing the HangMonitor, I renamed a few things and
reorganized the namespaces to not depend on a HangMonitor
namespace. Hopefully this doesn't produce too much noise in the
diff, it just seemed appropriate to move everything around
rather than keep dangling vestiges of the old system.

MozReview-Commit-ID: 8C8NFnOP5GU

--HG--
extra : rebase_source : 59e4a6ced7d14d2a01c0b79e944078ea84cae523
2018-04-29 18:21:20 -07:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Dorel Luca d54a3b06aa Backed out changeset da12c077747f (bug 1448040) for Android build bustage on build/src/obj-firefox/dist/include/mozilla/HangAnnotations.h. CLOSED TREE
--HG--
extra : amend_source : 683201b5a47af3cb7fdcb7426c65f1c9ed713186
2018-05-25 20:13:26 +03:00
Doug Thayer 9765bdd0e0 Bug 1448040 - Remove HangMonitor/ChromeHangs r=Nika
Fairly straightforward, just a blanket removal. Haven't heard
anything on dev-platform or fx-data-dev regarding this removal,
so I think it's likely safe to remove on Nightly, and we can
revert if anyone makes a fuss.

As part of removing the HangMonitor, I renamed a few things and
reorganized the namespaces to not depend on a HangMonitor
namespace. Hopefully this doesn't produce too much noise in the
diff, it just seemed appropriate to move everything around
rather than keep dangling vestiges of the old system.

MozReview-Commit-ID: 8C8NFnOP5GU

--HG--
extra : rebase_source : a8840bd26f4b01b756ffa72345ababb625048550
2018-04-29 18:21:20 -07:00
Markus Stange 68470bc3c0 Bug 1461555 - Rename PseudoStack to ProfilingStack. r=njn
This also changes many references to the 'pseudo stack' to refer to the 'label
stack' instead. The label stack is one of the two stacks that are managed by
the profiling stack, the other stack being the JS interpreter stack.

MozReview-Commit-ID: Ed0YMMeCBY8

--HG--
extra : rebase_source : 5675d670f424c7d7dda04bafc2b3431fa2485e3c
2018-05-15 01:03:11 -04:00
Markus Stange 633ac66e7f Bug 1461555 - Rename ProfileEntry to ProfilingStackFrame. r=njn
The term "entry" is already used for elements in the profile buffer.

MozReview-Commit-ID: 1aB22V6veQh

--HG--
extra : rebase_source : c664eb4d6bed6cb74ba8a1b67ea99bd8ca57bcf7
extra : source : 3264c0cc0027b240b55bd3aebf27263b1e1d1cc0
2018-05-15 01:14:03 -04:00
Markus Stange 818ad4ea69 Bug 1461053 - Rename Cpp frames to label frames in the ProfilingStack. r=njn
The name Cpp was confusing, because C++ functions are in the native stack, not
in the pseudo stack. The pseudo stack only contains frames for manually
instrumented code that uses AutoProfilerLabel, and JS frames.

MozReview-Commit-ID: 9ptfhREo0qy

--HG--
extra : rebase_source : 76a1a32acb4c946aeb2ad45e904e419c1c9e2ad1
2018-05-14 23:21:29 -04:00
Kris Maglione a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Nika Layzell 0c3ba13e4c Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj 2018-04-10 17:49:47 -04:00
Doug Thayer 27726e9fdd Bug 1443688 - Ensure NotifyWait doesn't result in indefinite hangs r=mystor
If we enter a hang through the normal timed loop of RunMonitorThread, and then
call NotifyWait, it will result in a hang with an indefinite duration being
reported once NotifyActivity is called again.

MozReview-Commit-ID: 4vUip65L0qo

--HG--
extra : rebase_source : f65e7461c00deb501b4a066150b74df684db5871
2018-03-18 09:28:17 -07:00
Julian Seward 7258d29b3b Bug 1442603 - Background Hang Reporter: increase timeouts when running on Valgrind. r=mystor.
--HG--
extra : rebase_source : 94fe50d6e7a2df501ca05cd3327d51b560e1e4e4
2018-03-13 08:42:43 +01:00
Julian Seward 84ca5e70ae Bug 1443499 - Background Hang Reporter: use only one thread for unwinding and reporting. r=mystor.
When the BHR wants to report a tardy thread, it hands off the work of
getting a stacktrace to a helper thread.  The helper threads used are in the
Stream Transport Service threadpool, which has a default limit of 25
threads.

This has a bad effect when we are in a severely compute-resource constrained
situation.  Then, many threads will be late, and up to 25 STS worker threads
will be employed to do unwinding, a potentially expensive operation.  This
further restricts the compute resources available to progress the rest of
the system.

Another effect is that the unwinder work will compete against the "real" STS
work for the 25 workers, potentially further slowing forward progress.

This patch replaces the use of the STS thread pool with a single nsThread
dedicated to unwinding/reporting hangs.

--HG--
extra : rebase_source : 0486be970633512e46ac030c5373ed7dfa0e7cb3
2018-03-12 11:11:24 +01:00
Andrew McCreight 5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Kris Maglione 918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou 9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione 6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Nika Layzell 793a39c213 Bug 1424766 - Simplify `HangStack` and `HangDetails` by implementing using ipdl structs and unions, r=froydnj
MozReview-Commit-ID: qlBUnvYams
2018-01-16 14:07:38 -05:00
Nika Layzell 711253f99f Bug 1430850 - Part 4: Rework BHR's profiler marker to use add_marker_for_thread, r=mstange
MozReview-Commit-ID: BivFEJD2KCY
2018-01-16 14:07:30 -05:00
Alexandre Poirot f572e41c43 Bug 1423890 - Add markers for background hangs r=dthayer,mstange
MozReview-Commit-ID: 484UZEbbd12

--HG--
extra : rebase_source : f739ce23944205cb88e8ea40289c8de6f07d1034
2017-12-07 02:35:36 -08:00
Ashwin Patil 0242ac618e Bug 1410101 - Replace "Preferences::GetBool("toolkit.telemetry.enabled")" with "Telemetry::CanRecordPrereleaseData()" in BackgroundHangMonitor.cpp to determine if it needs to be enabled or not. r=chutten
Indicates whether Telemetry pre-release data recording is turned on. Tends to be true on pre-release channels. Also, this attribute is read-only. @see nsITelemetry.canRecordPrereleaseData.

--HG--
extra : rebase_source : a437a62ea427ada3bd3b6e63beec2033b2500e9b
2018-01-04 00:30:56 +05:30
Florian Quèze 0f55cd45be Bug 1421992 - script-generated patch to replace do_execute_soon, do_print and do_register_cleanup with executeSoon, info and registerCleanupFunction, rs=Gijs. 2017-12-21 11:10:23 +01:00
Alessio Placitelli 8797549cde Bug 1406392 - Make nsITelemetry.canRecordExtended true on pre release channels. r=chutten
MozReview-Commit-ID: 2FR5dekXbeV

--HG--
extra : rebase_source : c4b5f8cb1ed11b597c9925fe05303f347fb9cd2e
2017-10-16 12:28:38 +02:00
Nicholas Nethercote 8a68e6fb83 Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange.
Currently the Gecko Profiler defines a moderate amount of stuff when
MOZ_GECKO_PROFILER is undefined. It also #includes various headers, including
JS ones. This is making it difficult to separate Gecko's media stack for
inclusion in Servo.

This patch greatly simplifies how things are exposed. The starting point is:

- GeckoProfiler.h can be #included unconditionally;

- everything else from the profiler must be guarded by MOZ_GECKO_PROFILER.

In practice this introduces way too many #ifdefs, so the patch loosens it by
adding no-op macros for a number of the most common operations.

The net result is that #ifdefs and macros are used a bit more, but almost
nothing is exposed in non-MOZ_GECKO_PROFILER builds (including
ProfilerMarkerPayload.h and GeckoProfiler.h), and understanding what is exposed
is much simpler than before.

Note also that in BHR, ThreadStackHelper is now entirely absent in
non-MOZ_GECKO_PROFILER builds.
2017-10-04 09:11:18 +11:00
Nicholas Nethercote e3c9cbb969 Bug 1401813 - Rename Null[C]String() as Void[C]String(). r=erahm.
XPCOM's string API doesn't have the notion of a "null string". But it does have
the notion of a "void string" (or "voided string"), and that's what these
functions are returning. So the names should reflect that.

--HG--
extra : rebase_source : 4e3f982e0873877174a08a25413595ff66f7d20e
2017-09-22 14:35:46 +10:00
Michael Layzell eb8ee79616 Bug 1401685 - Don't skip sending BHR ping if it is empty, r=froydnj 2017-09-20 17:07:02 -04:00
Michael Layzell 3cb7b23c33 Bug 1391126 - Guard use of shared-libraries.h in HangStack.cpp behind MOZ_GECKO_PROFILER, r=froydnj 2017-09-14 11:00:06 -04:00
Michael Layzell 6e8114439a Bug 1389235 - Submit the bhr ping at least once a day, r=froydnj 2017-09-13 11:45:48 -04:00
Doug Thayer 8aae071723 Bug 1382440 - Watch CPU usage in BHR r=froydnj
We would like to be able to see if a given hang in BHR occurred
under high CPU load, as this is an indication that the hang is
of less use to us, since it's likely that the external CPU use
is more responsible for it.

The way this works is fairly simple. We get the system CPU usage
on a scale from 0 to 1, and we get the current process's CPU
usage, also on a scale from 0 to 1, and we subtract the latter
from the former. We then compare this value to a threshold, which
is 1 - (1 / p), where p is the number of (virtual) cores on the
machine. This threshold might need to be tuned, so that we
require an entire physical core in order to not annotate the hang,
but for now it seemed the most reasonable line in the sand.

I should note that this considers CPU usage in child or parent
processes as external. While we are responsible for that CPU usage,
it still indicates that the stack we receive from BHR is of little
value to us, since the source of the actual hang is external to
that stack.

MozReview-Commit-ID: JkG53zq1MdY

--HG--
extra : rebase_source : 16553a9b5eac0a73cd1619c6ee01fa177ca60e58
2017-07-24 13:46:09 -07:00
Michael Layzell 9ed090fe94 Bug 1394494 - Use a custom Frame::Kind for special BHR frame types, r=froydnj 2017-09-01 11:47:08 -04:00
Michael Layzell c77fa9af3c Bug 1385316 - Include remoteType in BHR ping, r=froydnj 2017-08-30 12:04:16 -04:00
Michael Layzell aa4bf37c97 Bug 1385366 - Include timeSinceLastPing in BHR ping payload, data-r=rweiss, r=froydnj 2017-08-30 12:04:11 -04:00
Michael Layzell 31dbe34453 Bug 1394331 - Check allocation of hang stack vector, r=froydnj 2017-08-29 13:16:30 -04:00
Michael Layzell 758b95927c Bug 1393915 - Deduplicate consecutive (content script) frames, r=froydnj 2017-08-28 13:17:29 -04:00
Michael Layzell e3a6c83f03 Bug 1390585 - Check the state of BHRTelemetryService in test_BHRObserver.js, r=froydnj 2017-08-24 16:58:27 -04:00