关于加快静态分析工具PC-Lint的任何提示?使用.LOB文件有任何经验吗? [英] Any tips for speeding up static analysis tool PC-Lint? Any experiences using .LOB files?

查看:107
本文介绍了关于加快静态分析工具PC-Lint的任何提示?使用.LOB文件有任何经验吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有兴趣学习影响PC上线时间的主要因素.我知道一些诸如-passes(#)的类,它会增加PC-Lint花费的时间(线性增加吗?),或者减少输出的消息不会影响起毛时间.我希望让其中一位对皮棉经验更丰富的人证实他们对皮棉性能的理解,列出他们影响皮棉时间的主要因素.

I'm interested in learning the main factors which affect PC-lint-ing time. I'm aware of a few such as -passes(#) which will increase the time PC-Lint takes (increase linearly?) or that reducing the messages which are output does not affect the linting time. I'm hoping to verify my understanding of lint's performance by having one of you who is more experienced with lint list the main factors they've encountered that affect linting time.

此外,您是否有任何经验将.lob文件与PC-Lint一起使用.您会说多少影响起毛时间?

Also, do any of you have experience using .lob files with PC-Lint. How much would you say it affected linting time?

推荐答案

我得到的主要提速是当我开始将Lint有时很庞大的输出重定向到文件上而不是Windows上的常规DOS框时,然后查看该文件在编辑器中. 如果通过次数足够多,-passes选项几乎会线性地增加时间,但是使用2或3时并不会完全增加时间,因为除了第一遍之外不需要预处理/解析阶段. 根据我的经验,对于大型项目,外部包含防护程序,或(Microsoft)(如果始终使用#pragma once)选项+pragma(once,once)可能会导致速度大大提高.在一个项目中,我将编译时间减少了20倍以上,而linting的时间减少了一点……

The main speedup I got was when I started redirecting Lint's sometimes massive output to a file in stead of a regular DOS box on Windows, and then look at the file in an editor. The -passes option does almost linearly increase the time if the number of passes gets high enough, but not quite when using 2 or 3, since a pre-pocessing/parsing stage is not needed except for the first pass. I my experience, for really large projects, external include guards, or (Microsoft) the option +pragma(once,once) - if #pragma once is consistently used - may result in enormous speed increases. In one project I dropped compile times by a factor of more than 20, and linting times just a little less...

使用.lob文件就像编译到对象然后链接对象一样:它取决于您的makefile的有效性,而速度的提高取决于您刚刚更改了多少文件.但是请注意,使用.lob文件并不像一次性抹掉所有文件那样彻底.有些问题必须忽略,因为.lob文件仅包含源文件的表示形式.

Using .lob files is like compiling to objects and then linking objects: It depends on how effective your makefile is, and the speed increase depends on how many and which files you have just changed. Be aware, though, that using .lob files is not as thorough as linting all files in one go; some issues have to be ignored, because the .lob files contain only a representation of the source files.

这篇关于关于加快静态分析工具PC-Lint的任何提示?使用.LOB文件有任何经验吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆