Commit cf17bf7
committed
[DWARFLinker] Release input DWARF after object has been linked
dsymutil is using an excessive amount of memory because it's holding on
to the DWARF Context, even after it's done processing the corresponding
object file. This patch releases the input DWARF after cloning, at which
point it is no longer needed. This has always been the intended
behavior, though I didn't bisect to figure out when this regressed.
When linking swift, this reduces peak (dirty) memory usage from 25 to 15
gigabytes.
rdar://1115251001 parent 1511e98 commit cf17bf7
File tree
4 files changed
+21
-25
lines changed- llvm
- include/llvm/DWARFLinker
- tools
- dsymutil
- llvm-dwarfutil
4 files changed
+21
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
| 200 | + | |
200 | 201 | | |
201 | | - | |
202 | | - | |
| 202 | + | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
212 | 219 | | |
213 | 220 | | |
214 | 221 | | |
| |||
445 | 452 | | |
446 | 453 | | |
447 | 454 | | |
448 | | - | |
| 455 | + | |
| 456 | + | |
449 | 457 | | |
450 | 458 | | |
451 | 459 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | 275 | | |
281 | | - | |
282 | | - | |
| 276 | + | |
| 277 | + | |
283 | 278 | | |
284 | 279 | | |
285 | 280 | | |
| |||
554 | 549 | | |
555 | 550 | | |
556 | 551 | | |
557 | | - | |
558 | | - | |
559 | 552 | | |
560 | 553 | | |
561 | 554 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
225 | | - | |
226 | 224 | | |
227 | 225 | | |
228 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
309 | 308 | | |
310 | 309 | | |
311 | 310 | | |
| |||
319 | 318 | | |
320 | 319 | | |
321 | 320 | | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | 321 | | |
326 | | - | |
| 322 | + | |
| 323 | + | |
327 | 324 | | |
328 | 325 | | |
329 | 326 | | |
| |||
0 commit comments