水彩笔用什么能洗掉| 女人肾虚是什么原因| 倒立有什么好处和坏处| roma是什么意思| 窝窝头是用什么做的| 博士生导师是什么级别| 沈阳六院主要治什么病| 如愿以偿是什么意思| 睡觉为什么会磨牙| 90年是什么命| 凌驾是什么意思| 阴唇是什么颜色| 小儿割包皮挂什么科| 什么是商业保险| 嘘寒问暖是什么意思| 红小豆和赤小豆有什么区别| 口里发酸是什么原因| 慕名而来是什么意思| 1905年属什么生肖| 口腔上颚疼是什么原因| 莱赛尔是什么面料| 希五行属什么| 龟龄集适合什么人吃| 59岁属什么生肖| abby是什么意思| 银行降息意味着什么| 得了便宜还卖乖是什么意思| 肾上腺分泌什么激素| 蹭蹭是什么意思| 坐月子哭了会有什么后遗症| gris是什么颜色| 尿黄是什么原因引起的| 育婴员是做什么的| 脚背有痣代表什么| 肠痉挛吃什么药| 子宫增厚是什么原因| 吃什么药能让月经推迟| 土地确权是什么意思| 贫血吃什么水果补血最快| 什么什么入胜| 肛门坠胀吃什么药最好| id医学上是什么意思| 有氧运动和无氧运动有什么区别| 甲亢吃什么好的更快| 低血糖是什么引起的| 丝状疣是什么样子图片| 内膜欠均匀是什么意思| 早上6点半是什么时辰| 重塑是什么意思| 生理期为什么不能拔牙| 双生什么意思| 料酒和黄酒有什么区别| 二倍体是什么意思| tg什么意思| 烂好人什么意思| 糖尿病适合喝什么饮料| 阿胶糕适合什么人吃| 雄字五行属什么| 胃恶心想吐吃什么药| 什么东西能戒酒| 女人手脚发热吃什么药| 一岁宝宝能吃什么水果| 行政许可是什么意思| 龙的五行属性是什么| 右侧卵巢内囊性结构什么意思| 什么样的包皮需要做手术| 怀孕什么时候吃鹅蛋最好| 行代表什么生肖| 口球是什么| 葡萄球菌是什么| 喉咙干咳吃什么药| 小孩割包皮挂什么科| 逐年是什么意思| boy是什么牌子| 送男朋友什么礼物合适| 不作为什么意思| 换手率是什么意思| 无名指下面的竖线代表什么| 不典型血管瘤什么意思| nbcs是什么意思| 早上起来嘴苦口臭是什么原因| cob是什么意思| 胃窦黄斑瘤是什么病| 隐翅虫是什么样子| 射精出血是什么原因引起的| 矿油是什么| 右下腹有什么器官| 梦见僵尸是什么预兆| 面肌痉挛是什么原因引起的| 泛性恋是什么| 为什么不建议女人上环| 玉对人身体健康有什么好处| 壁虎代表什么生肖| 太阳出来我爬山坡是什么歌| 尿酸高喝什么茶| 心率过快吃什么药好| 5月6日是什么星座| 空调什么品牌好| 尿素高不能吃什么| 下午5点到7点是什么时辰| 奇花初胎矞矞皇皇是什么意思| 喝酒后不能吃什么药| 缓释片是什么意思| 妥了是什么意思| 蚊子不喜欢什么味道| 古人的婚礼在什么时候举行| 细菌性前列腺炎吃什么药| 口加个齿读什么| 颜值担当是什么意思| 为什么遗精| 氢什么意思| 玻璃瓶属于什么垃圾| 村支部书记是什么级别| 双侧卵巢多囊性改变是什么意思| 炜字五行属什么| 古代的天花是现代的什么病| 牛肉和什么炒| 胎动什么时候出现| 卢沟桥事变又称什么| 肉苁蓉与什么搭配好| 三叉戟是什么意思| 脸为什么容易红| 血脂厚有什么症状| 露骨是什么意思| 减肥去医院挂什么科| 新蒜什么时候上市| 黑枸杞对男性性功能有什么帮助| 综合是什么意思| 拔完牙不能吃什么| 种植什么药材最赚钱| 多梦吃什么药效果最好| 一张纸可以做什么| 56个民族都有什么族| 翳是什么意思| 大便拉不出来是什么原因| 爆冷是什么意思| 脚肿挂什么科| 什么时候需要打破伤风针| 什么油最好| 口有什么字| 输卵管堵塞是什么原因| 楚国什么时候灭亡的| 幽门螺旋杆菌用什么药治疗| 硬伤是什么意思| 女攻是什么意思| 造影有什么危害| 国家三有保护动物是什么意思| 孩子过敏性咳嗽吃什么药好| 牡丹花什么时候开| 廉价什么意思| pv是什么材质| 软装是什么| 吊瓜是什么瓜| 怀孕分泌物是什么颜色| 化妆棉是干什么用的| 什么是平年什么是闰年| 六三年属什么生肖| 九二共识是什么| 吃什么可以补血| 脂蛋白磷脂酶a2高说明什么| 悲欢离合是什么意思| gmv是什么意思| 打哈哈是什么意思| 人乳头瘤病毒18型阳性是什么意思| 舌苔白什么原因| 屁很臭是什么原因| 冬天手脚冰凉是什么原因怎么调理| 梦见自己会飞是什么意思| 查血脂挂什么科| 蜘蛛属于什么类动物| 六个坚持是什么| 周传雄得了什么病| 肝喜欢什么食物有哪些| 宇五行属性是什么| 出差带什么| model是什么品牌| 小孩放臭屁是什么原因| 天是什么结构的字| 神经内科主要看什么病| 什么时间艾灸效果最好| 什么是认知障碍| 邮箱是什么| 1972年是什么年| 吃什么能拉肚子| 藏红花的功效是什么| 舅舅的女儿叫什么| 18岁属什么生肖| 稍高回声是什么意思| 笃定什么意思| 胆囊手术后不能吃什么| 什么菜可以隔夜吃| 60是什么意思| sds是什么| 93年的属什么| 血燥吃什么好| 双侧卵巢多囊样改变是什么意思| 上传下达是什么意思| 双眸是什么意思| 天蝎座男是什么性格| 什么条什么理| 青龙白虎是什么意思| 人为什么要吃肉| 我行我素是什么意思| 陆地上最大的动物是什么| 后卫是干什么的| 谷草谷丙高是什么原因| 乏力没精神容易疲劳是什么原因| 胆红素尿呈什么颜色| 胃酸反流是什么原因| 高烧吃什么药| 韧带拉伤吃什么药| 口干口苦口臭吃什么药| 什么四海| 11.7号是什么星座| 甲减什么症状| 为什么孕酮会低| 端午节吃什么食物| 头发染什么颜色显皮肤白显年轻| 为什么微信运动总是显示步数为0| 普萘洛尔是什么药| 马标志的车是什么牌子| 小孩子眼睛眨得很频繁是什么原因| 青稞面是什么| 内向的人适合什么工作| 双字五行属什么| 1.8号是什么星座| 胎盘分级0级什么意思| 查血脂挂什么科| 为什么说婴儿摔床没事| 吃什么药能快速降血压| hpv66阳性是什么意思| 为什么吃荔枝会上火| 刚怀孕初期吃什么好呢| 最快的减肥运动是什么| 雷锋日是什么时候| 什么病可以申请低保| 为什么怀孕这么难| preparing是什么意思| 宫颈肥大需要注意什么| 奇花初胎矞矞皇皇是什么意思| a4纸可以折什么| 总胆红素高说明什么| 观音菩萨是保佑什么的| 孙悟空是什么佛| 心脏变大是什么原因| 杜甫被后人称为什么| 颈椎疼挂什么科室| 贫血吃什么补的快| 宫代表什么生肖| 风月是什么意思| 过敏吃什么| 为什么气血不足| 壁虎吃什么| wl是什么意思| 瑗是什么意思| 盐茶是什么茶| tp是什么| 电脑一体机什么牌子好| 男人胡子长得快是什么原因| 92年是什么生肖| 胰腺炎是什么症状| 口苦口臭吃什么药效果最佳| anker是什么牌子| 吃什么都拉肚子怎么回事| 百度
tree: cac23531a537c583bda29773f319ca14cbbb6d05 [path history] [tgz]
  1. expected_output/
  2. test_files/
  3. .style.yapf
  4. collect_warnings.py
  5. OWNERS
  6. PRESUBMIT.py
  7. pull_logs.py
  8. README.md
  9. test_collect_warnings.py
tools/warning_analysis/README.md

This folder contains scripts for discovering and cataloguing instances of compiler warnings in Chromium builds.

Background

There are currently many clang warnings which we suppress when building Chromium, but intend to one day re-enable (try searching for -Wno in build/config/compiler.BUILD.gn for some examples). Unfortunately, actually turning these warnings back on is a daunting task due to the sheer variety of platforms on which chromium needs to build. Each of these compiles a different subset of the codebase, meaning that certain warnings may only show up when building on a single, obscure system.

The Chromium CQ lets us check for this by building on many different systems simultaneously. If we disable the -Werror flag, the build logs for each system will contain a list of all the warnings that occurred during the build. However, the CQ is quite large. It's not feasible to manually inspect the logs for every single build to ensure all possible warning sites are caught.

The scripts in this directory serve to automate that process. pull_logs.py uses the bitbucket cli tool bb (which must be in the PATH) to pull the build logs for all trybots from a given CQ run, then collect_warnings.py can process them to determine all the places in the codebase where a warning occurs. With that information, it's feasible to begin fixing the occurrences.

Intended use

The scripts are flexible, but they are intended for use as part of the following workflow:

  1. Enable the warning of interest by commenting out the relevant line in the BUILD file.
  2. Disable -Werror by setting treat_warnings_as_errors to false in build/config/compiler/compiler.gni.
  3. Create a CL with the above changes, and start a CQ Dry Run.
  4. When the dry run finishes, run pull_logs.py with the CL and patchset number the CQ ran on.
  5. When the logs have been downloaded, run collect_warnings.py with the warning flag you're interested in.

Notable script options

The section describes particularly notable behavior. See the scripts themselves for a full list of options. Almost all options have an equivalent single-letter form.

pull_logs.py

  • The script pulls the build logs for a single trybot step (by default, the compilation step). The same step can have different names on different builders, so the --step argument may be specified multiple times. If so, the scripts tries to pull logs from each step name in order until one succeeds.
  • By default, the logs are written to a temporary folder whose name is printed to stdout. You can specify the destination with the --log-dir argument.
  • The resulting build logs can be extremely large, but most of the lines are uninteresting boilerplate. The --filter flag may be used to automatically remove uninteresting lines before saving the log to disk. The definition of “interesting” is controlled by a lambda defined in the script file; by default, all lines beginning with [ are pruned. Feel free to edit the lambda locally if you want a different filter.
  • If the --delete-logs flag is passed, all .txt files in the log directory will be deleted before the new ones are downloaded. Not using this argument can result in having stale files in the log directory, preventing accurate collection of warnings. The argument is disabled by default to prevent unintentional deletion of data.

collect_warnings.py

  • The --warning flag is required to determine which lines correspond to the warning of interest. The value of the flag should be the ending text on the line where the compiler announces the warning, e.g. --warning [-Wthread-safety-reference-return]. A convenient shortcut to collect all warnings in the file (frequently there will only be one type of warning anyway) is to simply pass --warning ].
  • By default, the collected info is written to a temporary file whose name is printed to stdout. You can specify your own output file using the --output argument. If the value is stdout or -, the text will be printed to stdout instead of a file.
  • The scripts has two “modes”: by default, it outputs a .json file with detailed information about each warning emitted. If the --summarize flag is passed, it will instead output a more human-readable .txt file which simply lists every warning site, along with a count of number of files and warnings emitted total.
  • The detailed information consists of a list of warnings for each source file. Each warning entry contains the line and character number, as well as the line of code which triggered the warning. Finally, it contains a list of builders on which the warning occurred.

Example invocations

Pull logs for cl 1234567, patchset 8. Logs will be stored in the default location (tools/warning_analysis/build_logs).

python3 tools/warning_analysis/pull_logs.py -cl 12345678 -p 8

Pull logs for cl 1234567, patchset 8. Delete any old logs, filter out uninteresting lines from the new logs, and print progress to the console as the script is running.

python3 tools/warning_analysis/pull_logs.py -cl 12345678 -p 8 -d --filter -v

Collect instances of clang's C++ extension warning from the default log location, and store a summary in thread_safety.txt.

python3 tools/warning_analysis/collect_warnings.py -w [-Wvla-cxx-extension] -o cxx_extension --summarize

Collect instances of any warning, and store the detailed output in out.json.

python3 tools/warning_analysis/collect_warnings.py -w ]

脾胃是什么 ru是什么意思 中午12点到1点是什么时辰 树欲静而风不止是什么意思 尾盘跳水意味着什么
黄精什么时候种植 蟋蟀吃什么食物 现充什么意思 head是什么牌子 糖尿病人不能吃什么水果
hfp是什么意思 流口水什么原因 白细胞高说明什么 海蜇是什么动物 薄荷不能和什么一起吃
玻尿酸是什么 提报是什么意思 垫背是什么意思 为什么总是想吐 人体缺钾是什么症状
午睡睡不着是什么原因hcv8jop5ns3r.cn 药石是什么意思hcv8jop6ns4r.cn 指尖发麻是什么原因hcv8jop6ns5r.cn 人为什么会抽筋hcv8jop9ns0r.cn 半月板损伤吃什么药ff14chat.com
supor是什么品牌hcv7jop5ns6r.cn 美的不可方物是什么意思520myf.com ojbk是什么意思hcv9jop0ns6r.cn 阴液是什么hcv7jop6ns8r.cn 外耳道耵聍什么意思hcv8jop7ns8r.cn
嗓子疼什么原因hcv8jop0ns4r.cn 南京有什么美食hcv8jop3ns4r.cn 立夏是什么意思hcv8jop2ns6r.cn 露水夫妻是什么意思jasonfriends.com 什么样的人容易低血糖hcv8jop1ns2r.cn
相识是什么意思zhiyanzhang.com 喉咙长息肉有什么症状hcv9jop3ns9r.cn bolon是什么牌子眼镜hcv9jop2ns8r.cn 身上肉疼是什么原因hcv7jop7ns1r.cn 过期药品是什么垃圾jingluanji.com
百度