12 Source Code Profilers for C & C++

Source :http://open-tube.com/12-source-code-profilers-for-cc/

Code Profilers are very distinct from traditional debuggers. They are able to catch the trivial and non fatal coding errors which are often hard for humans to catch. These trivial bugs later claim weeks of debugging and extra cost to fix. Code profilers will save you hours of debugging time. These tools can automatically detect many memory management and threading, etc bugs. These tools will give you confidence that your programs are free of many common bugs, some of which would take hours to find manually, or never be found at all. You can find and eliminate bugs before they become a problem.

As usual, there are a lot of code profilers available for C/C++. Here is a list of very prominent such players.

1. Insure++ (For Windows, Linux, UNIX like)

Insure++ is a runtime memory analysis and error detection tool for C and C++ that automatically identifies a variety of difficult-to-track programming and memory-access errors, along with potential defects and inefficiencies in memory usage. Errors such as memory corruption, memory leaks, access outside of array bounds, invalid pointers, and the like often go undetected during normal testing, only to result in application crashes in the field. Insure++ will help you find and eliminate such defects in your applications to ensure the integrity of their memory usage.

During testing, Insure++ checks all types of memory references, including those to static (global), stack, and shared memory — both in user’s code and in third party libraries.

Errors that Insure++ detects include: Corrupted heap and stack memory, Use of uninitialized variables and objects, Array and string bounds errors on heap and stack, etc.

2. Rational Purify (For Windows and Linux/UNIX)

IBM Rational Purify is a runtime analysis solution designed to help developers write more reliable code such as C++ and C. Reliability is ensured via two crucial functions: memory corruption detection and memory leak detection. Rational Purify packages support for these two runtime analysis capabilities in a single product with a common insta ll and licensing system.

3. Valgrind (For UNIX like)

Valgrind is an award-winning instrumentation framework for building dynamic analysis tools. There are Valgrind tools that can automatically detect many memory management and threading bugs, and profile your programs in detail. You can also use Valgrind to build new tools.

The Valgrind distribution currently includes six production-quality tools: a memory error detector, two thread error detectors, a cache and branch-prediction profiler, a call-graph generating cache profiler, and a heap profiler. It also includes one experimental tool, which detects out of bounds reads and writes of stack, global and heap arrays. It runs on the following platforms: X86/Linux, AMD64/Linux, PPC32/Linux, PPC64/Linux.

Valgrind works with programs written in any language. Because Valgrind works directly with program binaries, it works with programs written in any programming language, be they compiled, just-in-time compiled, or interpreted. The Valgrind tools are largely aimed at programs written in C and C++, because programs written in these languages tend to have the most bugs! But it can, for example, be used to debug and profile systems written in a mixture of languages. Valgrind has been used on programs written partly or entirely in C, C++, Java, Perl, Python, assembly code, Fortran, Ada, and many others.

Valgrind is Free and Open Source Software. Read here for more on Valgrind.

4. Zoom (For Linux)

Zoom is a graphical, low-overhead, sampling profiler for Linux from RotateRight which diagnoses performance problems related to CPU and memory-intensive code. Zoom supports Call Tree Visualization, Code Visualization etc. It is really easy to correlate assembly and actual source, bottlenecks in the code etc. Zoom supports DWARF (debugging data format).

5. Code Analyst (For Windows and Linux)

AMD CodeAnalyst Performance Analyzer is a suite of powerful tools that analyze software performance on AMD microprocessors and help developers optimize application performance. It uses a profiling technique to identify performance areas and issues within the system. Using this suite of tools, developers can get visibility into overall system performance, and can navigate into different modules and functions to locate hotspots within the target application.

CodeAnalyst allows you to profile applications using various performance events available on different AMD processors. You can specify performance events to target various functional units of the processor, or profiling granularity to adjust the accuracy of the result.

CodeAnalyst is designed to profile the performance of binary modules, including user mode application modules and kernel mode driver modules. Timer-Based Profiling and Event-Based Profiling collect data from multiple processors in a multi-processor system. It can support any language as it works with the binary.

6. Sleepy (For Windows)

‘Sleepy’ is a non-invasive profiler for the Windows platform that allows statistical profiling of C++ applications through sampling the instruction pointer register. Sleepy presents results in a GUI built with wxWindows.

The Sleepy profiler uses a technique where the profiler runs in a different thread from the target program. Every 1ms or so, the profiler thread suspends the target thread, and pulls out the current instruction pointer register value from the thread context. These mem addresses are resolved into procedure names and line numbers using debug information. This allows line-level resolution, without making any changes to the target program. The only requirement is that the target program is compiled with (MS) debug information

Sleepy uses the MS Debug Help (dbghelp) library to read debug information, and is therefore limited to the debug info formats that dbghelp can understand. As far as I know, debug information produced by non-MS compilers such as GCC will not be understood, and therefore such code cannot be profiled.

An improved version Very Sleepy is also available.

Intel VTune (For Windows and Linux)

VTune Performance Analyzer is Intel Corporation‘s tool for call graph or analyzing a set of tuning events. It works with C/C++/Fortan/.NET/Java and other applications on Linux or Windows, but only when running on selected Intel hardware. he GUI assists in various kinds of code profiling including time based profile, Event based profile etc.

VTune Performance Analyzer evaluates applications on all sizes of systems based on Intel® processors, from embedded systems through supercomputers, to help you improve application performance. VTune Performance Analyzer makes application performance tuning easier and is indispensable for making your software run its fastest on the latest single and multi-core systems.

8. AQTime (For Windows)

AQtime is a complete, top-to-bottom performance profiler and memory usage debugger for all major Windows development tools (Delphi, Visual Basic, Visual C++, and C++Builder), .NET compilers (including both Microsoft and non-Microsoft) and for VBScript and JScript routines. It includes several profilers and productivity tools that provide you with an unrivaled level of information on the state of your 32- and 64-bit software projects – from inception to delivery!

9. BullseyeCoverage (For Windows, Linux, Solaris and many more)

BullseyeCoverage is a code coverage analyzer for C++ and C that tells you how much of your source code was tested. You can use this information to quickly focus your testing effort and pinpoint areas that need to be reviewed. Code coverage analysis is useful during unit testing, integration testing, and final release. BullseyeCoverage enables you to create more reliable code and save time.

Function coverage gives you a quick overview and condition/decision coverage gives you high precision Works with everything you can write in C++ and C, including system-level and kernel mode Short learning curve, Integrated with Microsoft Visual Studio, Include or exclude any portion of your project code, Run-time source code included, for custom environments, Simple licensing, Merge results from distributed testing etc.

10. C++ Profiler Tool (For Windows)

The C++ Profiler tool enables the collection and display of execution profile data on C++ software source code bases of arbitrary size.

11. Shiny Profiler (For Windows, UNIX Like, Source code is portable)

Shiny is a low overhead, well documented and lightning fast C++ profiler. Easy to use on existing projects, no extensive surgery, just have fun with it. Nicely formatted output provides call tree (call graph), flat profile and is simple to custom display

12. Deleaker (For Windows)

Deleaker is a run-time error detection and debugging tool for Visual C++ developers. Deleaker is a really useful add-in for Visual Studio that helps you to analyze programming errors, many of which are unique to Visual C++. With Deleaker you can detect and localize resource leaks such as memory, GDI and USER objects, handles.

Resource leaks. Even a robust Windows-based application is not safe from them. Of all bugs they are the most difficult to find especially when they appear in graphics device interface (GDI) objects and menus. And as we all know, the earlier you catch bugs, the less expensive they are. Plenty of tools exist to help track down memory leaks. But there are very few good tools to help track GDI resource leaks that can ruin performance on any Windows operating system. Deleaker is one of them and the fact that it almost doesn’t slow down your application makes it your natural choice.

del.icio.us Tags: Code profilers,code quality,Memory Debugger,Performance analysis,C++ profiler,debugging,memory leak,error,Visual Studio,Insure++,Parasoft,Rational Purify,Valgrind,VTune,Code Analyst,Deleaker,Zoom

Technorati Tags: Code profilers,code quality,Memory Debugger,Performance analysis,C++ profiler,debugging,memory leak,error,Visual Studio,Insure++,Parasoft,Rational Purify,Valgrind,VTune,Code Analyst,Deleaker,Zoom

12 Source Code Profilers for C & C++

时间: 2024-10-24 11:39:29

12 Source Code Profilers for C & C++的相关文章

Ununtu 12.04 gedit安装插件Source Code Browser

1. 安装ctags: sudo apt-get install exuberant-ctags 2. 打开https://github.com/Quixotix/gedit-source-code-browser选折右边的Download Zip按钮下载 3. 解压缩刚刚下载的zip文件. 4. 将文件 sourcecodebrowser.plugin 和文件夹 sourcecodebrowser 复制到 /usr/lib/gedit/plugins/ [email protected]:~/

ubuntu 12.04 下 eclipse关联 source code

一.JDK source code 命令行中: sudo apt-get install openjdk-7-source 下好的jdk源码在 Linux 在目录 usr/lib/jvm/openjdk-7/src.zip Windows在目录  C:\Program Files\Java\jdk1.6.0_20\src.zip In Eclipse, select Windows -> Preferences -> Java -> Installed JREs , expands rt

CRC32 Source Code

/* The Quest Operating System * Copyright (C) 2005-2010 Richard West, Boston University * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Softwar

android activity 启动过程分析(source code 4.4)

说实话,android source code从2.3到4.4变化是蛮多的,尤其是media部分,虽然总的框架是没有多大变化,但是找起代码来看还是挺麻烦的.在android里面最受伤的是使用了java,jni,jvm,Nativity c++等等,各种设计模式横行,当然在学习源码过程中也意识了编程语言基础,数据结构,设计模式的重要性. android source code 经典的地方: 1. 大量使用了各种设计模式如单例模式,装饰模式,工程工厂模式,适配器模式等等. 2. 使用了binder驱

在 Win7 环境使用 hyperledger fabric source code 模拟 IBM Bluemix Blockchain Service

在 Win7 环境使用 hyperledger fabric source code 模拟 IBM Bluemix Blockchain Service 标签: blockchain区块链 2016-10-13 07:05 949人阅读 评论(1) 收藏 举报  分类: blockchain(12)  Docker(5)  区块链(6)  版权声明:本文为博主原创文章,未经博主允许不得转载. 目录(?)[+] 在 Win7 环境使用 hyperledger/fabric source code

python linecache source code

The source code of linecache.py from python 2.0 is here. from stat import * Get file information >>> filestat = os.stat('README.TXT') >>> filestat nt.stat_result(st_mode=33206, st_ino=0L, st_dev=0, st_nlink=0, st_uid=0, st_gid=0, st_size

convert source code to pdf in python

1 import os 2 import sys 3 4 def find_file(root_dir, type): 5 dirs_pool = [root_dir] 6 dest_pool = [] 7 8 def scan_dir(directory): 9 entries = os.walk(directory) 10 for root, dirs, files in entries: 11 dirs_pool.extend([os.path.join(root, dir_entry)

akka cluster sharding source code 学习 (1/5) 替身模式

为了使一个项目支持集群,自己学习使用了 akka cluster 并在项目中实施了,从此,生活就变得有些痛苦.再配上 apache 做反向代理和负载均衡,debug 起来不要太酸爽.直到现在,我还对 akka cluster 输出的 log 不是很熟悉,目前网络上 akka cluster 的信息还比较少,想深入了解这东西的话,还是要自己读 source code.前几天,雪球那帮人说 akka 不推荐使用,有很多坑,这给我提了个醒,目前我对 akka 的理解是远远不够的,需要深入学习. akk

Objective--C Practice and source code

Qustion:(MRC下) 1.定义一个Computer类 实例变量:float width; NSString *name; 方法:一个带两个参数的初始化函数:print()函数:dealloc()函数: 2.定义一个Person类 实例变量:NSString *name; Computer *c; int age; 方法:一个带三个参数的初始化函数:print()函数:dealloc()函数: 要求:用该类创建出来的对象能实现copy和存入文件. 3.主函数要求: a)分别创建Comput