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

78 Коммитов

Автор SHA1 Сообщение Дата
Markus Stange abf5056ead Bug 1462784 - Remove EVENTS category. r=njn
Categories are useful to indicate: This much % of time was spent in this category.

The EVENTS category isn't a very good match for this. This category is currently
only set on labels of functions that handle the processing of an event. But
those functions are usually closer to the base of the stack, and the actual CPU
work during the processing of an event is usually in another category closer to
the top of the stack, e.g. in JS if we're running an event handler, or in LAYOUT
if we're hit testing the position of the event.

This changeset removes the EVENTS category and replaces all uses of it with the
OTHER category.

MozReview-Commit-ID: JPm5hQiBkvp

--HG--
extra : rebase_source : 66f8ee003d2f70111f4cff16d6e2d906ef4bf10b
2018-05-18 17:36:30 -04:00
Csoregi Natalia fc2ed6e92a Backed out 18 changesets (bug 1462784) for ESlint failure on FlameGraph.js:1297. CLOSED TREE
Backed out changeset 79556798ff9f (bug 1462784)
Backed out changeset 88321efb673b (bug 1462784)
Backed out changeset 7880f9dc7023 (bug 1462784)
Backed out changeset 71fe35fd1f7e (bug 1462784)
Backed out changeset a543b94b049a (bug 1462784)
Backed out changeset d1ca8b0f2221 (bug 1462784)
Backed out changeset 68eabfbf3c16 (bug 1462784)
Backed out changeset 34e71c789903 (bug 1462784)
Backed out changeset 6fe79d1ca1bd (bug 1462784)
Backed out changeset e5ad2e525ea9 (bug 1462784)
Backed out changeset 329645ff1e23 (bug 1462784)
Backed out changeset e09c38853172 (bug 1462784)
Backed out changeset 0663d1a6d2da (bug 1462784)
Backed out changeset 106967fc29d2 (bug 1462784)
Backed out changeset 99b4a433a8e5 (bug 1462784)
Backed out changeset 1d38a4cf5a4a (bug 1462784)
Backed out changeset 692017229de6 (bug 1462784)
Backed out changeset c2911a626671 (bug 1462784)
2018-06-01 23:42:00 +03:00
Markus Stange b2ddecd9e1 Bug 1462784 - Annotate idle stacks in the native event loop on macOS. r=spohl
MozReview-Commit-ID: HD48iBTT8EN

--HG--
extra : rebase_source : 9d3641085bd602bb9ccf92b0f439861217570373
2018-05-16 13:31:02 -04:00
Markus Stange be4332c903 Bug 1462784 - Remove EVENTS category. r=njn
Categories are useful to indicate: This much % of time was spent in this category.

The EVENTS category isn't a very good match for this. This category is currently
only set on labels of functions that handle the processing of an event. But
those functions are usually closer to the base of the stack, and the actual CPU
work during the processing of an event is usually in another category closer to
the top of the stack, e.g. in JS if we're running an event handler, or in LAYOUT
if we're hit testing the position of the event.

This changeset removes the EVENTS category and replaces all uses of it with the
OTHER category.

MozReview-Commit-ID: JPm5hQiBkvp

--HG--
extra : rebase_source : fb1ff20aeebb7ac494227e62ba2101039578808c
2018-05-18 17:36:30 -04:00
Noemi Erli 1fd69fa2bc Backed out 18 changesets (bug 1462784) for failures in devtools/client/performance/test/unit/test_tree-model-08.js on a CLOSED TREE
Backed out changeset a74d36598442 (bug 1462784)
Backed out changeset c8192175f360 (bug 1462784)
Backed out changeset cde492240e99 (bug 1462784)
Backed out changeset 8c8d30fa406c (bug 1462784)
Backed out changeset ad3802ffb780 (bug 1462784)
Backed out changeset 2fe10732076c (bug 1462784)
Backed out changeset 268a72b7c3c4 (bug 1462784)
Backed out changeset 4055eb6c3bc6 (bug 1462784)
Backed out changeset 3901070e2e60 (bug 1462784)
Backed out changeset 2faf787fbbdf (bug 1462784)
Backed out changeset 8f06963c7c6f (bug 1462784)
Backed out changeset 036e6f64e224 (bug 1462784)
Backed out changeset e670f156a603 (bug 1462784)
Backed out changeset cd39588aece4 (bug 1462784)
Backed out changeset 2ac65d100fa2 (bug 1462784)
Backed out changeset ea05ff70a51d (bug 1462784)
Backed out changeset 8a06c0ba42f7 (bug 1462784)
Backed out changeset 52ed9a039ad2 (bug 1462784)
2018-06-01 01:06:29 +03:00
Markus Stange 81465bc0d6 Bug 1462784 - Annotate idle stacks in the native event loop on macOS. r=spohl
MozReview-Commit-ID: HD48iBTT8EN

--HG--
extra : rebase_source : 28e5e421b82e2f25fbc806804d36686907cfdd9e
2018-05-16 13:31:02 -04:00
Markus Stange 2d4663fe41 Bug 1462784 - Remove EVENTS category. r=njn
Categories are useful to indicate: This much % of time was spent in this category.

The EVENTS category isn't a very good match for this. This category is currently
only set on labels of functions that handle the processing of an event. But
those functions are usually closer to the base of the stack, and the actual CPU
work during the processing of an event is usually in another category closer to
the top of the stack, e.g. in JS if we're running an event handler, or in LAYOUT
if we're hit testing the position of the event.

This changeset removes the EVENTS category and replaces all uses of it with the
OTHER category.

MozReview-Commit-ID: JPm5hQiBkvp

--HG--
extra : rebase_source : 34fb2ca94151403a6d7ffd5a8b840f00a8bb4afb
2018-05-18 17:36:30 -04: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
Alastor Wu 013f2364d5 Bug 1373888 - part8 : add log. r=cpearce
MozReview-Commit-ID: JyLXnA9J9Ic

--HG--
extra : rebase_source : 56545a7818f5c5ed3b11e31e7b5eb26ca214e19c
2017-08-29 15:28:28 +08:00
Alastor Wu c599481d78 Bug 1373888 - part7 : modify platform wakelocks. r=cpearce,snorp,spohl
* OSX
Make the lock of the type kIOPMAssertionTypeNoDisplaySleep and kIOPMAssertionTypeNoIdleSleep
as a singleton. Won't need to require an extra lock.

* Windows
Add |mRequireForDisplay| to ensure the "audio-playing" won't overwrite the previous
display requirement.

* Android
Add "audio-playing" and "video-playing", and make sure the audio-lock won't be cancel
when receiving "WakeLockDelegate.STATE_LOCKED_BACKGROUND".

MozReview-Commit-ID: 97oNX7H2qij

--HG--
extra : rebase_source : 24fa8b267ad97d668fa55462d1f61ef5c92b632f
2017-08-29 15:28:23 +08:00
Alastor Wu 0be0a7c288 Bug 1373888 - part4 : request non-display wake lock for audio playing. r=cpearce,spohl
According to [1], kIOPMAssertionTypeNoDisplaySleep prevents display sleep and
kIOPMAssertionTypeNoIdleSleep prevents idle sleep.

We should use kIOPMAssertionTypeNoIdleSleep for audio playing, because it won't
need to block the display.

[1] https://developer.apple.com/library/content/qa/qa1340/_index.html

---

On Windows, ES_DISPLAY_REQUIRED forces display on, and ES_SYSTEM_REQUIRED forces
system on working state [2].

[2] https://msdn.microsoft.com/zh-tw/library/windows/desktop/aa373208(v=vs.85).aspx

MozReview-Commit-ID: Izs29PdzQOW

--HG--
extra : rebase_source : d0726131735b9cedf566f937204e585345b9d5e3
2017-08-29 15:25:34 +08:00
Alastor Wu 6a6ee2a0d7 Bug 1373888 - part3 : rename the topic of the wake lock. r=cpearce
For knowing the wake lock usage more clearly, we should use more specific topic name.

In OSX, you can use "$ pmset -g assertions" to check all the wakelock.
In Windows, using "$ powser -energy" to generate the energy report.

MozReview-Commit-ID: rAXnkxTvLc

--HG--
extra : rebase_source : 42ebf204673d3c913739f64c71c24af20d37c95d
2017-08-29 10:54:28 +08:00
Bill McCloskey a7bc022071 Bug 1384336 - Stop using OS-level event loop in content process (r=mstange)
MozReview-Commit-ID: 1ouSlgGchWl
2017-08-09 21:24:20 -07:00
Alex Gaynor 11a211f901 Bug 1386308 - stop trying to change the display sleep settings from the content process; r=haik
Before this change we were trying to change the settings from both the content
and parent processes, so this doesn't change any functionality. This allows to
remove access to the com.apple.PowerManagement.control mach service from the
content process.

MozReview-Commit-ID: 3DOhqG5U6oz

--HG--
extra : rebase_source : dee0b97c444ae95cfc8f80cb0fb99aa9e2658d51
2017-08-01 12:22:42 -04:00
Brendan Dahl 987400a824 Bug 1355147 - Add basic support for headless mode on macOS. r=jrmuizel
MozReview-Commit-ID: 23Wchhimynz
2017-07-28 11:00:27 -07:00
Josh Aas 9d7fb5a517 Bug 1372599 - Only turn off CGEvent logging on buggy versions of OSX to avoid delays in first paint. r=mstange
--HG--
extra : amend_source : 6ac7d91aac2458e50a3de8a59e2e6ce0f1fd4509
2017-07-06 23:31:00 -04:00
Nicholas Nethercote 58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Kan-Ru Chen dbb51ca5fc Bug 1194751 - Part 8. Implement ScreenHelperCocoa and delete old nsScreenManagerCocoa/nsScreenCocoa. r=mstange
ScreenHelperCocoa is the platform dependent part of the original
nsScreenManagerCocoa and nsScreenCocoa. It registers
NSApplicationDidChangeScreenParametersNotification and pushes updates
to ScreenManager. See patch part 4. for how ScreenManager works.

MozReview-Commit-ID: 1A5ha4Ys2dL

--HG--
rename : widget/cocoa/nsScreenManagerCocoa.h => widget/cocoa/ScreenHelperCocoa.h
rename : widget/cocoa/nsScreenManagerCocoa.mm => widget/cocoa/ScreenHelperCocoa.mm
extra : rebase_source : c7737e18656710c36f6c04ac71a17deeca3224a5
2017-03-09 19:34:49 +08:00
Chris Peterson 469de34a31 Bug 1313903 - Fix -Wmismatched-parameter-types warning in widget/cocoa/nsAppShell.mm. r=spohl
widget/cocoa/nsAppShell.mm:113:47 [-Wmismatched-parameter-types] conflicting parameter types in implementation of 'nextEventMatchingMask:untilDate:inMode:dequeue:': 'NSEventMask' (aka 'unsigned long long') vs 'NSUInteger' (aka 'unsigned long')

NSWindow's nextEventMatchingMask method expects a parameter of type NSEventMask, not NSUInteger, when building  x86_64 with SDK 10.12:

https://developer.apple.com/reference/appkit/nswindow/1419304-nexteventmatchingmask
2016-11-02 21:18:36 -07:00
Sebastian Hengst cdcc9e20da Bug 1304829 - rename RELEASE_BUILD to RELEASE_OR_BETA: main part. r=ted,Mossop
MozReview-Commit-ID: 1lCt0xTMV5O
2016-10-08 11:14:49 +02:00
stefanh@inbox.com 5e50e79d79 Bug 1281028 - Remove run-time Mavericks checks in nsAppShell.mm. r=spohl. 2016-06-20 20:41:18 +02:00
Kirk Steuber d8c748eec4 Bug 1248985 - Fix Spelling Error in nsAppShell.mm. r=josh
MozReview-Commit-ID: LqJrA0UOUfi

--HG--
extra : transplant_source : %7D%08%5C%25%2A6%DD%7F%E0%5D%14R%FA%E8a%9F%A1M%A0%F5
2016-02-17 07:09:39 -08:00
Steven Michaud d59e2ac8dc Bug 1181977 - Firefox app menu contains only "Quit" in certain edgecases. r=spohl 2015-08-24 10:57:02 -05:00
Kyle Huey 76e3009ab8 Bug 1179909: Refactor stable state handling. r=smaug
This is motivated by three separate but related problems:

1. Our concept of recursion depth is broken for things that run from AfterProcessNextEvent observers (e.g. Promises). We decrement the recursionDepth counter before firing observers, so a Promise callback running at the lowest event loop depth has a recursion depth of 0 (whereas a regular nsIRunnable would be 1). This is a problem because it's impossible to distinguish a Promise running after a sync XHR's onreadystatechange handler from a top-level event (since the former runs with depth 2 - 1 = 1, and the latter runs with just 1).

2. The nsIThreadObserver mechanism that is used by a lot of code to run "after" the current event is a poor fit for anything that runs script. First, the order the observers fire in is the order they were added, not anything fixed by spec. Additionally, running script can cause the event loop to spin, which is a big source of pain here (bholley has some nasty bug caused by this).

3. We run Promises from different points in the code for workers and main thread. The latter runs from XPConnect's nsIThreadObserver callbacks, while the former runs from a hardcoded call to run Promises in the worker event loop. What workers do is particularly problematic because it means we can't get the right recursion depth no matter what we do to nsThread.

The solve this, this patch does the following:

1. Consolidate some handling of microtasks and all handling of stable state from appshell and WorkerPrivate into CycleCollectedJSRuntime.
2. Make the recursionDepth counter only available to CycleCollectedJSRuntime (and its consumers) and remove it from the nsIThreadInternal and nsIThreadObserver APIs.
3. Adjust the recursionDepth counter so that microtasks run with the recursionDepth of the task they are associated with.
4. Introduce the concept of metastable state to replace appshell's RunBeforeNextEvent. Metastable state is reached after every microtask or task is completed. This provides the semantics that bent and I want for IndexedDB, where transactions autocommit at the end of a microtask and do not "spill" from one microtask into a subsequent microtask. This differs from appshell's RunBeforeNextEvent in two ways:
a) It fires between microtasks, which was the motivation for starting this.
b) It no longer ensures that we're at the same event loop depth in the native event queue. bent decided we don't care about this.
5. Reorder stable state to happen after microtasks such as Promises, per HTML. Right now we call the regular thread observers, including appshell, before the main thread observer (XPConnect), so stable state tasks happen before microtasks.
2015-08-11 06:10:46 -07:00
Steven Michaud 09ad196ba3 Bug 1186158 - Receive notifications of sandbox violations in the browser on OS X. r=spohl 2015-07-28 15:19:55 -05:00
Ryan VanderMeulen 0b120e2884 Backed out changeset 4fd14cf6b415 (bug 1186158) for OSX Werror bustage. 2015-07-27 15:21:52 -04:00
Steven Michaud 36ac32cb02 Bug 1186158 - Receive notifications of sandbox violations in the browser on OS X. r=spohl 2015-07-27 13:56:08 -05:00
Steven Michaud edb79b5fd7 Bug 1151345 - Firefox app menu sometimes contains only "Quit" on OS X. r=spohl 2015-06-03 16:19:51 -05: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
Aaron Klotz 5d33b28500 Bug 1132305 - Ensure that BHR knows when thread activity has resumed in nextEventMatchingMask. r=smichaud 2015-02-12 10:31:42 -07:00
Neil Deakin a744e9625f Bug 1102039, Ensure that the popup's widget visibility is updated after rollup, allows popups to disappear at the start of the minimize animation rather than after, r=tn 2015-01-07 20:52:20 -05:00
Ehsan Akhgari 390eaebf41 Bug 1117044 - Mark virtual overridden functions as MOZ_OVERRIDE in widget; r=roc 2015-01-02 09:02:51 -05:00
Josh Aas f9e3926e19 Bug 1092630: Get rid of native widgets for OS X NPAPI plugins, make things work much better under e10s. Patch by Josh Aas, Markus Stange, Steven Michaud, David Parks. r=smichaud/jst/josh (more reviews pending) 2014-12-11 08:44:07 -06:00
Mason Chang 74c80403e2 bug 552020 Part 1: Hook into CVDisplayLink to get vsync events on OSX. r=benwa,mstange 2014-11-18 13:28:42 -08:00
Ryan VanderMeulen 87e1d173f4 Backed out changesets a99bd0b3b075, a7fb851f823a, and 9fc2d99376cd (bug 552020) for non-unified bustage and OSX 10.6 tsvgr crashes.
CLOSED TREE
2014-11-14 15:57:35 -05:00
Mason Chang ee275a75dc Bug 552020. Part 1: Hook into CVDisplayLink to get vsync events on OSX. r=benwa,mstange 2014-11-14 08:31:04 -08:00
Steven Michaud 9556bac074 Bug 1092855 - Work around bad interaction between jemalloc and Apple uninitialized memory bug. r=spohl 2014-11-11 15:28:18 -06:00
Steven Michaud e46726de80 Bug 1017595 - Links from external applications sometimes fail to open when Firefox is hidden. r=spohl 2014-10-31 17:14:44 -05:00
Sebastian Hengst 1e915ce56f Bug 1078033 - Remove remaining Camino code. r=ted 2014-10-10 17:00:29 +02:00
Ralph Giles d2a60e7b9b Bug 1043489 - Fix MacOS X holding screensaver lock with fullscreen video. r=smichaud
This ports the fix Chris Pearce made to the windows code in bug 1063995.
We just listen for the 'screen' topic and rely on the notification
machinery to filter duplicates. This avoids incrementing the
lock count on both playback start and fullscreen, and thus waiting
until fullscreen exits after playback stops before enabling the
screensaver again.
2014-10-07 18:20:00 -07:00
Benoit Jacob 9b83c2d49b Bug 1028588 - Fix dangerous public destructors of Mac-specific reference-counted classes - r=mstange 2014-07-06 11:25:31 -04:00
Steven Michaud 1b9bdee85d Bug 1016200 - Single click stop working in web content, require double click. r=spohl 2014-06-30 12:28:45 -05:00
Chris Peterson 5ca0b3c938 Bug 1028021 - Fix -Wdelete-non-virtual-dtor warning in widget/cocoa/nsAppShell.mm. r=smichaud 2014-06-19 23:03:54 -07:00
Lucas GOLVEN 356949aa3d Bug 772347 - Add WakeLockListener on MacOSX. r=smichaud
Disables the screensaver on Mac while a video is playing.
2014-06-13 19:58:00 +02:00
Steven Michaud 6b447e78bc Bug 1013852 - Clicking doesn't focus the window sometimes. r=mstange 2014-06-02 16:43:31 -05:00
Victor Porof 9ce7e9c089 Bug 1007203 - Always add categories when pushing to the pseudostack, r=djvj 2014-05-23 17:12:29 -04:00
Steven Michaud 3836ce17c9 Bug 996848 - Rewrite Mac nsAppShell native event handling. r=spohl 2014-05-10 11:58:07 -05:00
Ed Morley 567c128d78 Backed out changeset 4341602f99b0 (bug 996848) for reftest failures on OS X 2014-05-07 18:44:01 +01:00
Steven Michaud ffd68891ee Bug 996848 - Rewrite Mac nsAppShell native event handling. r=spohl 2014-05-07 11:13:27 -05:00