Sign In
Upload
Manuals
Brands
Valgrind Manuals
Software
Cachegrind
Valgrind Cachegrind Tracing Profiler Manuals
Manuals and User Guides for Valgrind Cachegrind Tracing Profiler. We have
1
Valgrind Cachegrind Tracing Profiler manual available for free PDF download: Quick Start Manual
Valgrind Cachegrind Quick Start Manual (319 pages)
Brand:
Valgrind
| Category:
Software
| Size: 1 MB
Table of Contents
The Valgrind Quick Start Guide
4
Table of Contents
4
Preparing Your Program
5
Running Your Program under Memcheck
5
Interpreting Memcheck's Output
5
Valgrind FAQ
7
Valgrind User Manual
9
1 Introduction
13
An Overview of Valgrind
13
How to Navigate this Manual
14
2 Using and Understanding the Valgrind Core
15
What Valgrind Does with Your Program
15
Getting Started
16
The Commentary
16
Reporting of Errors
18
Suppressing Errors
18
Basic Options
21
Core Command-Line Options
21
Tool-Selection Option
21
Error-Related Options
23
Caveats
25
Malloc-Related Options
28
Uncommon Options
28
Debugging Options
33
Setting Default Options
33
Support for Threads
33
Scheduling and Multi-Thread Performance
34
Handling of Signals
35
Building and Installing Valgrind
35
If You Have Problems
36
Limitations
36
An Example Run
38
Warning Messages You Might See
39
3 Using and Understanding the Valgrind Core: Advanced Topics
41
The Client Request Mechanism
41
More Information
42
Debugging Your Program Using Valgrind Gdbserver and GDB
43
Quick Start: Debugging in 3 Steps
43
Valgrind Gdbserver Overall Organisation
44
Connecting GDB to a Valgrind Gdbserver
44
Connecting to an Android Gdbserver
46
Monitor Command Handling by the Valgrind Gdbserver
47
Valgrind Gdbserver Thread Information
49
Examining and Modifying Valgrind Shadow Registers
49
Limitations of the Valgrind Gdbserver
50
Vgdb Command Line Options
54
Valgrind Monitor Commands
55
Function Wrapping
57
A Simple Example
57
Wrapping Specifications
58
Wrapping Semantics
59
Debugging
60
Limitations - Control Flow
60
Limitations - Original Function Signatures
61
Examples
61
4 Memcheck: a Memory Error Detector
62
Explanation of Error Messages from Memcheck
62
Illegal Read / Illegal Write Errors
62
Overview
62
Use of Uninitialised Values
63
Use of Uninitialised or Unaddressable Values in System Calls
64
Illegal Frees
65
When a Heap Block Is Freed with an Inappropriate Deallocation Function
65
Memory Leak Detection
66
Overlapping Source and Destination Blocks
66
Memcheck Command-Line Options
69
Writing Suppression Files
71
Details of Memcheck's Checking Machinery
72
Valid-Value (V) Bits
72
Putting It All Together
74
Valid-Address (A) Bits
74
Memcheck Monitor Commands
75
Client Requests
80
Memory Pools: Describing and Working with Custom Allocators
81
Building and Installing the Wrappers
84
Debugging MPI Parallel Programs with Valgrind
84
Controlling the Wrapper Library
85
Getting Started
85
Functions
86
Types
86
What to Expect When Using the Wrappers
87
Writing New Wrappers
87
5 Cachegrind: a Cache and Branch-Prediction Profiler
89
Overview
89
Using Cachegrind, Cg_Annotate and Cg_Merge
89
Output File
90
Running Cachegrind
90
Running Cg_Annotate
91
The Output Preamble
91
The Global and Function-Level Counts
92
Line-By-Line Counts
93
Annotating Assembly Code Programs
95
Cg_Annotate Warnings
95
Forking Programs
95
Unusual Annotation Cases
96
Differencing Profiles with Cg_Diff
97
Merging Profiles with Cg_Merge
97
Cachegrind Command-Line Options
98
Cg_Annotate Command-Line Options
99
Cg_Diff Command-Line Options
99
Acting on Cachegrind's Information
100
Cache Simulation Specifics
101
Simulation Details
101
Accuracy
102
Branch Simulation Specifics
102
Cachegrind Output File Format
103
How Cachegrind Works
103
Implementation Details
103
6 Callgrind: a Call-Graph Generating Cache and Branch Prediction Profiler
105
Functionality
105
Overview
105
Basic Usage
106
Advanced Usage
107
Multiple Profiling Dumps from One Program Run
107
Limiting the Range of Collected Events
108
Avoiding Cycles
109
Counting Global Bus Events
109
Callgrind Command-Line Options
110
Dump Creation Options
110
Forking Programs
110
Activity Options
111
Data Collection Options
111
Cost Entity Separation Options
112
Cache Simulation Options
113
Simulation Options
113
Callgrind Monitor Commands
114
Callgrind SpecifiC Client Requests
115
Callgrind_Annotate Command-Line Options
115
Callgrind_Control Command-Line Options
116
Detected Errors: Misuses of the POSIX Pthreads API
118
7 Helgrind: a Thread Error Detector
118
Overview
118
Detected Errors: Inconsistent Lock Orderings
119
A Simple Data Race
121
Detected Errors: Data Races
121
Helgrind's Race Detection Algorithm
123
Interpreting Race Error Messages
125
Hints and Tips for Effective Use of Helgrind
127
Helgrind Command-Line Options
130
A To-Do List for Helgrind
132
Helgrind Client Requests
132
8 DRD: a Thread Error Detector
133
Multithreaded Programming Paradigms
133
Overview
133
POSIX Threads Programming Model
133
Data Race Detection
134
Multithreaded Programming Problems
134
DRD Command-Line Options
135
Using DRD
135
Detected Errors: Data Races
137
Detected Errors: Lock Contention
139
Detected Errors: Misuse of the POSIX Threads API
139
Client Requests
140
Debugging Boost.thread Programs
143
Debugging GNOME Programs
143
Debugging Openmp Programs
143
DRD and Custom Memory Allocators
144
DRD Versus Memcheck
145
Hints and Tips for Effective Use of DRD
145
Resource Requirements
145
Mutex Types
146
Using the POSIX Threads API Effectively
146
Condition Variables
147
Feedback
147
Limitations
147
Pthread_Cond_Timedwait and Timeouts
147
An Example Program
148
9 Massif: a Heap Profiler
148
Overview
148
Using Massif and Ms_Print
148
Running Massif
149
Running Ms_Print
149
The Output Graph
150
The Output Preamble
150
The Snapshot Details
153
Forking Programs
157
Measuring All Memory in a Process
157
Acting on Massif's Information
158
Massif Command-Line Options
158
Massif Client Requests
160
Massif Monitor Commands
160
Massif's Output File Format
160
Ms_Print Command-Line Options
160
10 DHAT: a Dynamic Heap Analysis Tool
161
Overview
161
Interpreting the Max-Live, Tot-Alloc and Deaths Fields
162
Understanding Dhat's Output
162
Interpreting the Acc-Ratios Fields
163
Interpreting "Aggregated Access Counts by Offset" Data
164
DHAT Command-Line Options
165
How Sgcheck Works
167
Overview
167
Sgcheck Command-Line Options
167
11 Sgcheck: an Experimental Stack and Global Array Overrun Detector
167
Comparison with Memcheck
168
Limitations
168
Still to Do: Implementation Tidying
169
Still to Do: User-Visible Functionality
169
12 BBV: an Experimental Basic Block Vector Generation Tool
170
Overview
170
Using Basic Block Vectors to Create Simpoints
170
Basic Block Vector File Format
171
BBV Command-Line Options
171
Implementation
172
Threaded Executable Support
172
Validation
172
Performance
173
Lackey Command-Line Options
174
13 Lackey: an Example Tool
174
Overview
174
14 Nulgrind: the Minimal Valgrind Tool
175
Overview
175
Valgrind Faq
176
Valgrind Technical Documentation
186
Valgrind Technical Documentation
187
1 The Design and Implementation of Valgrind
188
Basics
189
Getting Started
189
Getting the Code
189
How Tools Work
189
Introduction
189
2 Writing a New Valgrind Tool
189
Writing the Code
190
Finalisation
191
Initialisation
191
Instrumentation
191
Other Important Information
191
Advanced Topics
192
Debugging Tips
192
Suppressions
192
Documentation
193
Other Makefile Hackery
194
Profiling
194
Regression Tests
194
The Core/Tool Interface
194
Final Words
195
Basic Structure
196
3 Callgrind Format Specification
196
Overview
196
Simple Example
196
Associations
197
Extended Example
197
Name Compression
198
Subposition Compression
199
Grammar
200
Miscellaneous
200
Reference
200
Description of Header Lines
202
Description of Body Lines
204
Valgrind Distribution Documents
206
Valgrind Distribution Documents
207
Authors
208
News
210
Older News
243
Readme
281
Readme_Missing_Syscall_Or_Ioctl
283
Readme_Developers
287
Readme_Packagers
293
Readme.s390
295
Readme.android
296
Readme.android_Emulator
299
Readme.mips
301
GNU Licenses
303
Advertisement
Advertisement
Related Products
Valgrind Callgrind
Valgrind BBV
Valgrind DHAT
Valgrind DRD
Valgrind Helgrind
Valgrind Lackey
Valgrind Massif
Valgrind Memcheck
Valgrind Nulgrind
Valgrind SGcheck
Valgrind Categories
Software
More Valgrind Manuals
Login
Sign In
OR
Sign in with Facebook
Sign in with Google
Upload manual
Upload from disk
Upload from URL