projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
934230c
)
Parallelize .gdb_index string table writes.
author
Rui Ueyama
<ruiu@google.com>
Tue, 25 Sep 2018 14:34:56 +0000
(14:34 +0000)
committer
Rui Ueyama
<ruiu@google.com>
Tue, 25 Sep 2018 14:34:56 +0000
(14:34 +0000)
When we are creating a large .gdb_index, this change makes a difference.
llvm-svn: 342978
lld/ELF/SyntheticSections.cpp
patch
|
blob
|
history
diff --git
a/lld/ELF/SyntheticSections.cpp
b/lld/ELF/SyntheticSections.cpp
index
e4b1b0c
..
a12a506
100644
(file)
--- a/
lld/ELF/SyntheticSections.cpp
+++ b/
lld/ELF/SyntheticSections.cpp
@@
-2576,8
+2576,9
@@
void GdbIndexSection::writeTo(uint8_t *Buf) {
// Write the string pool.
Hdr->ConstantPoolOff = Buf - Start;
- for (GdbSymbol &Sym : Symbols)
+ parallelForEach(Symbols, [&](GdbSymbol &Sym) {
memcpy(Buf + Sym.NameOff, Sym.Name.data(), Sym.Name.size());
+ });
// Write the CU vectors.
for (GdbSymbol &Sym : Symbols) {