动态code分析任何引用? [英] Any references on Dynamic Code Analysis?

查看:191
本文介绍了动态code分析任何引用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天我在阅读有关调试技​​术,发现Valgrind的是真的很有趣。看来使用从动态code分析技术。我跟着从原来的基准东西的链接别的称为路径剖析

Yesterday I was reading about debugging techniques and found Valgrind to be really interesting. It seems to use techniques from dynamic code analysis. And I followed a link from the original reference to something else called Path Profiling.

我试过谷歌搜索,但我想我使用了错误的术语来搜索这些概念的一个很好的参考。有人建议可以一个很好的资源同时考虑到我没有在编译器和编程语言背景的帐户?

I tried Googling but I guess I am using the wrong terms to search for a good reference on these concepts. Can someone suggest a good resource taking into account that I do not have a background in compilers and programming languages?

推荐答案

路径剖析有趣的是,作为一个理论问题。 gprof的也很有趣,因为它在调用图,周期性子图,这样的交易。有操纵这些信息,并在整个结构propogating测量好的算法。

Path Profiling is interesting as a theoretical problem. gprof is also interesting, because it deals in call graphs, cyclical subgraphs, and such. There are nice algorithms for manipulating this information and propogating measurements throughout a structure.

这所有的可能诱使你觉得它的作品(虽然他们从来不说它) - 寻找一般的性能问题。

All of which might tempt you to think it works (though they never say it does) - for finding general performance problems.

但是,假设你的程序挂起。你如何发现问题?

However, suppose your program hangs. How do you find the problem?

我要做的就是把它进入无限循环,然后中断(暂停)它,看看它在做什么。我看在调用堆栈的每一层的code,因为我知道这个循环是在栈上的某个地方。如果它不是很明显,我只是一步沿着它,直到我看到它的重演,然后我知道问题出在哪里。我怀疑几乎任何人都这样做。

What I do is get it into the infinite loop, and then interrupt (pause) it to see what it's doing. I look at the code on each level of the call stack, because I know the loop is somewhere on the stack. If it's not obvious, I just step it along until I see it repeating itself, and then I know where the problem is. I suspect almost anyone would do that.

在事实上,如果你停止程序,而它的服用时间过长,则检查其状态好几次,你不仅可以找到无限循环,但如果程序运行的时间比你想几乎所有的问题。

In fact, if you stop the program while it's taking too long and examine its state several times, you can not only find infinite loops, but almost any problem where the program runs longer than you would like.

有基于这一理念分析器工具,如变焦并的 LTProf ,但我的钱没有给尽可能多的有识之士充分理解再presentative快照。

There are profiler tools based on this concept, such as Zoom and LTProf, but for my money nothing gives as much insight as thoroughly understanding representative snapshots.

您不会找到这种技术很好的参考,因为(奇怪)不是很多人都知道它,它太简单发布。

You won't find good references on this technique because (oddly) not many people are aware of it, and it's too simple to publish.

有相当多关于这个问题说了。

其实,FWIW,我发布上的一篇文章,但它只是由一个编辑审查,我不认为任何人的真正阅读:Dunlavey性能调优与call-衍生指令级的成本堆栈采样,ACM SIGPLAN声明42,8(2007年8月),第4-8。

Actually, FWIW, I "published" an article on it, but it was only reviewed by an editor, and I don't think anyone's actually read it: Dunlavey, "Performance tuning with instruction-level cost derived from call-stack sampling", ACM SIGPLAN Notices 42, 8 (August, 2007), pp. 4-8.

这篇关于动态code分析任何引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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