Commit f2da3d75 authored by Matthew Cary's avatar Matthew Cary Committed by Commit Bot

Orderfile: output phase sizes during processing.

When generating orderfiles manually, output the sizes symbols in each
phase. Also removes obsolete stability calculation.

Bug: 758566
Change-Id: Ie836061e93683884d631c2f7d3daab7fb6602c9f
Reviewed-on: https://chromium-review.googlesource.com/1156305
Commit-Queue: Matthew Cary <mattcary@chromium.org>
Reviewed-by: default avatarBenoit L <lizeb@chromium.org>
Reviewed-by: default avatarEgor Pasko <pasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582195}
parent 4c24c10e
......@@ -300,14 +300,15 @@ def main():
processor = process_profiles.SymbolOffsetProcessor(os.path.join(
args.instrumented_build_dir, 'lib.unstripped', args.library_name))
phaser = PhasedAnalyzer(profiles, processor)
stability = phaser.ComputeStability()
print 'Stability: {:.2} {:.2} {:.2}'.format(*[s[0] for s in stability])
print 'Sizes: {} {} {}'.format(*[s[1] for s in stability])
if args.offset_output_base is not None:
for name, offsets in zip(
['_for_memory', '_for_startup'],
[phaser.GetOffsetsForMemoryFootprint(),
phaser.GetOffsetsForStartup()]):
for name, offsets in (
('_for_memory', phaser.GetOffsetsForMemoryFootprint()),
('_for_startup', phaser.GetOffsetsForStartup())):
logging.info('%s Offset sizes (KiB):\n'
'%s startup\n%s common\n%s interaction',
name, processor.OffsetsPrimarySize(offsets.startup) / 1024,
processor.OffsetsPrimarySize(offsets.common) / 1024,
processor.OffsetsPrimarySize(offsets.interaction) / 1024)
if args.offset_output_base is not None:
with file(args.offset_output_base + name, 'w') as output:
output.write('\n'.join(
str(i) for i in (offsets.startup + offsets.common +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment