Commit Graph

161 Commits

Author SHA1 Message Date
David Rajchenbach-Teller
0ab8fede40 Bug 1261702 - Make nsPerformanceStatsService::Dispose() idempotent,r=froydnj
Although I haven't been able to pinpoint why, it looks like
nsPerformanceStatsService::Dispose() may be called twice, which in
turn causes crashes. This patch makes sure that calling the method
twice is idempotent.

Also, just in case this was due to a typo in
AddObserver/RemoveObserver, this patch replaces the literal strings
used in both with constants.

MozReview-Commit-ID: 8fXO20r5xvO
2016-05-30 12:24:50 +02:00
Bill McCloskey
58f09d0377 Bug 1270628 - Stop using content-child-shutdown observer in nsPerformanceStats (r=Yoric) 2016-05-27 17:22:21 -07:00
Dave Townsend
769fc8f245 Bug 1257246: Update toolkit for eslint 2. r=Gijs
Most of this is fixing functions that in some cases return a value but then
can also run to completion without returning anything. ESLint 2 catches this
where previous versions didn't. Unless there was an obvious other choice I just
made these functions return undefined at the end which is effectively what
already happens.

MozReview-Commit-ID: KHYdAkRvhVr
2016-04-05 11:33:48 -07:00
Dave Townsend
4e522f7ffb Bug 1250611: Fix more tests to use signed add-ons. r=rhelmer
MozReview-Commit-ID: 97RVVxAM5eo
2016-02-29 10:04:55 -08:00
J. Ryan Stinnett
93670c52c7 Bug 1204127 - Clean up paths added after migration. r=ochameau 2016-02-08 17:32:07 -06:00
Dave Townsend
a2ba043d69 Bug 1245649: Turn on no-trailing-spaces. r=Gijs 2016-02-03 14:22:33 -08:00
David Rajchenbach-Teller
ef64065ed8 Bug 1142937 - AddonWatcher now communicates through nsIObserverService. r=felipe
The current API of AddonWatcher only supports a single callback. That's pretty unfriendly to testing, debugging, add-ons, etc.

This patch replaces the mechanism with a notification through the nsIObserverService.
2016-01-27 13:34:58 +01:00
David Rajchenbach-Teller
3bfbd5af5c Bug 1221761 - Probe.prototype.release() now swallows NS_ERROR_NOT_AVAILABLE. r=felipe
During shutdown, we may find ourselves attempting to release and shutdown a probe while the PerformanceStats service is already shutdown. In this case, since the probe is already shutdown, we can simply ignore the error.
2016-01-28 11:17:49 +01:00
Kyle Huey
e95edb30a9 Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Carsten "Tomcat" Book
4d0557758c merge mozilla-inbound to mozilla-central a=merge 2016-01-27 11:59:49 +01:00
Mike Conley
60e977ef87 Bug 1233497 - Do not resolve a Promise with a CPOW in browser_addonPerformanceAlerts.js r=Yoric 2016-01-04 17:15:24 -05:00
David Rajchenbach-Teller
6ddd95efcc Bug 1219144 - Using the nsRefreshDriver's jank indication for performance monitoring;f?froydnj r=froydnj
This patch (currently WIP) alters the way we determine whether jank is user-visible or not.

Instead of measuring the total time spent doing JS, we now use an
indicator provided by the vsync driver: how long it takes to deliver
the signal from the vsync timer to the main thread. This lets us find
out more accurately if there is user-visible jank. In the future, this
will also let us add an observer to find out whether the process
itself is janky, regardless of JS.
2016-01-14 15:07:18 +01:00
David Rajchenbach-Teller
5bfb6c3c1c Bug 1219144 - Performance alerts are now labelled with isJankVisible;r=avih,froydnj
To decrease the number of apparent false positives, we classify jank
alerts as visible or invisible. We use the following heuristic:
- if the process is currently animating something, any jank alert is visible;
- if the process has just handled a user input, any jank alert is visible;
- if some user input is handled during the current iteration, any jank alert is visible;
- otherwise, jank alerts are not visible.
2016-01-12 10:45:22 +01:00
David Rajchenbach-Teller
df4de030a5 Bug 1241838 - Removing erroneous CPOW suffix, reworking buggy jank suffix;r=Felipe 2016-01-22 12:58:21 +01:00
Jan de Mooij
71d37a198e Bug 1237201 part 7 - Handle Vector OOM in nsPerformanceStats, telemetry. r=Yoric 2016-01-14 15:19:37 +01:00
David Rajchenbach-Teller
2f4a196f41 Bug 1238520 - Lowering the threshold for browser_addonPerformanceAlerts_2.js;r=me 2016-01-12 10:51:47 +01:00
David Rajchenbach-Teller
bc40798d63 Bug 1200169 - Making the slow add-on watcher more tolerant;r=Felipe
Showing alerts more than once is annoying for the user and basically
useless. We therefore change a bit our strategy:

- if an add-on has behaved correctly for the last 5 minutes, reset our counter of offences;
- don't display alerts for an add-on more than once per 6 hours.

The only exception is if the add-on freezes the browser (i.e. causes
it to stop for more than 5 seconds at a time), in which case we
display the alert regardless of past offences, up to once per 10
minutes.
2015-12-15 11:21:37 +01:00
Sami Jaktholm
1dd19cb188 Bug 1230027 - Stop burnCPOWInSandbox from being GC'd during tests. r=yoric
Since no one is holding a reference to the burnCPOWInSandbox function
in the child process, it might get GC'd during the test. Binding it to
the global object should keep the function alive long enough for the
test to call it via CPOW.
2015-12-22 20:15:17 +02:00
Dave Townsend
8dc7f59eb3 Bug 1229142: Link browser and toolkit test directory to the shared eslintrc files. r=Standard8 2015-11-30 13:05:00 -08:00
Ehsan Akhgari
2ff01a2a00 Bug 1229950 - Increase the timeout of browser_AddonWatcher.js 2015-12-30 22:27:40 -05:00
Dave Townsend
dd9da1fea1 Bug 1229519: Fix miscellaneous parts of toolkit to pass eslint checks. r=MattN 2015-12-03 10:02:45 -08:00
Nathan Froyd
54dfa729a9 Bug 1218454 - part 2 - don't #include nsContentUtils.h from CallbackObject.h; r=bz
We used to need nsContentUtils.h here for nsCxPusher, but since that got
moved to ScriptSettings.h, we no longer need nsContentUtils.h for
anything.
2015-10-26 12:14:47 -04:00
David Rajchenbach-Teller
4202706f19 Bug 1186491 - Reworking AddonWatcher to use low-level performance watch API;r=mossop 2015-11-24 13:36:58 +01:00
David Rajchenbach-Teller
8df2cada0d Bug 1186491 - An API for watching slow performance alerts (js-level);r=felipe 2015-11-24 13:37:19 +01:00
David Rajchenbach-Teller
1a948e69b9 Bug 1186491 - An API for watching slow performance alerts (xpcom-level);r=froydnj
This patch introduces a new API to the nsPerformanceStatsService to register observers for slow performance. This API has several advantages:
- as it doesn't require polling, it also doesn't need to wake up the parent process every 15 seconds for the AddonWatcher;
- as it doesn't require polling, it doesn't need to wake up the child processes every time we wish to obtain data on slow performance;
- as it provides immediate data on performance alerts, it makes it possible to get rid of the complex and expensive post-processing performed by JS to merge data from all processes and attempt to extract performance alerts.

The old API is still available.
2015-11-24 13:37:32 +01:00
David Rajchenbach-Teller
3d37bc1b53 Bug 1186491 - Splitting nsIPerformanceStats in two;r=froydnj 2015-10-23 10:58:40 +02:00
Mark Banner
e1e6f5c794 Bug 1227138 - Fix browser_AddonWatcher not to fail if system add-ons are present. r=Mossop 2015-11-23 19:45:24 +00:00
Bill McCloskey
c093571649 Bug 967873 - Test changes for async removeTab (r=Gijs) 2015-11-04 10:56:15 -08:00
Carsten "Tomcat" Book
d50cc9a6ee Merge mozilla-central to fx-team 2015-11-02 12:05:19 +01:00
Birunthan Mohanathas
ac37dec517 Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Landry Breuil
cc35fe59d8 Bug 1220407 - include sys/resource.h for struct rusage and getrusage() on all unices, not linux only. r=yoric 2015-10-31 14:49:00 +01:00
David Rajchenbach-Teller
7b8179a1fc Bug 1217218 - Consolidate shutdown of nsPerformanceStatsService. r=froydnj 2015-10-22 21:01:47 +02:00
David Rajchenbach-Teller
75fe7ea33c Bug 1188248 - Merge jank monitoring and CPOW monitoring (high-level);r=mossop 2015-07-30 15:21:08 +02:00
David Rajchenbach-Teller
eb24794560 Bug 1188248 - Merge jank monitoring and CPOW monitoring (low-level);r=jandem,yoric 2015-09-28 12:31:31 +02:00
Birunthan Mohanathas
d382a21947 Bug 1217320 - Remove more XPIDL signature comments in .cpp files. r=froydnj
Comment-only, DONTBUILD.
2015-10-27 06:54:25 +02:00
Kyle Huey
8f8794e1c7 Bug 1216401: Eviscerate nsIDOMWindow, move still needed methods to nsPIDOMWindow. r=bz 2015-10-26 14:37:32 -07:00
David Rajchenbach-Teller
15b14c1a22 Bug 1208747 - Move most of Stopwatch-related code to XPCOM-land (documentation);r=froydnj 2015-10-02 12:52:49 +02:00
David Rajchenbach-Teller
8d77a9b0c1 Bug 1208747 - Move most of Stopwatch-related code to XPCOM-land (JS-level);r=felipe 2015-09-25 18:44:34 +02:00
David Rajchenbach-Teller
8d8035d838 Bug 1208747 - Move most of Stopwatch-related code to XPCOM-land (XPCOM-level + XPConnect-level);r=froydnj 2015-10-02 23:44:23 +02:00
Carsten "Tomcat" Book
5319c04bcc Backed out changeset 33afbc6c4997 (bug 1208747) 2015-10-21 11:39:22 +02:00
Carsten "Tomcat" Book
868b28d115 Backed out changeset 5b288d315423 (bug 1208747) 2015-10-21 11:39:21 +02:00
Carsten "Tomcat" Book
58a5130224 Backed out changeset fcc11758f25f (bug 1208747) 2015-10-21 11:39:20 +02:00
David Rajchenbach-Teller
9519a12fdf Bug 1208747 - Move most of Stopwatch-related code to XPCOM-land (documentation);r=froydnj 2015-10-02 12:52:49 +02:00
David Rajchenbach-Teller
03d4bcb70f Bug 1208747 - Move most of Stopwatch-related code to XPCOM-land (JS-level);r=felipe 2015-09-25 18:44:34 +02:00
David Rajchenbach-Teller
f1cc78b023 Bug 1208747 - Move most of Stopwatch-related code to XPCOM-land (XPCOM-level + XPConnect-level);r=froydnj 2015-10-02 23:44:23 +02:00
Nathan Froyd
4e6d8f6705 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
Alexandre Poirot
f1439bdbe8 Bug 1204812 - Keep Console.jsm in toolkit/modules/ r=jryans,Mossop 2015-10-15 03:45:22 -07:00
Bill McCloskey
2a56c79f67 Back out bug 967873 - Test changes for async removeTab 2015-10-07 11:15:11 -07:00
Carsten "Tomcat" Book
036e6d2fa3 Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE
Backed out changeset 647025383676 (bug 1202902)
Backed out changeset d70c7fe532c6 (bug 1202902)
2015-10-07 14:03:21 +02:00
Carsten "Tomcat" Book
12369728f5 Backed out 1 changesets (bug 1202902) for causing merge conflicts to mozilla-central
Backed out changeset cfc1820361f5 (bug 1202902)
2015-10-07 12:13:45 +02:00