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

37 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01: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 20df43a549 Bug 1382099 - Remove MOZ_WIDGET_GONK from toolkit/. r=glandium.
--HG--
extra : rebase_source : 709744b24104b463c8dc4cbe215d2250e7c1a9f5
2017-07-19 18:38:48 +10:00
Nicholas Nethercote 033f83145c Bug 1375387 - Reorder and section-ify GeckoProfiler.h. r=mstange.
This patch gives some structure and order to the profiler's API.

It also renames AutoProfilerRegister as AutoProfilerRegisterThread, to match
profiler_register_thread().
2017-06-22 14:28:47 +10:00
Cervantes Yu cc5836fbae Bug 1024669 - Part 1: Annotate crash reports with thread names. r=gsvelto
NS_SetCurrentThreadName() is added as an alternative to PR_SetCurrentThreadName()
inside libxul. The thread names are collected in the form of crash annotation to
be processed on socorro.

MozReview-Commit-ID: 4RpAWzTuvPs
2017-02-07 18:57:23 +08:00
Sebastian Hengst 1828ea89ca Backed out changeset 7fdcabdbb675 (bug 1024669) for failing mda, GTest and talos jobs. r=backout on a CLOSED TREE 2017-04-10 19:05:44 +02:00
Cervantes Yu 364e524eca Bug 1024669 - Part 1: Annotate crash reports with thread names. r=gsvelto
MozReview-Commit-ID: 4RpAWzTuvPs
2017-02-07 18:57:23 +08:00
Carsten "Tomcat" Book 02ddc23c74 Backed out changeset 7a52d887bcea (bug 1024669) for bustage 2017-04-10 11:43:49 +02:00
Cervantes Yu ece1ce1a7d Bug 1024669 - Part 1: Annotate crash reports with thread names. r=gsvelto
MozReview-Commit-ID: 4RpAWzTuvPs
2017-02-07 18:57:23 +08:00
Nicholas Nethercote 4b5d7166d9 Bug 1337189 (part 3) - Remove profiler_responsiveness. r=mstange.
All it does is set sLastTracerEvent, which is never read.

--HG--
extra : rebase_source : 13182caaa8d6e38967c7b667992a9d64029e38d7
2017-02-07 14:15:10 +11:00
Markus Stange 4bdc4ca0fb Bug 1323100 - Register most of the remaining threadfunc threads with the profiler. r=froydnj
As far as I can tell, this covers all the remaining threads which we start
using PR_CreateThread, except the ones that are created inside NSPR or NSS,
and except for the Shutdown Watchdog thread in nsTerminator.cpp and the
CacheIO thread. The Shutdown Watchdog thread stays alive past leak detection
during shutdown (by design), so we'd report leaks if we profiled it. The
CacheIO thread seems to stay alive past shutdown leak detection sometimes as
well.

This adds a AutoProfilerRegister stack class for easy registering and
unregistering. There are a few places where we still call
profiler_register_thread() and profiler_unregister_thread() manually, either
because registration happens conditionally, or because there is a variable that
gets put on the stack before the AutoProfilerRegister (e.g. a dynamically
generated thread name). AutoProfilerRegister needs to be the first object on
the stack because it uses its own `this` pointer as the stack top address.

MozReview-Commit-ID: 3vwhS55Yzt

--HG--
extra : rebase_source : 56dd27282e7bd09a7e7dc7ca09ccfe3a0198e7af
2017-01-05 16:34:26 +01:00
Nicholas Nethercote e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Gregor Wagner acecad8f82 Bug 1267577 - Move nsRunnable to mozilla::Runnable. r=gsvelto 2016-04-27 12:05:40 +02:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Nicholas Nethercote 242708cf72 Bug 1127201 (attempt 2, part 1) - Replace most NS_ABORT_IF_FALSE calls with MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 488e401ff87e31a2074c4108c4df0572d9536667
2015-02-09 14:34:50 -08:00
Andrew McCreight d3826daa16 Back out Bug 1127201 (part 2) for various problems. 2015-02-06 15:04:32 -08:00
Nicholas Nethercote d34f0301b8 Bug 1127201 (part 2) - Convert all NS_ABORT_IF_FALSE calls to MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 99182e70335d2b5ff95f8c528ae992d37294be3a
2015-02-04 20:05:36 -08:00
Vivien Nicolas 1306c4d3ed Bug 968237 - Use a pref to set the threshold of the event loop lag tracker. r=ted 2014-02-15 01:45:45 +01:00
Ryan VanderMeulen 3ac56bf193 Backed out changeset f4c91d9262f1 (bug 965373) for test_profiler_activation.js timeouts on Windows debug. 2014-02-06 14:34:05 -05:00
Viktor Stanchev dc0ed322d5 Bug 965373 - When the profiler stops it doesn't stop the EventTracer thread; r=bgirard
---
 toolkit/xre/EventTracer.cpp   | 48 +++++++++++++++++++++++++++++++------------
 tools/profiler/nsProfiler.cpp |  3 +++
 2 files changed, 38 insertions(+), 13 deletions(-)

--HG--
extra : rebase_source : 249b164d232320bbec25de2b13d23ed87ffff842
2014-02-06 11:59:25 -05:00
Vivien Nicolas cd0cf4ebe2 Bug 962044 - Forward event loop lag messages via an observer. r=ted 2014-02-05 19:53:53 +01:00
Ted Mielczarek 3bf6ebd317 Bug 927355 - Print fractional milliseconds in event tracer samples. r=bsmedberg 2013-10-17 15:07:55 -04:00
Birunthan Mohanathas b2658eb131 Bug 784739 - Switch from NULL to nullptr in toolkit/; r=ehsan 2013-10-10 16:36:42 -04:00
Jan Beich da6ac09f5b Bug 919111 - Explicitly include nsDebug.h for non-SPS. r=ted 2013-09-23 13:46:14 +02:00
Benoit Girard 8a70878243 Bug 853896 - Turn off MOZ_EVENT_TRACE when profiling. r=ted
--HG--
extra : rebase_source : 2ae36f2f4be730528b0f18154377fa32ee25b49a
2013-03-22 17:16:52 +01:00
Benoit Girard 042e2c83ad Bug 851611 - Part 3: Rename headers. r=jrmuizel
--HG--
rename : tools/profiler/sampler.h => tools/profiler/GeckoProfiler.h
rename : tools/profiler/sps_sampler.h => tools/profiler/GeckoProfilerImpl.h
extra : rebase_source : 6ea7c660764a4390cdd8dd91561fff1d7bad6035
2013-03-18 15:25:50 +01:00
Ed Morley 3091d3e2b6 Backed out changeset d195190adc48 (bug 851611)
--HG--
rename : tools/profiler/GeckoProfiler.h => tools/profiler/sampler.h
rename : tools/profiler/GeckoProfilerImpl.h => tools/profiler/sps_sampler.h
2013-03-18 14:10:30 +00:00
Benoit Girard b03f14270d Bug 851611 - Part 3: Rename headers. r=jrmuizel
--HG--
rename : tools/profiler/sampler.h => tools/profiler/GeckoProfiler.h
rename : tools/profiler/sps_sampler.h => tools/profiler/GeckoProfilerImpl.h
extra : rebase_source : 552fe1d3ff61d15b264aaf86f7c8cb4f4eff69d1
2013-03-18 14:41:02 +01:00
Honza Bambas fc7084f564 Bug 720778 - Important threads should have a name for better debugability, r=bsmith, sr=bsmedberg+glandium 2012-06-12 19:06:20 +02:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Benoit Girard c7c76c3daa Bug 707185 - Programmatic control for eventtracer. r=ted.mielczarek 2011-12-04 20:53:17 -05:00
Benoit Girard 9458d1c934 Bug 700754 - Add Profiler responsiveness hooks. r=ted.mielczarek 2011-11-28 00:31:59 -05:00
Ted Mielczarek 84d9b3353a bug 690203 - ensure that we unstick the event tracing thread when shutting down. r=bsmedberg 2011-10-18 10:51:36 -04:00
Ted Mielczarek 3ff59c5e7c bug 679427 - make event loop responsiveness threshold and interval configurable via environment variable. r=jlebar 2011-09-09 08:51:08 -04:00
Ted Mielczarek 9a67cab0ae bug 606574 - Implement event loop instrumentation using native events, core implementation + GTK2 implementation. r=karlt,cjones
--HG--
extra : rebase_source : bae5a25a76f4bb2f8ea4154923cfecbc4c39f128
2011-03-03 11:20:02 -05:00
Ehsan Akhgari 1f6dacab44 Back out bug 606574 for leaking a Mutex and a CondVar in crashtests 2011-04-13 14:08:43 -04:00
Ted Mielczarek 6b0a6c93bb bug 606574 - Implement event loop instrumentation using native events, core implementation + GTK2 implementation. r=karlt,cjones 2011-03-03 11:20:02 -05:00