16
17
18 stripped_file = sys.argv[1]
19 out_dir = sys.argv[2]
20 keystr = sys.argv[3]
21 propstr = sys.argv[4]
22 bloaty_path = sys.argv[5]
23
24
25 symbols_file = sys.argv[6]
26 config = sys.argv[7]
27 total_size_bytes_key = sys.argv[8]
28 lib_name = sys.argv[9]
29 magic_seperator = sys.argv[10]
30
31 results = {
32 'key': { },
33 'results': { }
34 }
35
36 props = propstr.split(' ')
37 for i
in range(0,
len(props), 2):
38 results[props[i]] = props[i+1]
39
40 keys = keystr.split(' ')
41 for i
in range(0,
len(keys), 2):
42 results['key'][keys[i]] = keys[i+1]
43
44
45 print(magic_seperator)
46 print(
'Report by file, then by symbol with ellided/combined templates')
47 lines = subprocess.check_output([bloaty_path, stripped_file,
48 '-d', 'compileunits,symbols', '-s', 'file',
49 '-n', '0', '--tsv', '--demangle=short',
50 '--debug-file=%s' % symbols_file],
51 encoding='utf-8')
53 print(magic_seperator)
54 print(
'Report by file, then by symbol with full templates')
55 lines = subprocess.check_output([bloaty_path, stripped_file,
56 '-d', 'compileunits,symbols', '-s', 'file',
57 '-n', '0', '--tsv', '--demangle=full',
58 '--debug-file=%s' % symbols_file],
59 encoding='utf-8')
61 print(magic_seperator)
62
63 print(
'Report by symbol, then by file with ellided/combined templates')
64 lines = subprocess.check_output([bloaty_path, stripped_file,
65 '-d', 'symbols,compileunits', '-s', 'file',
66 '-n', '0', '--tsv', '--demangle=short',
67 '--debug-file=%s' % symbols_file],
68 encoding='utf-8')
70 print(magic_seperator)
71
72 print(
'Report by symbol, then by file with full templates')
73 lines = subprocess.check_output([bloaty_path, stripped_file,
74 '-d', 'symbols,compileunits', '-s', 'file',
75 '-n', '0', '--tsv', '--demangle=full',
76 '--debug-file=%s' % symbols_file],
77 encoding='utf-8')
79 print(magic_seperator)
80
81 r = {
82
83 config : {
84 total_size_bytes_key: grand_total
85 },
86 }
87
88 results['results'][lib_name] = r
89
90
91 print(json.dumps(results, indent=2))
92
93 with open(os.path.join(out_dir, lib_name+'.json'), 'w') as output:
94 output.write(json.dumps(results, indent=2))
95
96
def print_skia_lines_symbol_file(lines)
def print_skia_lines_file_symbol(lines)
def print(*args, **kwargs)