• 5815阅读
  • 0回复

Callgrind: a call graph profiler [复制链接]

上一主题 下一主题
离线steinlee
 

只看楼主 正序阅读 楼主  发表于: 2008-11-01
— 本帖被 XChinux 执行加亮操作(2009-01-06) —

Callgrind is a profiling tool that can construct a call graph for a program's run. By default, the collected data consists of the number of instructions executed, their relationship to source lines, the caller/callee relationship between functions, and the numbers of such calls. Optionally, a cache simulator (similar to cachegrind) can produce further information about the memory access behavior of the application.

The profile data is written out to a file at program termination. For presentation of the data, and interactive control of the profiling, two command line tools are provided:

callgrind_annotate

    This command reads in the profile data, and prints a sorted lists of functions, optionally with source annotation.

    For graphical visualization of the data, try KCachegrind, which is a KDE/Qt based GUI that makes it easy to navigate the large amount of data that Callgrind produces.
callgrind_control

    This command enables you to interactively observe and control the status of currently running applications, without stopping the application. You can get statistics information as well as the current stack trace, and you can request zeroing of counters or dumping of profile data.

To use Callgrind, you must specify --tool=callgrind on the Valgrind command line.
Looking for remote C/C++ and Qt 兼职
快速回复
限100 字节
 
上一个 下一个