blob: 108c7d2474b5da3d0779a34577ad09b6d68b9df7 [file] [log] [blame]
<?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="Remote-Valgrind.html" title="Remote Valgrind">
<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">Remote Valgrind</td>
</tr>
</table><hr class="navigation-separator"/>
<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/HelgrindOutput2.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>Profiling Tools</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 class="navigation-separator"/>
<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="Remote-Valgrind.html" title="Remote Valgrind">
<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">Remote Valgrind</td>
</tr>
</table>
</body>
</html>