墨池为什么不爱柔嘉了| 吃木瓜有什么好处| 吃什么都吐是什么原因| 新生儿屁多是什么原因| 传染性单核细胞增多症是什么病| 孤魂野鬼是什么生肖| 平均血小板体积低是什么原因| 吃饺子是什么节日| 90年什么命| 痛苦是什么意思| 羊跟什么生肖最配| 皮肤痒用什么药膏| 羊和什么相冲| 水煮鱼片用什么鱼| 366是什么意思| 桃李满天下是什么意思| 生殖感染用什么消炎药效果好| 氢化聚异丁烯是什么| 益生元是什么| 鹦鹉吃什么食物| 孕妇吃海带有什么好处| 什么时间最容易怀孕| 东北有什么好玩的景点| 长期咳白痰是什么原因| 抗皱用什么产品好| 抬旗是什么意思| 吃什么容易上火| 风花雪月什么意思| 皮下囊肿挂什么科| 段子是什么意思| 沙棘是什么| 拜观音菩萨有什么讲究| 逆钟向转位什么意思| 梦到死人了有什么兆头| 什么属相不能摆放大象| 望穿秋水的意思是什么| 六月初九是什么日子| 尿酸高要注意什么饮食| 肝多发小囊肿什么意思| 雾化治疗的作用是什么| 长一根白眉毛预示什么| 脚脱皮用什么药| 独角仙吃什么食物| 肠胃消化不好吃什么食物| 见红的血是什么颜色| 为老不尊是什么意思| 什么案件才会出动便衣| 胸部有硬块挂什么科| 孙悟空被压在什么山下| 脚后跟骨头疼是什么原因| 又热又冷是什么原因| 乙肝有什么症状| 小肚子胀是什么原因| 梦见一条小蛇是什么意思| minute是什么意思| romoss是什么牌子| 左下腹部是什么器官| 缓刑是什么意思| 英短蓝猫吃什么猫粮好| 生酮是什么意思| 脂肪瘤吃什么药| 率性是什么意思| 胃疼吃什么食物最养胃| 炼乳可以做什么美食| 胆固醇高不可以吃什么食物| 屠苏酒是什么酒| 铁蛋白高吃什么食物好| 掉马是什么意思| air是什么牌子的鞋| 橄榄枝象征着什么| 皮炎是什么原因引起的| 什么样的太阳| 老舍原名是什么| 毛囊炎用什么药膏最好| 口腔溃疡是缺什么| 白带褐色什么原因| 阿莫西林有什么作用| 秀米是什么| 农历10月22日是什么星座| 火疖子是什么| 6月5号是什么星座| 泄愤是什么意思| 染什么颜色| 什么的宇宙| 924是什么星座| 姓彭的女孩子取什么名字好| 突然吐血是什么原因| 难以入睡是什么原因引起的| 做三明治需要什么材料| 脱脂牛奶适合什么人喝| 百香果有什么好处| 蒸鱼豉油什么时候放| 吃什么食物能养肝护肝| 失眠是什么症状| 为什么腿会酸痛| 肝胆相照是什么意思| 尿酸高可以吃什么| 喝酒尿多是什么原因| smile是什么意思| 6s管理内容是什么| 染色体由什么和什么组成| 什么样的孕妇容易翻盘| 血管堵塞有什么办法可以疏通| 颈椎退行性病变是什么意思| 梦到生女儿是什么意思| 杀阴虱用什么药最快| 菁字五行属什么| 玩游戏有什么好处| 白兰地是属于什么酒| 七月11日是什么星座| 白细胞加号什么意思| 成人礼送什么礼物| 油墨用什么可以洗掉| 什么的饭菜| 漂洋过海是什么生肖| dt是什么意思| 现在什么时辰| 担当是什么| 月经提前是什么原因引起的| 平均分是什么意思| 阑尾粪石是什么意思| 3月17日什么星座| 勾心斗角是什么生肖| 1210是什么星座| 山及念什么| 头上长痘痘是什么原因| 什么化妆品好用哪个牌子的| 梦见自己大便是什么意思| 1971年属什么| 双子座的幸运色是什么| 反文旁和什么有关| 开普拉多的都是什么人| 急性肠胃炎是什么引起的| 康复治疗学主要学什么| 尿多是什么问题| 休学是什么意思| 什么病不能喝酒| 肠胃炎是什么| 鞭尸是什么意思| 龙阳之好是什么意思| 血栓是什么病| 古代内衣叫什么| 建档需要准备什么资料| 黑乎乎的什么| 左边后背疼是什么原因| 槟榔长什么样子| 气场是什么意思| 老年人血压忽高忽低是什么原因| 牙掉了是什么预兆| 消化不良吃什么| 什么是尿酸高| 什么叫特应性皮炎| 资金流入股价下跌为什么| 逍遥丸适合什么人吃| 口腔医学技术可以考什么证| 娇喘什么意思| 肚子胀气老放屁是什么原因| 1987年五行属什么| 虾仁不能和什么食物一起吃| 初秋的天冰冷的夜是什么歌| 看到黄鼠狼什么预兆| 什么的工作| 梦到猫是什么意思| 纷至沓来什么意思| 什么人生病从来不看医生| 1.4什么星座| 月经推迟不来吃什么药| 碳酸氢铵是什么东西| 伯母是什么意思| 红霉素软膏治什么病| 八戒是什么意思| 小孩头晕是什么原因| 彪子是什么意思| 什么是植物人| 爱恨就在一瞬间是什么歌| 国际劳动日是什么生肖| 精神恍惚是什么意思| 董事总经理是什么职位| 做手术后吃什么对伤口恢复快| 枸杞和什么一起泡水喝最好| 梦见妖魔鬼怪是什么意思| 细菌性阴道炎用什么药好得快| 范思哲香水是什么档次| 阴茎皮开裂是什么原因| 检查血压挂什么科| 无花果为什么叫无花果| 肺部有阴影是什么原因| 病历是什么| 免疫十一项都检查什么| 作祟是什么意思| 左肺上叶纤维灶是什么意思| 榄仁叶是什么树的叶子| 什么是国企单位| 河南有什么特产| 手心脚心热吃什么药| 咽炎用什么药好| 脸上长痘痘是什么原因引起的| 口腔溃疡缺什么| 双皮奶为什么叫双皮奶| 子宫内膜什么时候脱落| 金丝雀是什么意思| ipa啤酒是指什么| 哺乳期可以喝什么茶| 体型最大的恐龙是什么| 24岁属什么| hiv1是什么意思| 胆囊壁毛糙吃什么药效果好| 贡菜是什么菜| 喝柠檬水对身体有什么好处| 公司监事是干什么的| 肺气泡是什么病| 左眼跳代表什么| 什么闻什么睹| 牛膝有什么功效| 无声无息是什么意思| 来月经吃什么排得最干净| 喝什么茶对睡眠有帮助| 鱼吃什么食物| 半夜胎动频繁是什么原因| 嗯哼是什么意思| 喝黑枸杞有什么作用和功效| 黄瓜和什么不能一起吃| 头皮软绵绵的什么原因| 唇周围长痘痘是什么原因| 腿上长痣代表什么| 港澳通行证办理需要什么证件| 黄酒什么味道| 治疗风湿有什么好方法| 念旧的人是什么样的人| 0604是什么日子| 绝命是什么意思| 4点是什么时辰| lycra是什么面料| 尿粒细胞酯酶阳性什么意思| 眼睛黄是什么原因| 6月14号是什么星座| 桔子树用什么肥料最好| 利而不害为而不争是什么意思| 2022年属什么生肖| 夏天脸上皮肤痒是什么原因| 口子念什么| 芋圆是用什么做的| bv是什么牌子| 五七是什么意思| 什么蔬菜吸脂减肥| 口上长水泡是什么原因| 0.8是什么意思| 臭屁什么意思| 小孩为什么吃果糖二磷酸钠| 四季平安是什么生肖| 做梦梦见老婆出轨是什么意思| psa升高代表什么| 散瞳是什么| 荡秋千有什么好处| 移居改姓始为良是什么意思| 癌胚抗原高是什么意思| 孕妇胆固醇高对胎儿有什么影响| 男人时间短吃什么药| 花胶有什么功效与作用| noon什么意思| 什么是增强ct| 送奶奶什么礼物好| 石家庄有什么好玩的景点| 日光性皮炎用什么药| 百度
blob: 8ac7f5982b9e9085e01d24f8b01c5a4931c8c806 [file] [log] [blame]
# Copyright 2016 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Parse information about a PE file to summarize the on-disk and
in-memory sizes of the sections, in decimal MB instead of in hex. This
script will also automatically display diffs between two files if they
have the same name. This script relies on having VS 2015 installed and is used
to help investigate binary size regressions and improvements.
Section information printed by dumpbin looks like this:
SECTION HEADER #2
.rdata name
5CCD56 virtual size
1CEF000 virtual address (11CEF000 to 122BBD55)
5CCE00 size of raw data
1CEE000 file pointer to raw data (01CEE000 to 022BADFF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
40000040 flags
Initialized Data
Read Only
The reports generated by this script look like this:
> python tools\win\pe_summarize.py out\release\chrome.dll
Size of out\release\chrome.dll is 41.190912 MB
name: mem size , disk size
.text: 33.199959 MB
.rdata: 6.170416 MB
.data: 0.713864 MB, 0.270336 MB
.tls: 0.000025 MB
CPADinfo: 0.000036 MB
.rodata: 0.003216 MB
.crthunk: 0.000064 MB
.gfids: 0.001052 MB
_RDATA: 0.000288 MB
.rsrc: 0.130808 MB
.reloc: 1.410172 MB
Note that the .data section has separate in-memory and on-disk sizes due to
zero-initialized data. Other sections have smaller discrepancies - the disk size
is only printed if it differs from the memory size by more than 512 bytes.
Note that many of the sections - such as .text, .rdata, and .rsrc - are shared
between processes. Some sections - such as .reloc - are discarded after a
process is loaded. Other sections, such as .data, produce private pages and are
therefore objectively 'worse' than the others.
"""
from __future__ import print_function
import os
import subprocess
import sys
def _FindSection(section_list, section_name):
for i in range(len(section_list)):
if section_name == section_list[i][0]:
return i
return -1
def main():
if len(sys.argv) < 2:
print(r'Usage: %s PEFileName [OtherPeFileNames...]' % sys.argv[0])
print(r'Sample: %s chrome.dll' % sys.argv[0])
print(r'Sample: %s chrome.dll original\chrome.dll' % sys.argv[0])
return 0
# Track the name of the last PE (Portable Executable) file to be processed -
# file name only, without the path.
last_pe_filepart = ""
for pe_path in sys.argv[1:]:
results = []
if not os.path.exists(pe_path):
print('%s does not exist!' % pe_path)
continue
print('Size of %s is %1.6f MB' %
(pe_path, os.path.getsize(pe_path) / 1e6))
print('%10s: %9s , %9s' % ('name', 'mem size', 'disk size'))
sections = None
# Pass the undocumented /nopdb header to avoid hitting symbol servers
# for the entrypoint name.
command = 'dumpbin.exe /nopdb /headers "%s"' % pe_path
try:
for line in subprocess.check_output(command).decode().splitlines():
if line.startswith('SECTION HEADER #'):
sections = []
elif type(sections) == type([]):
# We must be processing a section header.
sections.append(line.strip())
# When we've accumulated four lines of data, process them.
if len(sections) == 4:
name, memory_size, _, disk_size = sections
assert name.count('name') == 1
assert memory_size.count('virtual size') == 1
assert disk_size.count('size of raw data') == 1
name = name.split()[0]
memory_size = int(memory_size.split()[0], 16)
disk_size = int(disk_size.split()[0], 16)
# Print the sizes in decimal MB. This makes large
# numbers easier to understand - 33.199959 is easier to
# read than 33199959. Decimal MB is used to allow simple
# conversions to a precise number of bytes.
if abs(memory_size - disk_size) < 512:
print('%10s: %9.6f MB' % (name, memory_size / 1e6))
else:
print('%10s: %9.6f MB, %9.6f MB' %
(name, memory_size / 1e6, disk_size / 1e6))
results.append((name, memory_size))
sections = None
except WindowsError as error:
if error.winerror == 2:
print(
r'Cannot find dumpbin. Run "C:\Program Files\Microsoft '
r'Visual Studio\2022\Professional\VC\Auxiliary\Build'
r'\vcvarsall.bat amd64" or similar to add dumpbin to the '
r'path.')
else:
print(error)
break
print()
pe_filepart = os.path.split(pe_path)[1]
if pe_filepart.lower() == last_pe_filepart.lower():
# Print out the section-by-section size changes, for memory sizes
# only.
print('Memory size change from %s to %s' % (last_pe_path, pe_path))
total_delta = 0
for i in range(len(results)):
section_name = results[i][0]
# Find a matching section name. Mismatches can occur when
# comparing 32-bit and 64-bit binaries. They can also occur when
# one of the binaries pulls in code that defines custom sections
# such as .rodata.
last_i = _FindSection(last_results, section_name)
delta = results[i][1]
if last_i >= 0:
delta -= last_results[last_i][1]
total_delta += delta
if delta:
print('%12s: %7d bytes change' % (section_name, delta))
for last_i in range(len(last_results)):
section_name = last_results[last_i][0]
# Find sections that exist only in last_results.
i = _FindSection(results, section_name)
if i < 0:
delta = -last_results[last_i][1]
total_delta += delta
print('%12s: %7d bytes change' % (section_name, delta))
print('Total change: %7d bytes' % total_delta)
last_pe_filepart = pe_filepart
last_pe_path = pe_path
last_results = results
if __name__ == '__main__':
sys.exit(main())
什么的夏夜 牙龈肿痛吃什么中成药 老当益壮是什么意思 白陶土样便见于什么病 尿电导率低是什么意思
牙疼吃什么药止疼最快 后背痒是什么病的前兆 满月是什么意思 为什么感冒会咳嗽 59岁属什么
煤油是什么油 吃虾有什么好处 降维打击是什么意思 乙肝有什么危害 减肥适合吃什么主食
尿蛋白是什么原因造成的 en是什么意思 腿肿是什么原因引起的怎么办 西葫芦不能和什么一起吃 肝癌是什么原因引起的
股藓要用什么药膏效果最好hcv9jop1ns5r.cn 溃疡是什么意思hcv8jop8ns3r.cn 生肖羊生什么生肖最好hcv8jop0ns4r.cn 张艺谋为什么不娶巩俐hcv8jop2ns6r.cn 用什么梳子梳头发最好hebeidezhi.com
沉默不是代表我的错是什么歌hcv9jop4ns4r.cn 梦见蛇缠身是什么意思hcv7jop6ns1r.cn 戈美其鞋子是什么档次hcv8jop9ns2r.cn 恍恍惚惚什么意思hcv9jop2ns9r.cn 去火吃什么食物hcv9jop8ns3r.cn
女生送男生什么礼物好hcv9jop3ns9r.cn 中医说的湿气重是什么意思hcv8jop1ns1r.cn 痛风吃什么菜好hcv8jop2ns0r.cn 前列腺肥大是什么症状hcv9jop3ns4r.cn 荼蘼是什么意思hcv8jop5ns0r.cn
一般什么人戴江诗丹顿huizhijixie.com 狗狗湿疹用什么药膏最有效hcv8jop0ns5r.cn 贝加台念什么hcv7jop6ns8r.cn VH是什么品牌hcv8jop6ns9r.cn 晚上睡觉流口水是什么病hcv9jop4ns2r.cn
百度