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
This patch does the following renamings, which increase consistency.
- GeckoProfilerInitRAII -> AutoProfilerInit
- GeckoProfilerThread{Sleep,Wake}RAII -> AutoProfilerThread{Sleep,Wake}
- GeckoProfilerTracingRAII -> AutoProfilerTracing
- AutoProfilerRegister -> AutoProfilerRegisterThread
- ProfilerStackFrameRAII -> AutoProfilerLabel
- nsJSUtils::mProfilerRAII -> nsJSUtils::mAutoProfilerLabel
Plus a few other minor ones (e.g. local variables).
The patch also add MOZ_GUARD_OBJECT macros to all the profiler RAII classes
that lack them, and does some minor whitespace reformatting.
--HG--
extra : rebase_source : 47e298fdd6f6b4af70e3357ec0b7b0580c0d0f50
Bug 731974 added this code to get more accurate timer callbacks back when the refresh driver was based on timers. It shouldn't be needed anymore now that the refresh driver is based on vsync.
Bug 1322553 introduced GeckoProfilerTracingRAII. Part 2 converted a bunch of
places to use it, but messed one of them up:
> - profiler_tracing("Paint", "Reflow", Move(mReflowCause), TRACING_INTERVAL_START);
> + tracingLayoutFlush.emplace("Paint", "Reflow");
The Move(mReflowCause) was erroneously deleted. (There was a similar case with
Move(mStyleCause) that was not deleted.)
This patch reinstates the Move(mReflowCause).
--HG--
extra : rebase_source : 72aa0be43f5e381ddd7999cb2f56a44051f18779
We end up calling it in SequentialTask for updating CSS animations.
MozReview-Commit-ID: 7ip5XzU0VFb
--HG--
extra : rebase_source : 53b867d90ceea1547a1d35901360f6de8705aa02
This adds markers for FireScrollEvent, DispatchSynthMouseMove, ForwardTransaction, and NotifyDidPaint.
MozReview-Commit-ID: 9XahFGzIOls
--HG--
extra : rebase_source : 1985b2a11777a17dac621a35632f138a76224b0f
We added this so that MozAfterPaint events would be delivered to hidden documents as part of bug 539356, but I don't remember what needed it.
It doesn't appear to be necessary for any tests any more, so let's just get rid of it
MozReview-Commit-ID: HcmIjstZyLQ
--HG--
extra : rebase_source : 3f58129b3b1588e5d39e00c157e4bdba1afeed0c