Let:
(1) = Clank built with LLD (no ThinLTO),
(2) = Clank built with LLD-LTO (ThinLTO).
For .size files generated under (1) and (2), use SuperSize console to examine symbols missing object_path. Python command:
$ supersize console chrome.size
from collections import Counter
syms = size_info.raw_symbols
bad = [s for s in syms if not s.object_path]
Counter(s.section for s in syms)
Counter(s.section for s in bad)
******** Results for arm (32-bit) ********
For (1) LLD:
>>> Counter(s.section for s in syms)
Counter({'t': 768557, 'r': 139138, 'm': 65093, 'x': 42325, 'R': 32436, 'b': 16238, 'o': 2580, 'p': 1670, 'd': 1616, 'P': 704})
>>> Counter(s.section for s in bad)
Counter({'o': 2580, 'p': 44, 't': 4, 'P': 3})
For (2) LLD-LTO:
>>> Counter(s.section for s in syms)
Counter({'t': 606297, 'r': 139137, 'm': 65093, 'x': 42325, 'R': 32096, 'b': 14557, 'o': 2580, 'd': 2220, 'p': 1670, 'P': 704})
>>> Counter(s.section for s in bad)
Counter({'o': 2580, 'b': 2189, 'R': 1617, 'r': 1526, 'd': 496, 'p': 44, 't': 5, 'P': 3})
******** Results for arm64 ********
For (1) LLD: (Slowness is tracked by Bug 899337)
>>> Counter(s.section for s in syms)
Counter({'t': 940387, 'm': 65093, 'x': 42325, 'R': 32609, 'r': 25463, 'b': 16815, 'o': 2579, 'd': 1936, 'p': 1670, 'P': 704})
>>> Counter(s.section for s in bad)
Counter({'o': 2579, 'p': 44, 't': 24, 'P': 3, 'r': 2})
For (2) LLD-LTO:
>>> Counter(s.section for s in syms)
Counter({'t': 717830, 'r': 143788, 'm': 65093, 'x': 42325, 'R': 32738, 'b': 14733, 'o': 2579, 'd': 1899, 'p': 1670, 'P': 704})
>>> Counter(s.section for s in bad)
Counter({'t': 105634, 'r': 6049, 'o': 2579, 'R': 1971, 'p': 44, 'P': 3})
We see that (2) has many more symbols without object_path. agrieve@ suggested that we might be able to use llvm-symbolizer to do better.
Notes:
* For arm64, (1): The count for 'r' (.rodata) is small due to missing string literals, and this was filed in Bug 900196.
* For arm64: (1) has many more 't' (.text) than (2). ~60000 is from "OUTLINED_FUNCTION_", but the rest is unclear. This should be investigated later.
Comment 1 by benhenry@google.com
, Jan 11