Valgrind用户手册(一)

来源:互联网 发布:淘宝买家好评率95% 编辑:程序博客网 时间:2024/05/02 06:11

1、介绍

1.1 valgrind概述

Valgrind是一个构建动态分析工具的测试框架。它由许多工具组成,能够通过调试、分析或相似功能改进程序。Valgrind的体系结构是模块化的,所以新工具可以很容易被创建,而不会对已存在工具有任何干扰。

许多有用的工具已经作为标准工具提供。

1、Memcheck是内存检测工具,帮助你改进程序,特别是对使用C C++编写的程序更准确。

2、Cachegrind是缓存和分支预测的工具,帮助你改进程序实质运行更快

3、Callgrind是一个图形化的缓存探测工具,与Cachegrind功能有一些重叠,但是Callgrind能够收集一些信息是Cachegrind没有的

4、Helgrind是线程错误检测工具,帮助改进多线程程序更准确。

5、DRD也是一个线程错误检测工具,DRDHelgrind相似,但是使用不同的分析技术,所以可能会发现不同的问题。

6、Massif是堆探测工具,帮助改进程序使用更少内存。

7、DHAT是另一个堆检测工具,帮助了解代码段的生命周期,利用率,效率规划。

8、SGcheck是一个实验性的工具,能够检测栈和全局数组溢出错误。它的功能是对Memcheck的补充,SGcheck能够找到Memcheck无法找到的问题,反之亦然。

9. BBV is an experimental SimPoint basic block vector generator. It is useful to people doing computer architecture research and development.

There are also a couple of minor tools that arent useful to most users: Lackey is an example tool that illustrates some instrumentation basics; and Nulgrind is the minimal Valgrind tool that does no analysis or instrumentation, and is only useful for testing purposes.

Valgrind is closely tied to details of the CPU and operating system, and to a lesser extent, the compiler and basic C libraries. Nonetheless, it supports a number of widely-used platforms, listed in full at http://www.valgrind.org/.

Valgrind is built via the standard Unix ./configure, make, make install process; full details are given in the README le in the distribution.Valgrind is licensed under the The GNU General Public License, version 2. The valgrind/*.h headers that you may wish to include in your code (eg. valgrind.h, memcheck.h, helgrind.h, etc.) are distributed under a BSD-style license, so you may include them in your code without worrying about license conicts. Some of the PThreads test cases, pth_*.c, are taken from "Pthreads Programming" by Bradford Nichols, Dick Buttlar & Jacqueline Proulx Farrell, ISBN 1-56592-115-1, published by OReilly & Associates, Inc.

If you contribute code to Valgrind, please ensure your contributions are licensed as "GPLv2, or (at your option) any later version." This is so as to allow the possibility of easily upgrading the license to GPLv3 in future. If you want to modify code in the VEX subdirectory, please also see the le VEX/HACKING.README in the distribution.

1.2手册导航

这个手册反映了Valgrind 本身的结构,首先描述了Valgrind Core,如何使用和支持的选项。每个工具在手册中有自己的章节。虽然你会发现很多工具有一些相似作用,但是你只需阅读Valgrind Core和你所使用的工具。如果你第一次阅读,也许你只需运行Memcheck工具,查看Valgrind 快速开发指南将对你有帮助。

原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 到火车站发现身份证丢了怎么办 广电宽带太慢了怎么办 车有后雷达想装前置雷达怎么办 现代朗动油耗大怎么办 雷达线雕头里有水怎么办 上古卷轴5免疫死亡奴役怎么办 dw手表时针不动了怎么办 雷达陶瓷表壳摔坏了怎么办 雷达表盘摔坏了怎么办 雷达测速60超了怎么办 卡西欧手表电池没电了怎么办 审稿人让引用他的文章怎么办 考二建未从事该行业满两年怎么办 2档换3档离合器怎么办 高铁车票丢了怎么办 事业编制调动原单位不同意怎么办 想去铁路上工作怎么办 房产权50年以后怎么办 在香港手机没电怎么办 学校官网登陆忘记密码怎么办 网上申报学校忘记密码怎么办 专转本想换专业怎么办 发生工伤没有平均公资怎么办? 单招过了不想去怎么办 22岁了还想复读怎么办 父母不让我读大专了怎么办 专升本考试失利怎么办 高考复读一年后失败了怎么办? 医保住院超过30万怎么办 北京医保超过2万怎么办 工伤公司垫付医疗费没法报销怎么办 司法考试照片耳朵露不出来怎么办 新华社毕业证照片用光了怎么办 农村父母投靠落户社保怎么办 退休后投靠父母户口怎么办 要离婚想儿子了怎么办 怀孕期间离婚了孩子户口怎么办 常州武进区怎么办居住证明 跟老公离婚了户口怎么办 离婚了不给户口怎么办 父母不给户口本迁户口怎么办