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

43 Коммитов

Автор SHA1 Сообщение Дата
Ricky Stewart 210585edd2 Bug 1672023 - Remove excluded files from `black.yml`
These files were omitted from the original patch because reformatting them required some manual intervention in order to avoid breaking unit tests. Generally the `noqa` lines were already there and just needed to be moved from one line to another (due to the reformatting by `black`), but sometimes `black` saw fit to move a bunch of stuff all onto one line, requiring me to introduce new `noqa` lines.

Besides the autoformat by `black` and some manual fixups, this patch contains no other changes.

# ignore-this-changeset

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

Depends on D94045
2020-10-26 18:21:44 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart fe80718d67 Bug 1672023 - Remove excluded files from `black.yml` r=sylvestre,perftest-reviewers,geckoview-reviewers,agi
These files were omitted from the original patch because reformatting them required some manual intervention in order to avoid breaking unit tests. Generally the `noqa` lines were already there and just needed to be moved from one line to another (due to the reformatting by `black`), but sometimes `black` saw fit to move a bunch of stuff all onto one line, requiring me to introduce new `noqa` lines.

Besides the autoformat by `black` and some manual fixups, this patch contains no other changes.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94052
2020-10-23 20:40:44 +00:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Dorel Luca 26941cf2f5 Backed out changeset 94ec15429e21 (bug 1672023) for Backout conflicts with Bug 1654103. CLOSED TREE 2020-10-22 03:43:01 +03:00
Ricky Stewart 8b352f1843 Bug 1672023 - Remove excluded files from `black.yml` r=sylvestre,perftest-reviewers,geckoview-reviewers,agi
These files were omitted from the original patch because reformatting them required some manual intervention in order to avoid breaking unit tests. Generally the `noqa` lines were already there and just needed to be moved from one line to another (due to the reformatting by `black`), but sometimes `black` saw fit to move a bunch of stuff all onto one line, requiring me to introduce new `noqa` lines.

Besides the autoformat by `black` and some manual fixups, this patch contains no other changes.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94052
2020-10-21 21:29:30 +00:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Ricky Stewart 31755b431d Bug 1657650 - Require that Mach command providers subclass MachCommandBase. r=remote-protocol-reviewers,marionette-reviewers,maja_zf,mhentges,froydnj
Today we don't require that `mach` `CommandProvider`s subclass from any particular parent class and we're very lax about the requirements they must meet. While that's convenient in certain circumstances, it has some unfortunate implications for feature development.

Today the only requirements that we have for `CommandProvider`s are that they have an `__init__()` method that takes either 1 or 2 arguments, the second of which must be called `context` and is populated with the `mach` `CommandContext`. Again, while this flexibility is occasionally convenient, it is limiting. As we add features to `mach`, having a better idea what the shape of our `CommandProvider`s are and how we can instantiate them and use them is increasingly important, and this gives us additional control when having `mach` configure `CommandProvider`s based on data that is only available at the `mach` level. In particular, we plan to leverage this in bugs 985141 and 1654074.

Here we add validation to the `CommandProvider` decorator to ensure all classes inherit from `MachCommandBase`, update all `CommandProvider`s in-tree to inherit from `MachCommandBase`, and update source and test code accordingly.

Follow-up work: we now require (de facto) that the `context` be populated with a `topdir` attribute by the `populate_context_handler` function, since instantiating the `MachCommandBase` requires a `topdir` be provided. This is fine for now in the interest of keeping this patch reasonably sized, but some additional refactoring could make this cleaner.

Differential Revision: https://phabricator.services.mozilla.com/D86255
2020-08-07 18:24:59 +00:00
Nicholas Nethercote 61f2f5aef8 Bug 1638976 - Convert 'mach power' to run with Python 3. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D76273
2020-05-25 23:50:19 +00:00
Nicholas Nethercote 60ecbac3b2 Bug 1639785 - Update `rapl` for new processors. r=erahm
Also change the processor IDs to hex, because that's what the Linux kernel
source code uses. And reorder the cases a little.

Differential Revision: https://phabricator.services.mozilla.com/D76272
2020-05-22 02:29:54 +00:00
Chris Peterson 406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
Maliha Islam 2d69e323f1 Bug 1559975 - Make directories python3 compatible r=catlee
Differential Revision: https://phabricator.services.mozilla.com/D35257

--HG--
extra : moz-landing-system : lando
2019-07-02 15:47:34 +00:00
Nicholas Nethercote 8c151cc707 Bug 1535880 - Always check ReadValueFromPowerFile() return value. r=glandium
This makes RAPL abort with more informative error messages if certain
kernel-provided files aren't present.

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

--HG--
extra : moz-landing-system : lando
2019-03-19 11:20:11 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01: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
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Sylvestre Ledru b5f9522581 Bug 1438839 - Finish the flake8 fixes on tools/ r=ahal
MozReview-Commit-ID: F9c4laxe8Pt

--HG--
extra : rebase_source : ed304bcf485a448e863b9bbc82427ae5a88ea2c2
extra : histedit_source : 2c8e0beefee259fe7a31e0436e7a94519a3e05ae
2018-03-15 11:31:12 +01:00
Sylvestre Ledru a0ab39f145 Bug 1438839 - Fix the remaining flake8 issues by hand r=ahal
MozReview-Commit-ID: Fv1MZIpCL8Z

--HG--
extra : rebase_source : 804567a78a5696997e2aa511814a4f8ff22d9c31
extra : histedit_source : 88401e831d81708b6ed6122666ba9fa8c1de23d5
2018-03-15 11:34:03 +01:00
Sylvestre Ledru ef5ad1811f Bug 1438839 - autopep8 -i --max-line-length 99 on the tools/ r=ahal
MozReview-Commit-ID: KSKbctxjxl0

--HG--
extra : rebase_source : feebd58ff005750face884035f85a55e0ff638c8
extra : histedit_source : 5d7464caeb41bad25bc99d3b2e32ea5285464499
2018-03-15 11:32:42 +01:00
Chris Manchester c0a229d4c3 Bug 1386876 - Replace all uses of DISABLE_STL_WRAPPING with a template, remove DISABLE_STL_WRAPPING. r=glandium
MozReview-Commit-ID: FMEtb5PY7iP

--HG--
extra : rebase_source : 3cdee7528846462c758e623d6bcd2e6e17dbabff
2017-09-11 11:33:26 -07:00
Sylvestre Ledru 5941aa8f13 Bug 1337358 - Converts for(...; ...; ...) loops to use the new range-based loops in C++11 in tools/ r=froydnj
MozReview-Commit-ID: GdeCzDXjzzg

--HG--
extra : rebase_source : b00971238ff78d23d9bcec31f905ec268a614527
2017-02-08 12:04:50 +01:00
Kirti Singla bd74c7db4a Bug 1301627 - Change the name of commented variables when calling perf_event_open. r=erahm 2016-10-23 10:10:00 -07:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
George Wright e75c590407 Revert "Bug 1114647 - Rename "plugin-container" to "firefox-webcontent" and create a new executable target for Win32 called "firefox-plugin-container" r=ted,jhamer" because of widespread breakage due to whitelisted executable names in third parties
This reverts commit a94b5f861bd0d25043a3bb7a0c3128acf8c0b93a.


--HG--
rename : ipc/contentproc/firefox-webcontent.cpp => ipc/contentproc/plugin-container.cpp
2016-04-08 13:34:40 -04:00
George Wright 5c454494ce Bug 1114647 - Rename "plugin-container" to "firefox-webcontent" and create a new executable target for Win32 called "firefox-plugin-container" r=ted,jhamer
--HG--
rename : ipc/app/module.ver => ipc/app/plugin-container/module.ver
rename : ipc/contentproc/plugin-container.cpp => ipc/contentproc/firefox-webcontent.cpp
2016-04-01 02:12:59 -04:00
Chris Peterson 150add3f29 Bug 1236393 - Annotate intentional switch fallthrough to suppress -Wimplicit-fallthrough warning in tools/power/rapl.cpp. r=njn
tools/power/rapl.cpp:331:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
2015-11-23 22:41:07 -08:00
Chris Peterson 3193160487 Bug 1222887 - Suppress -Wunreachable-code warning in tools/power. r=njn
tools/power/rapl.cpp:844:5 [-Wunreachable-code] code will never be executed

clang reports a -Wunreachable-code warning for sigemptyset() because Darwin's sigemptyset() is a macro that always returns 0. Thus `if (sigemptyset(&sa.sa_mask) < 0)` is always false and `Abort("sigemptyset() failed")` is never called. Linux's sigemptyset() can return 0 or -1. The extra parens around (0) suppress the clang warning.
2015-11-09 01:03:54 -08:00
Nicholas Nethercote 557e2db669 Bug 1214924 - Add "WindowServer" and "kernel" processes to |mach power|'s output. r=BenWa.
--HG--
extra : rebase_source : c85d0c6b92c82c32b5e194143358956479a477b9
2015-10-16 14:01:22 +11:00
Nicholas Nethercote de59a42fb1 Bug 1204787 - Add |mach power|. r=glandium.
This extracts the most useful browser-related measurements from rapl and
powermetrics.

--HG--
extra : rebase_source : 81ce14acc6c6e1bc7ac6c34bf119d8e619956dd1
2015-09-15 16:23:45 +10:00
Nicholas Nethercote a919a2d114 Bug 1203811 - Clarify two error messages in tools/power/rapl. r=heycam. 2015-09-10 23:12:31 -07:00
Nicholas Nethercote c93125fd60 Bug 1203834 - Fix's rapl's handling of unsupported power domains. r=glandium.
The "gpu" and "ram" domains aren't supported by all platforms. rapl has a
special constant |kUnsupported_j| to represent this on Linux, but I
accidentally have a minus sign in front of it in several places, which means
that instead of printing "n/a" for unsupported planes we always print "1.0".

I think this happened because I used to hardwire -1 in there and then I later
changed it to a constant but forgot to remove the minus signs.

It sure would be nice to have automated testing for this stuff, but I don't see
how to do it.
2015-09-10 23:12:20 -07:00
Nicholas Nethercote 51b5ca14d4 Bug 1201811 (part 2) - Don't print distribution stats if there was only 1 sample. r=erahm.
--HG--
extra : rebase_source : aa6b26441c5ca285a15d58d97a62f064e891d09b
2015-09-04 01:45:13 -07:00
Nicholas Nethercote 21be35d70a Bug 1201811 (part 1) - Don't use integer arithmetic when summing totals in rapl. r=erahm.
--HG--
extra : rebase_source : 2c800587f4bc49a492fb85be1e7d6c0c7885052e
2015-09-04 01:04:46 -07:00
Nicholas Nethercote f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Nicholas Nethercote 4e53819fec Bug 1198334 (part 0) - Tighten up warnings-as-errors usage in tools/power/. r=glandium.
--HG--
extra : rebase_source : a8239fd2911e57820eba3c1759365627f669b9d2
2015-08-27 20:40:44 -07:00
Nicholas Nethercote 33d3e011d3 Bug 1198137 (follow-up) - Add a missing #include to unbreak Mac OS builds on a CLOSED TREE. r=me
--HG--
extra : rebase_source : 9704e746704ef614b48b9ebcdb0afd3e729258ad
2015-08-26 11:48:08 +10:00
Nicholas Nethercote cdcc41338a Bug 1198137 - Add some summary stats to tool/power/rapl's output. r=erahm.
"mean" is most useful, then "min" and "max". The rest are moderately useful.

--HG--
extra : rebase_source : 03fda0e0d32081024abd5cdf859f16dac60bbc19
2015-08-25 18:11:03 -07:00
Nicholas Nethercote b7f77af473 Bug 1197694 - fflush() rapl output so it always appears immediately. r=erahm.
--HG--
extra : rebase_source : 2de1c517202616e6daad6e578cfbe89b65cdce0f
2015-08-24 15:59:37 -07:00
Nicholas Nethercote b83cd56ff9 Bug 1194560 (follow-up) - Only build rapl on Linux if the arch is x86 or x86-64. r=glandium.
--HG--
extra : rebase_source : c115f898cb1ce8129657e3435881e4f220eca566
2015-08-20 17:02:18 -07:00
Nicholas Nethercote 68c09ac436 Bug 1194560 - Add tools/power/rapl, a RAPL-reading program for power profiling. r=erahm,glandium.
--HG--
extra : rebase_source : 7303d7209f6c9ae8bbd911a379078343b7cb5a7b
2015-08-19 22:25:30 -07:00