llvm-project/lld/test/COFF
Peter Collingbourne 6ee0b4e9f5 COFF: Open and map input files asynchronously on Windows.
Profiling revealed that the majority of lld's execution time on Windows was
spent opening and mapping input files. We can reduce this cost significantly
by performing these operations asynchronously.

This change introduces a queue for all operations on input file data. When
we discover that we need to load a file (for example, when we find a lazy
archive for an undefined symbol, or when we read a linker directive to
load a file from disk), the file operation is launched using a future and
the symbol resolution operation is enqueued.  This implies another change
to symbol resolution semantics, but it seems to be harmless ("ninja All"
in Chromium still succeeds).

To measure the perf impact of this change I linked Chromium's chrome_child.dll
with both thin and fat archives.

Thin archives:

Before (median of 5 runs): 19.50s
After: 10.93s

Fat archives:

Before: 12.00s
After: 9.90s

On Linux I found that doing this asynchronously had a negative effect on
performance, probably because the cost of mapping a file is small enough that
it becomes outweighed by the cost of managing the futures. So on non-Windows
platforms I use the deferred execution strategy.

Differential Revision: https://reviews.llvm.org/D27768

llvm-svn: 289760
2016-12-15 04:02:23 +00:00
..
Inputs Partially revert r287009: Remove trailing whitespace. 2016-11-15 19:09:13 +00:00
alternatename.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
ar-comdat.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
arm-thumb-branch-error.s COFF ARM: Error out if 24 bit thumb branches are out of range 2016-08-05 17:33:24 +00:00
armnt-blx23t.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
armnt-branch24t.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
armnt-entry-point.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
armnt-imports.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
armnt-mov32t-exec.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
armnt-movt32t.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
base.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
baserel.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
cl-gl.test Identify object files compiled with cl.exe /GL. 2016-11-15 01:01:51 +00:00
common.test [lld/COFF] Don't round alignment if it's already a power-of-two. 2016-11-11 02:53:48 +00:00
conflict-mangled.test COFF: Define overloaded toString functions. 2016-12-07 23:17:02 +00:00
conflict.test COFF: Define overloaded toString functions. 2016-12-07 23:17:02 +00:00
debug.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
defparser.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
delayimports.test COFF: /delayload:<DLLNAME> is case-insensitive. 2015-09-03 14:49:47 +00:00
delayimports32.test COFF: add beginnings of debug directory creation 2016-08-29 21:20:46 +00:00
dll.test COFF: We no longer require lib.exe to test DLL exports. 2016-12-15 00:11:17 +00:00
driver.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
dumppdb.test Dump Codeview type information correctly. 2016-12-01 01:22:48 +00:00
entry-inference.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
entry-inference2.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
entry-inference32.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
entry-mangled.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
entrylib.ll COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
export-exe.test COFF: We no longer require lib.exe to test DLL exports. 2016-12-15 00:11:17 +00:00
export.test COFF: We no longer require lib.exe to test DLL exports. 2016-12-15 00:11:17 +00:00
export32.test COFF: We no longer require lib.exe to test DLL exports. 2016-12-15 00:11:17 +00:00
failifmismatch.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
filetype.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
force.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
heap.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
hello32.test COFF: Align sections to 512-byte boundaries on disk. 2015-08-11 23:09:00 +00:00
help.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
icf-associative.test Fix a bug in ICF involving COFF associative sections. 2016-12-02 07:46:12 +00:00
icf-circular.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
icf-circular2.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
icf-different-align.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
icf-local.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
icf-simple.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
imports-mangle.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
imports.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
include.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
include2.test COFF: New symbol table design. 2016-12-09 21:55:24 +00:00
internal.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
invalid-obj.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
largeaddressaware.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
libpath.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
linkenv.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
linkrepro.test Disable test on windows. 2016-07-26 12:38:18 +00:00
lldmap.test COFF: Support both /lldmap and /lldmap:<file> 2016-12-09 20:54:44 +00:00
loadcfg.ll [COFF] Don't hard-code the load configuration size 2016-03-15 09:48:27 +00:00
loadcfg.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
loadcfg32.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
locally-imported.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
locally-imported32.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
long-section-name.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
lto-chkstk.ll COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
lto-comdat.ll COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
lto-lazy-reference.ll LTO: Don't follow lazy references when seeing new definitions in the combined LTO object 2016-10-12 09:00:06 +00:00
lto-linker-opts.ll COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
lto-new-symbol.ll COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
lto-opt-level.ll COFF: Introduce flag /opt:lldlto=N for controlling LTO optimization level. 2015-08-14 04:47:07 +00:00
lto-parallel.ll COFF: Implement parallel LTO code generation. 2015-08-28 22:16:09 +00:00
lto.ll COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
machine.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
manifest.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
manifestinput.test COFF: Support /manifestinput command line option. 2016-04-19 01:21:58 +00:00
merge.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
nodefaultlib.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
noentry.test COFF: We no longer require lib.exe to test DLL exports. 2016-12-15 00:11:17 +00:00
opt.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
options.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
order.test COFF: Open and map input files asynchronously on Windows. 2016-12-15 04:02:23 +00:00
out.test Reland test change. 2016-04-21 01:33:04 +00:00
pdb.test Create a TPI stream only when /debugpdb is given. 2016-12-10 17:23:23 +00:00
reloc-arm.test [COFF] Add support for IMAGE_REL_ARM_SECREL 2016-09-27 19:27:17 +00:00
reloc-x64.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
reloc-x86.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
resource.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
responsefile.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
rsds.test test: adjust the GUID 2016-09-09 19:41:46 +00:00
safeseh.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
section.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
seh.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
sort-debug.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
stack.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
subsystem-inference.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
subsystem.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
symtab.test COFF: New symbol table design. 2016-12-09 21:55:24 +00:00
tls.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
tls32.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
unwind.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
version.test COFF: Make test commands shorter. NFC. 2015-08-06 16:47:46 +00:00
weak-external.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
weak-external2.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00
weak-external3.test [yaml2obj] Updating LLD tests to account for LLVM r273915 2016-06-27 20:17:08 +00:00