Commit Graph

188 Commits

Author SHA1 Message Date
Andreas Farre
36eaf82163 Bug 1620594 - Part 2: Use SchedulerGroup::Dispatch instead of SystemGroup::Dispatch. r=nika
Depends on D67631

Differential Revision: https://phabricator.services.mozilla.com/D67632

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:33 +00:00
Emilio Cobos Álvarez
256c124f94 Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:

This was done by applying:

```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
         from subprocess import Popen, PIPE, check_output, CalledProcessError

         diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
-        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']

         if not output_file:
             args.append("-i")
```

Then running `./mach clang-format -c <commit-hash>`

Then undoing that patch.

Then running check_spidermonkey_style.py --fixup

Then running `./mach clang-format`

I had to fix four things:

 * I needed to move <utility> back down in GuardObjects.h because I was hitting
   obscure problems with our system include wrappers like this:

0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94              ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94     MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94                                ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)

   Which I really didn't feel like digging into.

 * I had to restore the order of TrustOverrideUtils.h and related files in nss
   because the .inc files depend on TrustOverrideUtils.h being included earlier.

 * I had to add a missing include to RollingNumber.h

 * Also had to partially restore include order in JsepSessionImpl.cpp to avoid
   some -WError issues due to some static inline functions being defined in a
   header but not used in the rest of the compilation unit.

Differential Revision: https://phabricator.services.mozilla.com/D60327

--HG--
extra : moz-landing-system : lando
2020-01-20 16:19:48 +00:00
Emilio Cobos Álvarez
aa3a695712 Bug 1609996 - Remove mozilla/Move.h. r=froydnj
rg -l 'mozilla/Move.h' | xargs sed -i 's/#include "mozilla\/Move.h"/#include <utility>/g'

Further manual fixups and cleanups to the include order incoming.

Differential Revision: https://phabricator.services.mozilla.com/D60323

--HG--
extra : moz-landing-system : lando
2020-01-20 16:18:20 +00:00
Jeff Walden
62a130ba0a Bug 1602882 - Move array operations to a new js/Array.h header. r=sfink,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D56595

--HG--
extra : moz-landing-system : lando
2019-12-11 06:17:44 +00:00
Nazım Can Altınova
e92cf6b787 Bug 1590706 - Part 1: Add a field inside ActivePS to hold the active BrowsingContext ID. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D54144

--HG--
extra : moz-landing-system : lando
2019-11-27 14:27:39 +00:00
Mihai Alexandru Michis
096946a25f Backed out 2 changesets (bug 1590706) for causing bustages in gtest/GeckoProfiler.cpp CLOSED TREE
Backed out changeset c98daf6c7687 (bug 1590706)
Backed out changeset 4c2af658ce76 (bug 1590706)
2019-11-27 15:42:55 +02:00
Nazım Can Altınova
372b36e229 Bug 1590706 - Part 1: Add a field inside ActivePS to hold the active BrowsingContext ID. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D54144

--HG--
extra : moz-landing-system : lando
2019-11-27 12:54:13 +00:00
Randell Jesup
05d65a0464 Bug 1572337: Remove old responsiveness profiler measurement r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D44060

--HG--
extra : moz-landing-system : lando
2019-11-08 21:08:07 +00:00
Ciure Andrei
b7c3599997 Backed out 3 changesets (bug 1572337, bug 1594015) for causing linting failures and build bustages CLOSED TREE
Backed out changeset 25f074eb5074 (bug 1594015)
Backed out changeset fc8a37c2c22c (bug 1572337)
Backed out changeset 913d6bd82284 (bug 1572337)
2019-11-07 16:37:00 +02:00
Randell Jesup
95be6cffe0 Bug 1572337: Remove old responsiveness profiler measurement r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D44060

--HG--
extra : moz-landing-system : lando
2019-11-07 12:53:35 +00:00
Gerald Squelart
9bcbe1a229 Bug 1579333 - nsIProfiler.waitOnePeriodicSampling() - r=gregtatum,froydnj
`nsIProfiler.waitOnePeriodicSampling()` returns a promise that gets resolved
after the next full periodic sampling. The promise is rejected if the sampler is
not running.

Implementation detail: `Promise` uses single-threaded ref-counting, so special
care is needed not to touch it in the sampler thread. Safe ref-counting is
handled by `nsMainThreadPtrHolder` and `nsMainThreadPtrHandle`. And the promise
is only resolved/rejected on the main thread.

Differential Revision: https://phabricator.services.mozilla.com/D50782

--HG--
extra : moz-landing-system : lando
2019-10-30 21:50:11 +00:00
Gerald Squelart
735dc941aa Bug 1540340 - Prevent ProfilerIOInterposeObserver recursive locking - r=gregtatum
The source of deadlock is due to profiler->lock->IO->interposer->profiler->lock
loops, where the second profiler call tries to lock the profiler mutex again.

Thanks to `profiler_is_locked_on_current_thread` the interposer can now check
whether the mutex is already locked, in which case it just won't call profiler
functions anymore, breaking the loop.

And now the profiler doesn't need to manually pause/resume/unregister the
(potential) interposer when doing I/Os.

Differential Revision: https://phabricator.services.mozilla.com/D50561

--HG--
extra : moz-landing-system : lando
2019-10-25 21:28:55 +00:00
Greg Tatum
03cd55fe37 Bug 1587503 - Provide a mechanism to inspect the current profiler configuration; r=gerald
This patch creates a new API to the nsIProfiler interface, through the activeConfiguration
property. It exposes the internal configuration of the profiler. In addition, this information
is serialized into the profile meta object.

Differential Revision: https://phabricator.services.mozilla.com/D48733

--HG--
extra : moz-landing-system : lando
2019-10-11 18:22:42 +00:00
Gerald Squelart
95f77c2409 Bug 1576819 - Use PROFILER_ADD_MARKER{,_WITH_PAYLOAD} everywhere - r=gregtatum
All calls to `profiler_add_marker()` (outside of the profilers code) are
now replaced by either:
- `PROFILER_ADD_MARKER(name, categoryPair)`
- `PROFILER_ADD_MARKER_WITH_PAYLOAD(name, categoryPair, TypeOfMarkerPayload,
                                    (payload, ..., arguments))`

This makes all calls consistent, and they won't need to prefix the category pair
with `JS::ProfilingCategoryPair::`.

Also it will make it easier to add (and later remove) internal-profiling
instrumentation (bug 1576550), and to replace heap-allocated payloads with
stack-allocated ones (bug 1576555).

Differential Revision: https://phabricator.services.mozilla.com/D43588

--HG--
extra : moz-landing-system : lando
2019-09-04 07:56:51 +00:00
Cameron McCormack
a1e18da1b1 Bug 1573090 - Part 2: Look up ELF symbol tables directly when pre-symbolicating Gecko profiles on Linux. r=gerald
Whereas previously MozDescribeCodeAddress would have handled demangling,
we need to explicitly do that from our new GetFunction method.  The string we
generate is now more useful for the profiler to merge -- having dropped the
address in the previous patch, and the file & line number and library in this
patch.

While we're at it, try to demangle Rust symbols too.

Ideally we'd add Rust symbol handling to DemangleSymbol in
StackWalk.cpp, but that lives in mozglue, which currently cannot have
any Rust crate dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D43142

--HG--
extra : moz-landing-system : lando
2019-08-23 05:45:16 +00:00
Cameron McCormack
4988c81b4c Bug 1573090 - Part 1: Use a CodeAddressService when pre-symbolicating Gecko profiles. r=gerald
This speeds up pre-symbolication substantially.

We add a new class ProfilerCodeAddressService as the next patch will add
some functionality.

This also changes the format of the string we generate when
symbolicating, by dropping the leading address and space if we do have a
string that MozDescribeCodeAddress gave us.  (We'll change this format
again in the next patch.)

Differential Revision: https://phabricator.services.mozilla.com/D43141

--HG--
extra : moz-landing-system : lando
2019-08-23 05:45:14 +00:00
Olli Pettay
c7ee50989c Bug 1565930, try to make Promise less error prone to compartment mismatches, r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D38762

--HG--
extra : moz-landing-system : lando
2019-07-29 14:43:54 +00:00
Gerald Squelart
b13eeec2e9 Bug 1552063 - Use PowerOfTwo and PowerOfTwoMask in profilers - r=gregtatum
PowerOfTwo makes for a cleaner and more expressive interface, showing that the
profiler will use a power-of-2 storage size.

Using PowerOfTwoMask in ProfilerBuffer also makes it more obvious that we want
cheap modulo operations.
And we don't need to keep the original capacity, as it's only used once and can
easily be recomputed from the mask.

Differential Revision: https://phabricator.services.mozilla.com/D36027

--HG--
extra : moz-landing-system : lando
2019-06-28 07:12:57 +00:00
Andreea Pavel
4d16b0896b Backed out 2 changesets (bug 1552063) for mingw build bustages on a CLOSED TREE
Backed out changeset 2975f3f76576 (bug 1552063)
Backed out changeset 6284bcd7304e (bug 1552063)
2019-06-28 02:09:41 +03:00
Gerald Squelart
475dbeee0a Bug 1552063 - Use PowerOfTwo and PowerOfTwoMask in profilers - r=gregtatum
PowerOfTwo makes for a cleaner and more expressive interface, showing that the
profiler will use a power-of-2 storage size.

Using PowerOfTwoMask in ProfilerBuffer also makes it more obvious that we want
cheap modulo operations.
And we don't need to keep the original capacity, as it's only used once and can
easily be recomputed from the mask.

Differential Revision: https://phabricator.services.mozilla.com/D36027

--HG--
extra : moz-landing-system : lando
2019-06-27 14:23:17 +00:00
Jim Porter
32b61264e9 Bug 1551992 - Compress profile data before sending to perf-html; r=mstange,julienw
Differential Revision: https://phabricator.services.mozilla.com/D33399

--HG--
extra : moz-landing-system : lando
2019-06-25 09:54:49 +00:00
Nika Layzell
95e8f0306b Bug 1540731 - Part 2: Move toplevel actors to override ActorDestroy, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D28573

--HG--
extra : moz-landing-system : lando
2019-05-21 17:04:21 +00:00
Boris Zbarsky
e03bc405fa Bug 1551106 part 2. Stop using [array] in profiler's GetFeatures/GetAllFeatures. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D30968

--HG--
extra : moz-landing-system : lando
2019-05-21 14:43:10 +00:00
Boris Zbarsky
dbdb74ad56 Bug 1551106 part 1. Stop using [array] in StartProfiler. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D30967

--HG--
extra : moz-landing-system : lando
2019-05-21 14:42:57 +00:00
Andrew McCreight
2841945140 Bug 1550860 - Mark implicit builtinclass interfaces explicitly. r=nika
If an XPIDL interface has a method or attribute that is [notxpcom],
then it is implicitly treated as [builtinclass], even if it is not
marked as such. For clarity, this patch goes through and marks every
place that relies on this behavior (aside from some test code).

Differential Revision: https://phabricator.services.mozilla.com/D30714

--HG--
extra : moz-landing-system : lando
2019-05-13 19:51:49 +00:00
Boris Zbarsky
1f3596354d Bug 1547923 part 2. Remove Promise::GlobalJSObject. r=mccr8
Promise::Compartment is unused.

The callers that want to call AutoJSAPI::Init can pass it an nsIGlobalObject,
which is actually _more_ efficient, since passing a JSObject just gets an
nsIGlobalObject from it and passes that.

Differential Revision: https://phabricator.services.mozilla.com/D29703

--HG--
extra : moz-landing-system : lando
2019-05-02 18:38:04 +00:00
Nazım Can Altınova
9411dd7ebb Bug 1543632 - Part 2: Add ClearAllPages function to idl and implement it for pre-test cleanup r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D27678

--HG--
extra : moz-landing-system : lando
2019-04-30 09:58:14 +00:00
Gerald Squelart
6f6c076612 Bug 1540114 - Display features in MOZ_PROFILER_HELP - r=mstange
Show the list of MOZ_PROFILER_STARTUP_FEATURES with their value, name,
description, and whether they are default and/or available on this platform.

Feature descriptions are now provided in PROFILER_FOR_EACH_FEATURE.
Available features and defaults are now defined in one place, for easier
maintenance.

Differential Revision: https://phabricator.services.mozilla.com/D25530

--HG--
extra : moz-landing-system : lando
2019-04-30 01:40:34 +00:00
Gerald Squelart
d736c2ae18 Bug 1520104 - Using Vector instead of nsTArray - r=mstange
Moving to non-XPCOM data structures, to help with upcoming transfer to mozglue.

Differential Revision: https://phabricator.services.mozilla.com/D24697

--HG--
extra : moz-landing-system : lando
2019-04-29 11:41:52 +00:00
Sylvestre Ledru
03c8e8c2dd Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-05 21:41:42 +00:00
Csoregi Natalia
ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru
d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu
24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru
399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Alex Gaynor
971c3169af Bug 1539254 - replace MaybeDuration in IPDL with native Maybe syntax; r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D24960

--HG--
extra : moz-landing-system : lando
2019-03-26 20:23:07 +00:00
Ryan Hunt
a5e1b94718 Bug 1523969 part 24 - Move method definition inline comments to new line in 'tools/'. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D21125

--HG--
extra : rebase_source : 06b6b612faecb0beff2c359f8893e40638c4a029
extra : histedit_source : 69bbbe1c1cd598cc52103143baf6bbe4ff4b2d5b
2019-02-25 16:13:15 -06:00
Greg Tatum
7e0ec04242 Bug 1529386 - Rename DiskIO marker payloads to FileIO in profiler; r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D20572

--HG--
extra : moz-landing-system : lando
2019-02-21 15:32:07 +00:00
Kris Maglione
b2f85650a1 Bug 1524687: Part 12 - Convert everything else to static registration. r=erahm
--HG--
extra : source : 625f71135038f79c075f758e316fbb00097c9a18
extra : intermediate-source : 7a1ef487a9e74d66b112034051e49b77023860b8
extra : histedit_source : 88d19dbee4a99faa191e49e2847c4c59aba05b0c%2C5ee702f97153152d31124e0c5f3e8318cbeb3195
2019-01-29 16:03:41 -08:00
arthur.iakab
470dbf03b6 Backed out 5 changesets (bug 1524687) for causing build bustages on platform.h CLOSED TREE
Backed out changeset 0f06a6b51bfe (bug 1524687)
Backed out changeset 7a1ef487a9e7 (bug 1524687)
Backed out changeset accad7b4cbc7 (bug 1524687)
Backed out changeset eb33f7e6467c (bug 1524687)
Backed out changeset 86cf09db340b (bug 1524687)
2019-02-21 02:04:02 +02:00
Kris Maglione
95c0cf7aa9 Bug 1524687: Part 12 - Convert everything else to static registration. r=erahm
--HG--
extra : rebase_source : ccc1b4f8559152237e523b67ea76e2b406c1cb11
extra : intermediate-source : e8ad5619116c31fc4d38e0e789ddb9b5d2a5bb25
extra : source : 625f71135038f79c075f758e316fbb00097c9a18
2019-01-29 16:03:41 -08:00
Gerald Squelart
6d2814f092 Bug 1509533 - Include child process profiles in shutdown profiles - r=mstange
Received exit profiles are now stored in the main process' ActivePS and managed
there, including discarding expired profiles (when they don't intersect with the
parent's profile anymore).

nsProfiler may grab exit profiles from the profiler when the add-on needs them.

On shutdown, the profiler now includes non-expired exit profiles.

Differential Revision: https://phabricator.services.mozilla.com/D20277

--HG--
extra : moz-landing-system : lando
2019-02-19 23:14:12 +00:00
Markus Stange
0b151b8c2b Bug 1500692 - Centralize profiling category definition and add infrastructure for subcategories. r=njn
The actual subcategories will be added in later patches, so that there are no
unused categories.

Differential Revision: https://phabricator.services.mozilla.com/D11334

--HG--
extra : moz-landing-system : lando
2019-02-16 17:37:43 +00:00
Gerald Squelart
0af4548b10 Bug 1520103 - Fixed non-unified Profiler build - r=mstange
Found issues by forcing a local non-unified build.

Also sorted #includes by logical groups (from most local to most global), and
alphabetically within groups.

Depends on D18621

Differential Revision: https://phabricator.services.mozilla.com/D18622

--HG--
extra : moz-landing-system : lando
2019-02-07 17:35:37 +00:00
Greg Tatum
cfa7eff1dc Bug 1525409 - Rework the IOMarkerPayload structure to include better information; r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D18743

--HG--
extra : moz-landing-system : lando
2019-02-06 14:45:29 +00:00
Greg Tatum
7042c8f1c3 Bug 1520526 - Add categories to all profiler markers; r=mstange
This commit adds categories to all markers. This way the profiler's
marker categories and frame label categories agree. There are a few
duplicate category properties on some of the marker payloads, but
this could be cleaned up in a follow-up if needed.

Differential Revision: https://phabricator.services.mozilla.com/D16864

--HG--
extra : moz-landing-system : lando
2019-01-18 15:40:15 +00:00
Jean-Yves Avenard
48517afae6 Bug 1512298 - Make IPDL MozPromise exclusive. r=gerald,froydnj
MozPromise most common use is to have an single or exclusive listener. By making the MozPromise generated by IPDL exclusive we can also use move semantics.

While at it, we also use move semantics for the ResponseRejectReason and via the callback's reject method so that the lambda used with the MozPromise::Then can be identical to the one used by the IPDL callback.
As it currently is, it provides no advantage over a copy as it's just an enum; however, this will facilitate future changes where it may not be.

Differential Revision: https://phabricator.services.mozilla.com/D13906

--HG--
extra : moz-landing-system : lando
2018-12-11 19:22:26 +00:00
Nathan Froyd
47b90c968b Bug 1511470 - part 2 - reduce copying of profile data in ProfilerChild; r=mstange
This case is exactly the same as the previous commit: we can just adopt
the newly-generated profile into the outgoing nsCString.
2018-12-10 16:22:26 -05:00
Nathan Froyd
e1d14adf40 Bug 1511470 - part 1 - reduce copying of profile data in FinishGathering(); r=mstange
At this point, we've freshly allocated data for the generated JSON.
There's no need to copy it into a separate nsCString; we can simply
adopt the generated JSON into the nsCString, saving a copy.
2018-12-10 16:22:26 -05:00
Tooru Fujisawa
7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
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