Commit Graph

1183 Commits

Author SHA1 Message Date
Nathan Froyd
6abed81ae8 Bug 1117860 - part 2 - factor out unified file writing from _add_unified_build_rules; r=mshal
Writing the unified files is another thing that will have to be moved
out of recursivemake.py eventually.  And it doesn't belong inline amidst
makefile rules and variables.  Move its logic to a separate function as
well.
2014-12-22 09:38:02 -05:00
Nathan Froyd
6e3ac098ec Bug 1117860 - part 1 - factor sources->unified file computation out of _add_unified_build_rules; r=mshal
_add_unified_build_rules does quite a lot of work besides adding
makefile rules and variables.  The divying up of source files into
unified files is one part of that, so move it out into its own function.
When we eventually move that computation out of recursivemake.py, this
refactoring will make it easier to verify that's what we've done.
2014-12-22 09:35:52 -05:00
Wes Kocher
bd05346fdc Merge inbound to m-c a=merge 2014-12-30 15:48:13 -08:00
Wes Kocher
635e154f17 Merge m-c to fx-team a=merge 2014-12-29 17:35:54 -08:00
Gregory Szorc
df57d91b67 NO BUG - Remove deleted python/codegen from Sphinx docs
The python/codegen directory was removed in 9cbc28021b7b (bug 1108294).
However, the Sphinx reference lingered. Kill the dangling reference.
2014-12-29 15:49:36 -08:00
Gregory Szorc
5724222212 Bug 1115278 - Fix mach documentation issues; r=glandium
terminal.py had an ambiguous |import logging| that was importing
mach.logging from Sphinx. We fix it.

There was also a poorly formed link in the mach commands documentation.
We fix it.
2014-12-24 10:26:34 -08:00
Gregory Szorc
6802f0c912 Bug 1115278 - Add virtualenv to Sphinx environment; r=glandium
Python API documentation requires the ability to import modules. So, we
set up a virtualenv in our Sphinx environment so module loading works.

This solution isn't perfect: a number of modules fail to import when run
under sphinx-build.
2014-12-24 10:17:02 -08:00
Gregory Szorc
b4eda56fb0 Bug 1115278 - Move Sphinx documentation staging into Sphinx extension; r=glandium
Previously, code for staging the Sphinx documentation from moz.build
metadata lived in a mach command and in the moztreedocs module. This
patch moves the invocation to the Sphinx extension.

When the code is part of the Sphinx extension, it will run when executed
with sphinx-build. This is a prerequisite to getting RTD working, since
sphinx-build is the only supported entrypoint for generating
documentation there.

With this patch, we can now invoke sphinx-build to build the
documentation. The `mach build-docs` command is no longer needed.
2014-12-24 09:46:41 -08:00
Wes Johnston
aafaba876c Bug 1064669 - Use a Viewless Fragment for managing MediaPlayer lifecycle. r=mfinkle 2014-09-19 16:55:18 -07:00
Phil Ringnalda
dba8ff7685 Merge m-i to m-c, a=merge 2014-12-24 15:38:41 -08:00
Nathan Froyd
8b887887b6 Bug 1114598 - move common IPDL file handling from recursivemake.py to common.py; r=gps
The recursivemake backend knows how to do several things with the IPDL
sources:

1) Determine the C++ sources that will be generated from given IPDL
   sources.
2) Write out all the makefile rules and variables for said sources.

The first part isn't unique to the recursivemake backend; other backends
would eventually like to know what C++ sources come from IPDL source
files for easier cross-referencing purposes, etc.  Let's take a first
cut at moving things into CommonBackend.  (This may not be the best
interface, since it relies on consume_finished being invoked, and not
all backends call CommonBackend.consume_finished.  Still, it's a start.)
2014-12-22 10:00:48 -05:00
Nathan Froyd
aa8351bf49 Bug 1113730 - fix TypeError in the visualstudio backend; r=gps,f=philip.chee 2014-12-19 12:21:22 -05:00
Wes Kocher
9a7cbc0d33 Merge inbound to mozilla-central a=merge CLOSED TREE 2014-12-23 16:47:42 -08:00
Pavel Roskin
b7eb105ffc Bug 1111256 - Use LooseVersion for Python version comparison; r=gps
Python release candidates didn't parse with StrictVersion. Use
LooseVersion instead.
2014-12-23 09:43:45 -08:00
Gregory Szorc
92dfb82329 Bug 930808 - Upgrade to psutil 2.1.3; r=glandium
psutil 2.1.3 is replacing psutil 1.0.1. There are numerous bug fixes and
feature enhancements in psutil worth obtaining.

Source code was obtained from
https://pypi.python.org/packages/source/p/psutil/psutil-2.1.3.tar.gz and
uncompressed into python/psutil without modification except for the
removal of the egg-info directory and the .travis.yml file.
2014-12-23 10:45:15 -08:00
Phil Ringnalda
db84ee33c0 Backed out changeset 697eb6db7d96 (bug 930808) for OS X make check failures 2014-12-23 21:04:19 -08:00
Gregory Szorc
5881d1a65d Bug 930808 - Upgrade to psutil 2.1.3; r=glandium
psutil 2.1.3 is replacing psutil 1.0.1. There are numerous bug fixes and
feature enhancements in psutil worth obtaining.

Source code was obtained from
https://pypi.python.org/packages/source/p/psutil/psutil-2.1.3.tar.gz and
uncompressed into python/psutil without modification except for the
removal of the egg-info directory and the .travis.yml file.
2014-12-23 10:45:15 -08:00
Gregory Szorc
af58a95a53 Bug 930808 - Upgrade virtualenv to 12.0.2; r=glandium
Source archive downloaded from
https://pypi.python.org/packages/source/v/virtualenv/virtualenv-12.0.2.tar.gz
and uncompressed into python/virtualenv. The egg-info directory was
removed.
2014-12-23 10:26:10 -08:00
Wes Kocher
144b91830d Merge m-c to fx-team a=merge CLOSED TREE 2014-12-23 16:56:21 -08:00
Nick Alexander
dc4ab68d97 Bug 1108771 - Part 4: Implement |mach bootstrap| for mobile/android on OS X with homebrew. r=gps
Pushing on a CLOSED TREE because this is NPOTB.

The custom brew formula is a lightly edited version of an earlier
revision of brew's android-ndk.rb.  It's not clear that using a custom
brew formula for the Android SDK version r8e is better than using the
existing android Python module for installing the SDK and the NDK, but
it's done now and works locally.  If we really wanted to avoid shipping
it, we could probably arrange to land it in
https://github.com/Homebrew/homebrew-versions.

I see no easy way to install the Java 1.7 JDK with macports, so in the
spirit of the good now being better than the perfect later, I've
punted.  (I don't see an Android NDK package either, but that
functionality exists in Python.)  Patches wanted!
2014-12-21 15:29:19 -08:00
Nick Alexander
fbe70122ec Bug 1108771 - Part 3: Factor _ensure_*_packages out of OS X bootstrapper. r=gps
This prepares the way for implementing install_mobile_android_packages
on OS X.
2014-12-21 15:29:19 -08:00
Nick Alexander
278608061f Bug 1108771 - Part 2: Implement |mach bootstrap| for mobile/android on Debian-like systems. r=gps
This adds a generic android Python module that handles:

* downloading and unpacking Google's Android SDK and NDK bundles;
* using the |android| tool to install additional Android packages;
* printing a mozconfig snippet suitable for mobile/android builds.
2014-12-21 15:29:18 -08:00
Nick Alexander
75df86f032 Bug 1108771 - Part 1: Prompt for which application to bootstrap. r=gps
This lays the foundation for adding support for bootstrapping
mobile/android.

* Queries for which application to bootstrap, currently browser or
  mobile/android;

* Adds call to install_APPLICATION_packages after
  install_system_packages;

* Adds call to suggest_APPLICATION_mozconfig after bootstrapping
  everything;

* and splits install_browser_packages out of install_system_packages
  throughout (essentially untested, but generally simple).

To implement a new application (b2g?), just add it to the list of
applications and implement install_b2g_packages throughout.
2014-12-21 15:29:17 -08:00
Nathan Froyd
8f7cb7b720 Bug 1114684 - inform mozinfo about the MOZ_TSAN build configuration; r=ahal
Various bits of the test harnesses key off of mozinfo.info.get('asan');
we will need a similar switch for finding out whether this build
supports tsan.
2014-12-22 13:46:14 -05:00
Brian O'Keefe
20cea6a5cc Bug 923080 - Generate xpt files into final location. r=glandium
Now that the mozbuild backend knows about FINAL_TARGET, we are able to
install generated xpt files into their final location. This saves us
from copying xpt files into their final location on every build.

Original patch by gps, rebased and comments addressed by Ms2ger
2014-05-21 08:25:57 -04:00
Nathan Froyd
04115eedfd Bug 1109409 - improve mozpack.BaseFile.copy() performance on Windows; r=gps
mopack.BaseFile.copy() performs a generic read/write file copy.  Windows
has an explicit CopyFile() call that tests have shown to be
significantly faster.  Let's use that instead via the magic of ctypes.
2014-12-12 11:59:24 -05:00
Xidorn Quan
b159469f4e Bug 1103644 - Try default browser for "mach resource-usage" if the specified one doesn't work. r=gps DONTBUILD 2014-12-19 09:50:20 +11:00
Nathan Froyd
f22c40086b Bug 1109302 - make moz.build *SOURCES variables emit proper objects; r=gps
Having SOURCES and its close relatives go through VariablePassthru
objects clutters the handling of VariablePassthru in build backends and
makes it less obvious how to handle things that actually get compiled.

Therefore, this patch introduces four new moz.build objects
corresponding to the major variants of SOURCES.  It looks like a large
patch, but there's an ample amount of new tests included, which accounts
for about half of the changes.
2014-12-09 16:45:59 -05:00
Carsten "Tomcat" Book
4a50613811 merge mozilla-inbound to mozilla-central a=merge 2014-12-18 13:50:27 +01:00
Ankit Goyal
7ef730613c Bug 1109867 - Check for debugger before getting debugger info; r=gps 2014-12-17 22:30:50 -08:00
Nicholas Nethercote
d5bcc4e394 Bug 1100851 (follow-up) - Fix trivial bustage in |mach run --dmd|. r=glandium.
DONTBUILD because NPOTB.
2014-12-16 20:46:40 -08:00
Gregory Szorc
122658253a Bug 1108399 - Implement mach sub-command dispatching; r=ahal 2014-12-06 22:33:12 -08:00
Gregory Szorc
9a9ca81a03 Bug 1108399 - Handle help on mach sub-commands; r=ahal 2014-12-06 22:39:32 -08:00
Gregory Szorc
83d847a354 Bug 1108399 - Split command group populating into own function; r=ahal
An upcoming patch will reuse this code. Split it out into its own
function.
2014-12-07 11:56:31 -08:00
Gregory Szorc
5c9c715038 Bug 1108399 - Introduce decorator for mach sub-commands; r=ahal
With this patch, we now have the ability to declare mach sub-commands.
Subsequent patches will implement dispatching for sub-commands.
2014-12-07 11:40:39 -08:00
Gregory Szorc
cab32f370f Bug 1108399 - Properly name command help function; r=ahal
We will soon have proper sub-commands. Let's fix function names.
2014-12-06 21:58:46 -08:00
Gregory Szorc
06c94040fe Bug 1108399 - Remove outdated comment about hooking up conditional commands; r=ahal
mach conditions are implemented elsewhere. This comment can die.
2014-12-06 21:53:16 -08:00
Gregory Szorc
318fd6e02d Bug 1108399 - Fix docs for mach decorators; r=ahal
Documentation was referencing sub commands. The proper terminology is
"command."
2014-12-06 21:15:27 -08:00
Gregory Szorc
5af0c6abf1 Bug 1108399 - Properly link to Python docs; r=ahal
There were a few parts of the docs that were linking to Python types
incorrectly. Let's fix that.
2014-12-07 11:37:54 -08:00
Gregory Szorc
bfe6799d76 Bug 1108399 - Split mach documentation into multiple articles; r=ahal
The main mach docs page is a bit long. Let's split it into multiple
articles to increase readability going forward.
2014-12-07 11:34:06 -08:00
Gregory Szorc
39a76e34a5 Bug 1108399 - Improve code linking in mach docs; r=ahal
Now that mach's docs are part of a proper Sphinx install, link to
Python type docs. While we're here, we also clean up formatting of code
samples.
2014-12-07 11:23:46 -08:00
Gregory Szorc
907c3c2ef9 Bug 1108399 - Move mach docs into sphinx; r=ahal
mach has restructured text documentation. Let's expose it to the in-tree
Sphinx config so we can increase visibility of the documentation.
2014-12-07 10:40:19 -08:00
Nicholas Nethercote
8842f78222 Bug 1100851 (follow-up 2) - Fix more trivial bustage in |mach run --dmd|. r=glandium.
DONTBUILD because NPOTB.
2014-12-17 18:24:38 -08:00
Nathan Froyd
06bc5468c5 Bug 1109826 - part 1 - make the preprocessor able to avoid emitting warnings about missing directives; r=mshal 2014-12-10 14:49:44 -05:00
Nicholas Nethercote
84279946f2 Bug 1100851 - Tweak DMD to account for the fact that $DMD can now be undefined. r=glandium.
Now that defining $DMD is no longer necessary to run DMD, this patch does the
following.
- Removes all the places where we set DMD=1 (test harnesses, etc.)
- Still handles DMD=1, for backwards compatibility.
- Prints "$DMD is undefined" at DMD start-up if appropriate.
- Writes a |null| value for |dmdEnvVar| in the JSON if $DMD is undefined. Bumps
  the DMD output version number accordingly.
- Changes a bunch of the test files accordingly, including changing the mode of
  script-ignore-alloc-fns.json in order to test a case where $DMD is undefined.
2014-11-27 21:04:46 -08:00
Phil Ringnalda
e850ff7d0c Backed out 2 changesets (bug 1105128) for Windows make check failures
CLOSED TREE

Backed out changeset 5dfe0838798c (bug 1105128)
Backed out changeset def38e936db8 (bug 1105128)
2014-12-09 20:42:01 -08:00
Gregory Szorc
1ef2b3f9f0 Bug 1105128 - Alias os.path functions in local scope; r=glandium
Various os.path attributes are being used in tight loops. Having local
variables prevents extra dictionary lookups.

This appears to shave 10-20ms off of the tests install manifest
processing time.
2014-11-25 18:37:11 -08:00
Gregory Szorc
14a2905919 Bug 1105128 - Avoid excessive path normalization in FileCopier.copy(); r=glandium
FileCopier.copy() was performing a lot of os.path.normpath() operations.
Profiling revealed that os.path.normpath() was the function with the
most wall time CPU usage when processing the tests manifests. Upon
subsequent examination of the code in question, all the paths being used
were already normalized. So, os.path.normpath() wasn't accomplishing
anything.

This patch results in ~300ms reduction in wall time to process the tests
install manifest on a fully populated page cache. Execution time drops
from ~2.8s to ~2.5s.

Profiling reveals that after this patch os.stat() is the #1 wall time
consumer. However, os.path.{join,dirname,normpath} still account for
~1.5x the wall time of os.stat(). There is still room to optimize
this function.
2014-11-25 18:16:22 -08:00
Nicholas Nethercote
4beda4eda0 Bug 1094552 (part 6) - DMD: add support for cumulative heap profiling. r=mccr8.
By adding a new "cumulative" mode.
2014-10-30 20:22:47 -07:00
Nicholas Nethercote
1794d21329 Bug 1094552 (part 5) - DMD: choose the profiling mode at start-up. r=mccr8.
This patch moves profiling mode selection from post-processing (in dmd.py) to
DMD start-up. This will make it easier to add new kinds of profiling, such as
cumulative heap profiling.

Specifically:

- There's a new --mode option. |LiveWithReports| is the default, as it is
  currently.

- dmd.py's --ignore-reports option is gone.

- There's a new |mode| field in the JSON output.

- Reports-related operations are now no-ops if DMD isn't in LiveWithReports
  mode.

- Diffs are only allowed for output files that have the same mode.

- A new function ResetEverything() replaces the SetSampleBelowSize() and
  ClearBlocks(), which were used by the test to change DMD options.

- The tests in SmokeDMD.cpp are split up so they can be run multiple times, in
  different modes. The exact combinations of tests and modes has been changed a
  bit.
2014-12-08 14:45:14 -08:00