Commit Graph

38 Commits

Author SHA1 Message Date
Ted Mielczarek
44a6436fb8 bug 1255485 - build PROGRAMs directly in dist/bin instead of copying them. r=nalexander
Historically we built all our binaries in directories in the objdir, then
symlinked them into dist/bin. Some binaries needed to be copied instead
so that certain relative path lookups work properly, so we resorted to
sprinkling `NSDISTMODE=copy` around Makefiles.

This change makes it so we build PROGRAMs (not any other sort of targets)
directly in dist/bin instead. We could do the same for our other targets
with a little more work.

There were several places in the tree that were copying built binaries to
some other place and needed fixup to match the new location of binaries.

On Windows pdb files are left in the objdir where the program was
originally linked. symbolstore.py needs to locate the pdb file both to
determine whether it should dump symbols for a binary and also to copy
the pdb file into the symbol package. We fix this by simply looking for
the pdb file in the current working directory if it isn't present next
to the binary, which matches how we invoke symbolstore.py.

MozReview-Commit-ID: 8TOD1uTXD5e
2018-01-10 14:26:12 -05:00
Gurzau Raul
ebeea06a65 Backed out 5 changesets (bug 1255485) for mochitest failures on test/mochitest/test_hangui.xul
Backed out changeset 90b7449882b6 (bug 1255485)
Backed out changeset 5672cf8d324b (bug 1255485)
Backed out changeset ed6dd4aefadb (bug 1255485)
Backed out changeset 0ba36c0feddb (bug 1255485)
Backed out changeset 51af06b6123c (bug 1255485)
2018-01-23 02:01:43 +02:00
Ted Mielczarek
47e236d7d3 bug 1255485 - build PROGRAMs directly in dist/bin instead of copying them. r=nalexander
Historically we built all our binaries in directories in the objdir, then
symlinked them into dist/bin. Some binaries needed to be copied instead
so that certain relative path lookups work properly, so we resorted to
sprinkling `NSDISTMODE=copy` around Makefiles.

This change makes it so we build PROGRAMs (not any other sort of targets)
directly in dist/bin instead. We could do the same for our other targets
with a little more work.

There were several places in the tree that were copying built binaries to
some other place and needed fixup to match the new location of binaries.

On Windows pdb files are left in the objdir where the program was
originally linked. symbolstore.py needs to locate the pdb file both to
determine whether it should dump symbols for a binary and also to copy
the pdb file into the symbol package. We fix this by simply looking for
the pdb file in the current working directory if it isn't present next
to the binary, which matches how we invoke symbolstore.py.

MozReview-Commit-ID: 8TOD1uTXD5e
2018-01-10 14:26:12 -05:00
Mike Hommey
0247186cc2 Bug 1430277 - Skip symbolstore.py test when building with --enable-strip. r=mshal 2018-01-13 07:17:25 +09:00
Nathan Froyd
d562522c74 Bug 1401226 - don't throw away errors from running file in symbolstore.py; r=ted.mielczarek
We want symbolstore.py to fail, preferably loudly, if we can't find the
necessary tools, and throwing away errors here runs counter to that
goal.  Dumper is a base class for Dumper_Win32, where we probably don't
have file(1), but Dumper_Win32 shouldn't be calling RunFileCommand.
2017-11-09 13:52:47 -04:00
Mike Shal
3383b336e3 Bug 1402012 - Update buildconfig.py to use PartialConfigEnvironment; r=glandium
By using the PartialConfigEnvironment, the clients of buildconfig will
depend on config.statusd/ files instead of config.status directly.
Clients can access substs and defines using buildconfig.substs['FOO'] or
buildconfig.defines['BAR'], and then collect file-level dependencies for
make using buildconfig.get_dependencies(). All GENERATED_FILES rules
already make use of this because file_generate.py automatically includes
these dependencies (along with all python modules loaded).

As a result of this commit, re-running configure will no longer cause
the world to be rebuilt. Although config.status is updated, no build
steps use config.status directly and instead depend on values in
config.statusd/, which are written with FileAvoidWrite. Since those
files are not official targets according to the make backend, make won't
try to continually rebuild the backend when those files are out of date.
And since they are FileAvoidWrite, make will only re-run dependent steps
if the actual configure value has changed.

As a result of using JSON to load data from the config.statusd
directory, substs can be unicode (instead of a bare string type).
generate_certdata.py converts the subst manually to a string so the
value can be exported to the environment without issue on Windows.

Additionally, patching the buildconfig.substs dict no longer works, so
the unit-symbolstore.py test was modified to patch the underlying
buildconfig.substs._dict instead.

The other files that needed to be modified make use of all the defines
for the preprocessor. Those that are used during 'mach build' now use
buildconfig.defines['ALLDEFINES'], which maps to a special
FileAvoidWrite file generated for the PartialConfigEnvironment.

MozReview-Commit-ID: 2pJ4s3TVeS8
2017-08-24 22:52:01 -04:00
Ted Mielczarek
64e8dc5996 bug 1392312 - fix filename mapping in symbolstore.py on Windows. r=chmanchester
symbolstore.py processes filenames in FILE lines of symbol files to encode
information about the source repository they came from, or to mark
known generated source files. It also reads the dist/include install
manifest so it can map header files from there back to their source locations.

These mappings were broken on Windows because symbolstore.py first passes
filenames into `FixFilenameCase`, which calls `GetFinalPathNameByHandleW`,
which breaks things in two ways:
1) It returns paths with an uppercase drive letter, and source paths from
   elsewhere have a lowercase drive letter.
2) It resolves symlinks, and on Taskcluster Windows builds the whole build
   is done within a symlinked directory so paths directly from the srcdir
   and objdir won't match those canonicalized paths.

This patch adds a `normpath` function to symbolstore.py and moves the
contents of `FixFilenameCase` into it on Windows, and just makes it
an alias for `os.path.normpath` everywhere else. It then uses it everywhere
we deal with paths that will be compared against source file paths from symbol
files so that all paths are canonicalized the same and we can do simple
string matching from there.

Additionally, this patch adds a check to the functional test to verify
that header files from dist/include are correctly mapped to the source
repository. Unfortunately there is still not a test for generated files
because they only appear in the libxul symbol file, and dumping symbols
from libxul is too slow to invoke as part of a unit test.

MozReview-Commit-ID: Dx3z1BZcIvc
2017-08-23 13:14:37 -04:00
Ted Mielczarek
1792106136 bug 1259832 - replace generated source file names in symbol files. r=chmanchester
Now that builds are uploading generated source files to an S3 bucket,
symbolstore.py can alter the FILE lines in symbol files to record the
URLs where those generated source files can be found. We currently record
files from the hg repository as `hg:<repo>:<path>:<revision>`, so here we
record generated files as `s3:<bucket>:<path>:` and expect that Socorro
will map that to the S3 bucket in a sensible way.

This patch does not change source server indexing, which allows Microsoft
debuggers to fetch source files for a build. That will be handled in a
followup.

MozReview-Commit-ID: 1g14smF0fo8
2017-08-09 14:36:52 -04:00
Ted Mielczarek
84b3dc1ede bug 1388820 - remove repo manifest support from symbolstore.py. r=chmanchester
MozReview-Commit-ID: LbDc6YKGpqX
2017-08-09 13:36:07 -04:00
Wes Kocher
36250dc5a4 Backed out changeset 6b4f89f34b11 (bug 1388820) for apparently scheduling nightlies on every push/platform a=backout
MozReview-Commit-ID: GtNGyHS3m7f
2017-08-16 17:26:21 -07:00
Wes Kocher
2d6c41ece5 Backed out 4 changesets (bug 1259832) for apparently scheduling nightlies on every push/platform a=backout
Backed out changeset 7781a37a4db0 (bug 1259832)
Backed out changeset 73bf88110b38 (bug 1259832)
Backed out changeset 14d18d7cf454 (bug 1259832)
Backed out changeset a02695cbf576 (bug 1259832)

MozReview-Commit-ID: 4Tf6jBcvKLq
2017-08-16 17:26:08 -07:00
Ted Mielczarek
ebf095a598 bug 1259832 - replace generated source file names in symbol files. r=chmanchester
Now that builds are uploading generated source files to an S3 bucket,
symbolstore.py can alter the FILE lines in symbol files to record the
URLs where those generated source files can be found. We currently record
files from the hg repository as `hg:<repo>:<path>:<revision>`, so here we
record generated files as `s3:<bucket>:<path>:` and expect that Socorro
will map that to the S3 bucket in a sensible way.

This patch does not change source server indexing, which allows Microsoft
debuggers to fetch source files for a build. That will be handled in a
followup.

MozReview-Commit-ID: 1g14smF0fo8
2017-08-09 14:36:52 -04:00
Ted Mielczarek
d25dc7911d bug 1388820 - remove repo manifest support from symbolstore.py. r=chmanchester
MozReview-Commit-ID: LbDc6YKGpqX
2017-08-09 13:36:07 -04:00
Chris Manchester
2164601a78 Bug 1353090 - Remove code handling multiple files from symbolstore.py r=ted
MozReview-Commit-ID: 2vOP8iqYDW7
2017-04-26 22:32:27 -07:00
Chris Manchester
05a9902f4a Bug 1337986 - Remove code handling parallelism from symbolstore.py r=ted
This removes handling of dumping symbols in parallel from symbolstore.py
and updates unit tests.
A prior commit made symbolstore.py handle a single file at a time, leaving
concurrency to be handled by make, so this is no longer needed.

MozReview-Commit-ID: C7IHdVHHjRH
2017-04-10 10:27:49 -07:00
Chris Manchester
7c2f9c209a Bug 1337986 - Modify symbolstore.py to operate on dll/exe files. r=ted
This will be more convenient when we dump symbols from the compile tier.

MozReview-Commit-ID: Ltjq8ai5j0m
2017-04-10 10:27:49 -07:00
Mike Shal
9f060a7bc1 Bug 1342233 - Fix unit-symbolstore.py in cross-OSX builds; r=ted
MozReview-Commit-ID: IElpHBVxDok
2017-03-01 10:44:53 -05:00
Mike Shal
791359b01f Bug 1342233 - Skip hg test in unit-symbolstore.py for git users; r=ted
MozReview-Commit-ID: DQDBsD7q9Wf
2017-03-02 15:12:42 -05:00
Ted Mielczarek
99aea7d239 bug 1329320 - replace makecab with rust-makecab in symbolstore. r=gps
It turns out that running makecab to compress PDB files takes a significant
amount of time in the buildsymbols step. I wrote an implementation of
makecab in Rust that implements only the subset of features we use and
it's significantly faster:
https://github.com/luser/rust-makecab

This patch adds a makecab check to moz.configure, adds a release build of
the makecab binary to the Windows tooltool manifests, points the build at
it from mozconfig.win-common, and changes symbolstore.py to use MAKECAB
from substs instead of calling `makecab.exe` directly.

MozReview-Commit-ID: 76FHLIZFCXS
2017-01-06 05:57:10 -05:00
Mike Hommey
75ab3fa482 Bug 1324650 - Do not fail unit-symbolstore when the symbol file contains more than one entry for nsBrowserApp.cpp. r=ted
In some corner cases, there can be more than one entry for
nsBrowserApp.cpp for the firefox executable.
2016-12-20 14:36:05 +09:00
Gregory Szorc
bd9a1a8187 Bug 1279048 - Check MOZ_SOURCE_REPO for repository URL; r=ted
MOZ_SOURCE_REPO is set by automation to indicate the URL of the current
repository. I'm not sure what SRCSRV_ROOT is from. Probably legacy.

Use MOZ_SOURCE_REPO instead of SRCSRV_ROOT.

MozReview-Commit-ID: IfCSiaqgJb5
2016-06-08 14:54:58 -07:00
Ted Mielczarek
adb16799fc bug 1156300 - symbolstore.py FixFilenameCase doesn't fix up directory names. r=gps
MozReview-Commit-ID: 2nEaouS1oHD
2016-04-11 08:53:42 -04:00
Ted Mielczarek
e44beeede9 bug 1255479 - make mach python-tests use TestResolver for discovery, make mach test work for python tests. r=nalexander
MozReview-Commit-ID: CK2Vh6gdnb0
2016-03-10 12:30:10 -05:00
Birunthan Mohanathas
547b0ee5a7 Bug 623183 - Build dump_syms on Windows when using VS2015; r=ted
MozReview-Commit-ID: LCvipO5FXdR
2016-03-08 14:07:28 -08:00
Gregory Szorc
93539c1e33 Bug 1207871 - Process files in descending file size order; r=ted
Large files take longer to process. Scheduling large files after smaller
files means there is a higher chance a large file may be a long pole
during processing.

This commit changes the scheduling logic to exhaustively obtain the set
of files to be processed. It then sorts them by descending file size and
schedules them in the resulting order, thus minimizing the chances for a
large file to be the long pole holding up processing completion.

On my machine this doesn't change wall execution time. However,
automation may be different. And the logic of the new behavior is sound.
2015-09-23 22:26:41 -04:00
Ted Mielczarek
5f7a9ee3fd bug 1164816 - Rewrite symbolstore.py to use concurrent.futures. r=gps
CLOSED TREE
2015-05-13 14:50:11 -04:00
Ted Mielczarek
1c303cefa6 bug 528092 - Supply binaries from the symbol server. r=gps 2015-05-13 17:43:19 -04:00
Ted Mielczarek
fbe78789eb bug 462159 - Use install manifests to track header files from dist/include back to srcdir in symbolstore.py. r=gps 2014-07-18 16:33:34 -04:00
Ted Mielczarek
8e93695e7f bug 846864 - Fix source server support. r=khuey 2013-04-25 15:15:58 -04:00
Benedict Singer
bb99a554f5 Bug 795360 - Make dump_syms from symbolstore.py run in parallel on multi-core machines. r=ted 2012-12-27 15:32:45 -08:00
Ryan VanderMeulen
ee0a2bb474 Backed out changeset 11bf35befda6 (bug 795360) for Windows hangs. 2012-12-16 22:25:53 -05:00
Benedict Singer
595989c4c4 Bug 795360 - Make dump_syms from symbolstore.py run in parallel on multi-core machines. r=ted 2012-12-11 09:52:53 -05:00
Ted Mielczarek
80b84dd608 bug 774780 - Support reading a repo manifest.xml in symbolstore.py for source info. r=catlee 2012-10-29 11:12:30 -04:00
Ted Mielczarek
72e6a85101 bug 774780 - refactor VCS file mangling in symbolstore.py. r=catlee 2012-10-29 11:12:30 -04:00
Ted Mielczarek
a49e884a6a bug 587073 - stop uploading duplicate dSYM files in the symbol package. r=nthomas 2012-06-19 09:24:49 -04:00
Ted Mielczarek
28bed996ae bug 764671 - Stop uploading symbols for test programs/libs to the symbol server. r=nthomas 2012-05-24 11:58:35 -04:00
Ted Mielczarek
ce704fd53a Backed out changeset 4566522a1bfd, bug 632616 - fix symbolstore.py's handling of relative paths 2012-05-25 15:21:17 -04:00
Ted Mielczarek
7e1fe92aa8 bug 632616 - fix symbolstore.py's handling of relative paths. r=catlee 2012-05-24 11:58:35 -04:00