Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 1879510f5b436e74a7761fe088f95a4b8c2c95a5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<title>Valgrind User Guide - Using Helgrind</title>
		<link type="text/css" rel="stylesheet" href="../../../book.css"/>
	</head>
	<body>
		<table class="navigation" style="width: 100%;" border="0" summary="navigation">
			<tr>
				<th style="width: 100%" align="center" colspan="3">Using Helgrind</th>
			</tr>
			<tr>
				<td style="width: 20%" align="left">
					<a href="Using-Cachegrind.html" title="Using Cachegrind">
						<img alt="Previous" border="0" src="../../../images/prev.gif"/>
					</a>
				</td>
				<td style="width: 60%" align="center"></td>
				<td style="width: 20%" align="right">
					<a href="Special-Cases.html" title="Special Cases">
						<img alt="Next" border="0" src="../../../images/next.gif"/>
					</a>
				</td>
			</tr>
			<tr>
				<td style="width: 20%" align="left" valign="top">Using Cachegrind</td>
				<td style="width: 60%" align="center"></td>
				<td style="width: 20%" align="right" valign="top">Special Cases</td>
			</tr>
		</table><hr/>
		<h1 id="Using_Helgrind">Using Helgrind</h1>
		<p>Helgrind is a tool that allows you to detect synchronisation errors in C, C++ and Fortran programs that use POSIX pthreads.  For more information about Helgrind, refer to 
			<a href="http://valgrind.org/docs/manual/hg-manual.html">http://valgrind.org/docs/manual/hg-manual.html</a>.
		</p>
		<h2 id="Analyzing_Helgrind_Profile_Results">Analyzing Helgrind Profile Results</h2>
		<p>All the synchronization errors found by Helgrind are displayed in the Valgrind view, which appears automatically after a profile run. Each displayed error can be expanded in the Valgrind view to display its stack trace.</p>
		<p>
			<br/>
			<img border="0" src="images/HelgrindOutput.png"/>
		</p>
		<p>In some cases, Helgrind can determine which section of the source code causes a reported error. Whenever this is the case, double-clicking on the stack trace of the reported error will open the related source file and place the cursor on the line responsible for the error. This stack trace view is similar to the view that the Memcheck plug-in provides. </p>
		<h2 id="Configuring_a_Helgrind_Profile_Run">Configuring a Helgrind Profile Run</h2>
		<p>To configure a Helgrind profile run, navigate to <u>Profile As</u> &gt; <u>Profile Configurations</u> to access the 
			<b>
				<i>Profile Configurations</i>
			</b> menu. In the 
			<b>
				<i>Valgrind Options</i>
			</b> tab, navigate further to 
			<b>
				<i>Helgrind Options</i>
			</b>.
		</p>
		<p>
			<br/>
			<img border="0" src="images/HelgrindOptions2.png"/>
		</p>
		<p>The 
			<b>
				<i>Helgrind Options</i>
			</b> tab allows you to configure the following options:
		</p>
		<ul>
			<li>
				<b>
					<i>track lockorders</i>
				</b> : when enabled, allows Helgrind to perform lock order consistency checking. 
			</li>
		</ul>
		<ul>
			<li>
				<b>
					<i>history level</i>
				</b> defines how much information Helgrind will collect about earlier conflict accesses which can cause data races. This setting has three possible values - full, none and approx - where "full" means that Helgrind will collect and store any possible data, which is expensive in memory and speed; "none" means that no information about previous accesses will be collected; "approx" is a compromise between these two previous settings.
			</li>
		</ul>
		<ul>
			<li>
				<b>
					<i>conflict cache size</i>
				</b> is a setting which only has an effect with history-level=full. It controls the size of the memory cache used by Helgrind to store previous conflicting accesses. Increasing the value by 1 means increasing Helgrind's memory requirement by 100 bytes.
			</li>
		</ul>
		<p>For more information about each Helgrind option in the Valgrind plug-in for Eclipse, refer to man valgrind, section "HELGRIND OPTIONS".</p><hr/>
		<table class="navigation" style="width: 100%;" border="0" summary="navigation">
			<tr>
				<td style="width: 20%" align="left">
					<a href="Using-Cachegrind.html" title="Using Cachegrind">
						<img alt="Previous" border="0" src="../../../images/prev.gif"/>
					</a>
				</td>
				<td style="width: 60%" align="center">
					<a href="User-Guide.html" title="Valgrind User Guide">
						<img alt="Valgrind User Guide" border="0" src="../../../images/home.gif"/>
					</a>
				</td>
				<td style="width: 20%" align="right">
					<a href="Special-Cases.html" title="Special Cases">
						<img alt="Next" border="0" src="../../../images/next.gif"/>
					</a>
				</td>
			</tr>
			<tr>
				<td style="width: 20%" align="left" valign="top">Using Cachegrind</td>
				<td style="width: 60%" align="center"></td>
				<td style="width: 20%" align="right" valign="top">Special Cases</td>
			</tr>
		</table>
	</body>
</html>

Back to the top