Commit graph

53 commits

Author SHA1 Message Date
David Rajchenbach-Teller
b9cd80d622 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

--HG--
extra : rebase_source : 490f1a5186a426a41ab567e564cdbd46080262ec
2016-06-07 10:45:44 +02:00
Wes Kocher
9551fb6db5 Backed out changeset 66e0240f8c06 (bug 1261702) for mass assertion failures 2016-06-06 11:35:25 -07:00
David Rajchenbach-Teller
784f035bea 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

--HG--
extra : rebase_source : 8b2eada3f9c80fe9feff880e985739a368e7b997
2016-05-30 12:24:50 +02:00
Bill McCloskey
ee661f78d3 Bug 1270628 - Stop using content-child-shutdown observer in nsPerformanceStats (r=Yoric) 2016-05-27 17:22:21 -07:00
Kyle Huey
91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
David Rajchenbach-Teller
a4607bcbef 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.

--HG--
extra : rebase_source : a538e3cc9d8904f52d4a0e7bad291189986e4e6d
2016-01-14 15:07:18 +01:00
David Rajchenbach-Teller
01d67c795e 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.

--HG--
extra : rebase_source : 450661fb1106429a455b3e9f8f66fc477c22ccef
2016-01-12 10:45:22 +01:00
Jan de Mooij
366cd49655 Bug 1237201 part 7 - Handle Vector OOM in nsPerformanceStats, telemetry. r=Yoric 2016-01-14 15:19:37 +01:00
Nathan Froyd
c381a6b86c 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
a5188a6c42 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.

--HG--
extra : transplant_source : %84%B11%D3n%B4y%AAM%7C%B02%5E%3C%BA%B0%93%B6%FF%D5
2015-11-24 13:37:32 +01:00
David Rajchenbach-Teller
3cbbd4662e Bug 1186491 - Splitting nsIPerformanceStats in two;r=froydnj
--HG--
extra : transplant_source : _%5B%8Bk%5Cn%AD%E3%1D%CB%E5f%FF%04%D2%D861%F1%83
2015-10-23 10:58:40 +02:00
Carsten "Tomcat" Book
7a70d4ebe3 Merge mozilla-central to fx-team 2015-11-02 12:05:19 +01:00
Birunthan Mohanathas
9985829ecc Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Landry Breuil
12489bbca0 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
5d07bdc7b7 Bug 1217218 - Consolidate shutdown of nsPerformanceStatsService. r=froydnj
--HG--
extra : histedit_source : b4235360c5f038bbccfa13be1fcc063fca83a74b
2015-10-22 21:01:47 +02:00
David Rajchenbach-Teller
a4275e1833 Bug 1188248 - Merge jank monitoring and CPOW monitoring (low-level);r=jandem,yoric
--HG--
extra : transplant_source : %60%9F%E1%0Dm%E7%7F%83H%E8%C0e%16%60%F4%E3%EF_%906
2015-09-28 12:31:31 +02:00
Birunthan Mohanathas
44936aabb2 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
c7d3c4e21a Bug 1216401: Eviscerate nsIDOMWindow, move still needed methods to nsPIDOMWindow. r=bz 2015-10-26 14:37:32 -07:00
David Rajchenbach-Teller
3ff3f77f9e Bug 1208747 - Move most of Stopwatch-related code to XPCOM-land (XPCOM-level + XPConnect-level);r=froydnj
--HG--
extra : transplant_source : %91G%19%1A%B33%A8%2C%F4%D0%D1%A3%E0%20G%86%CE%DF%A5%9D
2015-10-02 23:44:23 +02:00
Carsten "Tomcat" Book
a55a2ef59a Backed out changeset 33afbc6c4997 (bug 1208747) 2015-10-21 11:39:22 +02:00
David Rajchenbach-Teller
625e50b7af Bug 1208747 - Move most of Stopwatch-related code to XPCOM-land (XPCOM-level + XPConnect-level);r=froydnj
--HG--
extra : transplant_source : %AD%3B%3C%98%15/%F1%CD/%FB%D7%F4%88%22%7E%3D7%7B%CB%A0
2015-10-02 23:44:23 +02:00
Nathan Froyd
01583602a9 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

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
David Rajchenbach-Teller
527747d5e6 Bug 1199603 - Don't wait for shutdown to update nsPerformanceStats Telemetry. r=Mossop
--HG--
extra : commitid : 1b56ctHsfyE
extra : rebase_source : 42de8403985b494eb8121a4be11d52e35df3b150
2015-08-28 12:14:01 +02:00
David Rajchenbach-Teller
09be0de8cd Bug 1198167 - nsPerformanceStatsService should wait for profile-before-change, not profile-before-shutdown. r=yoric
--HG--
extra : transplant_source : PL%BD%E1Q%05%7D%95%A0%13a%BA%F8%DAj%03N%C2Y%D1
2015-08-25 11:20:40 +02:00
David Rajchenbach-Teller
2b0451efe0 Bug 1181175 - Telemetry for finding out how often our process is rescheduled to another CPU. r=jandem, r=bsmedberg
--HG--
extra : transplant_source : %24q%A1%A9f%FC%81%D5%DFo%DB%E2e%25%81%11%94%19%E5%15
2015-07-29 19:01:05 +02:00
Ryan VanderMeulen
a7ea8705c1 Backed out changesets db4294fb662d and de9ae2ccb73b (bug 1181175) for Android test_compartments.js failures.
CLOSED TREE
2015-08-10 15:07:27 -04:00
David Rajchenbach-Teller
4daefcd581 Bug 1181175 - Telemetry for finding out how often our process is rescheduled to another CPU. r=jandem, r=bsmedberg
--HG--
extra : transplant_source : %94Od-%F4U%88U%0C%DA%28%F3%B6%8D%7F%E7%88%1FTH
2015-07-29 19:01:05 +02:00
Birunthan Mohanathas
7315345693 Bug 1191100 - Remove XPIDL signature comments in .cpp files. r=ehsan
Comment-only so DONTBUILD.
2015-08-04 16:17:36 -07:00
David Rajchenbach-Teller
44f4adbd13 Bug 1184486 - Let PerformanceStats.jsm play nicer with process-per-tab. r=mconley
--HG--
extra : amend_source : a7a1e4f69592e8828469f84db6d6665d40fd68be
extra : transplant_source : %EB%C5q%CA%01%DC%3A%D5%07Y%19%07%8A%DCH%B0II%CA%C3
extra : histedit_source : d2d769675008d662ea78ae5b04e70c926296b3c1
2015-07-16 12:19:17 +02:00
Ryan VanderMeulen
0e3f4ba0b1 Backed out changeset 82fac7af188e (bug 1184486) for Static Analysis failures. 2015-07-29 09:11:52 -04:00
David Rajchenbach-Teller
f0e10ec7a1 Bug 1184486 - Let PerformanceStats.jsm play nicer with process-per-tab. r=mconley
--HG--
extra : transplant_source : %20%3A%1D%09%A4A%EC%C8%C3%F3%1A%87%1C%E3b%12q%BA%F8%BC
extra : histedit_source : c012c3b7271c68ada2296b5da19bc41280d9e35d
2015-07-16 12:19:17 +02:00
David Rajchenbach-Teller
0f2fa9841b Bug 1147664 - Detailed mode for PerformanceStats (high-level). r=mossop
--HG--
extra : transplant_source : %CD%0C%95%DB%81%94%B3%3E%5B%3F4%1C%A3/%D6%C3%A0%08%05%11
2015-06-12 21:52:06 +02:00
David Rajchenbach-Teller
7538ba910f Bug 1147664 - Detailed mode for PerformanceStats (low-level). r=jandem
--HG--
extra : transplant_source : %BC%A9%AA%3C%1B%9A1%CCh%08%96%C0q%EB%E4%3C%9C%99%9B%C0
2015-06-10 15:56:19 +02:00
Wes Kocher
3f09481f19 Backed out 2 changesets (bug 1147664) for b2g xpcshell failures in test_compartments.js
Backed out changeset cfd27d5ffc58 (bug 1147664)
Backed out changeset cace9a3246c1 (bug 1147664)
2015-07-23 18:39:43 -07:00
David Rajchenbach-Teller
9b23c4163e Bug 1147664 - Detailed mode for PerformanceStats (high-level). r=felipe
--HG--
extra : rebase_source : 06488b342c9f672820f7d8303a05746e8f436364
2015-06-12 21:52:06 +02:00
David Rajchenbach-Teller
2badacb231 Bug 1147664 - Detailed mode for PerformanceStats (low-level). r=jandem
--HG--
extra : rebase_source : 0c9393e854c6999c2278b0ef66bc8626b9ba1a75
extra : source : 83fa8af8140b4a3ab275313b77f4dee26312b7fa
2015-06-10 15:56:19 +02:00
Ryan VanderMeulen
e0a1536822 Backed out changesets 49667763013b and 83fa8af8140b (bug 1147664) for test_compartments.js xpcshell failures. 2015-07-23 11:35:55 -04:00
David Rajchenbach-Teller
70f4e08ddb Bug 1147664 - Detailed mode for PerformanceStats (high-level). r=mossop
--HG--
extra : source : 9eb2e0c7b864e31c7eac6999f7a74920a5dc344c
2015-06-12 21:52:06 +02:00
David Rajchenbach-Teller
91a763fcfc Bug 1147664 - Detailed mode for PerformanceStats (low-level). r=jandem
--HG--
extra : transplant_source : %BC%A9%AA%3C%1B%9A1%CCh%08%96%C0q%EB%E4%3C%9C%99%9B%C0
2015-06-10 15:56:19 +02:00
Ryan VanderMeulen
3a634b39d2 Backed out changesets 9eb2e0c7b864 and 19bdfb755eeb (bug 1147664) for various test failures. 2015-07-22 13:18:54 -04:00
David Rajchenbach-Teller
e75340bff9 Bug 1147664 - Detailed mode for PerformanceStats (high-level). r=mossop
--HG--
extra : transplant_source : %A59%BA%D0ePFJ%8B%5E%7F%F4%F1%C2%5BY%EC%C0%D5R
2015-06-12 21:52:06 +02:00
David Rajchenbach-Teller
49377f6cc3 Bug 1147664 - Detailed mode for PerformanceStats (low-level). r=jandem
--HG--
extra : transplant_source : %5B%BB%90%E3b%DD%BEY%FF%02m7X%5E%18%8C7%09qn
2015-06-10 15:56:19 +02:00
David Rajchenbach-Teller
e158902bf5 Bug 1175098 - PerformanceStats for e10s. r=felipe, r=mconley
CLOSED TREE

--HG--
extra : transplant_source : %E6%1E%87%CE%E4%15%82%5E%0F%C0%A8x8N%D0%E8%E0%83%19%07
2015-06-16 14:26:11 +02:00
Ryan VanderMeulen
0c009c0080 Backed out changeset 653179afb65f (bug 1175098) for frequent WinXP browser_compartments.js failures.
CLOSED TREE

--HG--
extra : amend_source : 281a11895a3ee742061158d49672d42a52146bad
2015-07-15 21:28:00 -04:00
David Rajchenbach-Teller
6ea9619e02 Bug 1175098 - PerformanceStats for e10s. r=felipe, r=mconley
--HG--
extra : transplant_source : %FA%8C%99H%88Ne%7DI%FC0B%13%BA%CB%3F%DC5%151
2015-06-16 14:26:11 +02:00
Andrew McCreight
f4abeb8aba Bug 886459, part 1 - Remove unused includes of nsIJSRuntimeService.h. r=bholley 2015-06-26 18:44:13 -07:00
Jacek Caban
a3df79339e Bug 1157870 - Cross compilation fixup. 2015-06-19 13:33:36 +02:00
David Rajchenbach-Teller
bc5a70862e Bug 1157870 - Performance Groups should have a unique ID (high-level). r=mossop
--HG--
extra : transplant_source : k%B8%F7%1B%FFz%E2%057%0C%FF%CB%BF%D8%FF%D6F%E0%CB%F0
2015-05-18 16:40:34 +02:00
David Rajchenbach-Teller
f62eaec089 Bug 1156264 - Activate/deactivate jank and CPOW monitoring separately (high-level). r=mossop
--HG--
extra : transplant_source : T%E1%CA%82%3B%3F%21g%94%D1%83%02%23%22e%81Da%00%B4
2015-06-04 13:12:27 +02:00
David Rajchenbach-Teller
805b3bb811 Bug 1149486 - Extract a window title and window ID for PerformanceStats. r=mossop
--HG--
extra : amend_source : 8ac6f00e2641581f2d7533226435f1fb680da10c
extra : histedit_source : c2e716dece6f74daf2b9c613cf47155ee300c045
2015-05-18 10:40:20 +02:00