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 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
|
<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns:MSHelp="http://www.microsoft.com/MSHelp/" lang="en-us" xml:lang="en-us"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="Enabling Debugging Features">
<meta name="DC.subject" content="Enabling Debugging Features, TBB_USE_DEBUG, TBB_USE_ASSERT, TBB_USE_THREADING_TOOLS, TBB_USE_PERFORMANCE_WARNINGS">
<meta name="keywords" content="Enabling Debugging Features, TBB_USE_DEBUG, TBB_USE_ASSERT, TBB_USE_THREADING_TOOLS, TBB_USE_PERFORMANCE_WARNINGS">
<meta name="DC.Relation" scheme="URI" content="../../reference/environment.htm">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="enabling_debugging_features">
<meta name="DC.Language" content="en-US">
<link rel="stylesheet" type="text/css" href="../../intel_css_styles.css">
<title>Enabling Debugging Features</title>
<xml>
<MSHelp:Attr Name="DocSet" Value="Intel"></MSHelp:Attr>
<MSHelp:Attr Name="Locale" Value="kbEnglish"></MSHelp:Attr>
<MSHelp:Attr Name="TopicType" Value="kbReference"></MSHelp:Attr>
</xml>
</head>
<body id="enabling_debugging_features">
<!-- ==============(Start:NavScript)================= -->
<script src="..\..\NavScript.js" language="JavaScript1.2" type="text/javascript"></script>
<script language="JavaScript1.2" type="text/javascript">WriteNavLink(2);</script>
<!-- ==============(End:NavScript)================= -->
<a name="enabling_debugging_features"><!-- --></a>
<h1 class="topictitle1">Enabling Debugging Features</h1>
<div>
<div class="section">
<p>Four macros control certain debugging features. In
general, it is useful to compile with these features on for development code,
and off for production code, because the features may decrease performance. The
table below summarizes the macros and their default values. A value of 1
enables the corresponding feature; a value of 0 disables the feature.
</p>
<div class="tablenoborder"><a name="tbl6"><!-- --></a><table cellpadding="4" summary="" id="tbl6" width="100%" frame="hsides" border="1" rules="all"><caption><span class="tablecap">Debugging Macros</span></caption>
<thead align="left">
<tr>
<th class="cellrowborder" valign="top" width="NaN%" id="d59878e61">
<p><strong>Macro</strong>
</p>
</th>
<th class="cellrowborder" valign="top" width="NaN%" id="d59878e69">
<p><strong>Default Value</strong>
</p>
</th>
<th class="row-nocellborder" valign="top" width="NaN%" id="d59878e77">
<p><strong>Feature</strong>
</p>
</th>
</tr>
</thead>
<tbody>
<tr>
<td class="cellrowborder" rowspan="2" valign="top" width="NaN%" headers="d59878e61 ">
<p><samp class="codeph">TBB_USE_DEBUG</samp>
</p>
</td>
<td class="cellrowborder" valign="top" width="NaN%" headers="d59878e69 ">
<p>Windows* OS:
</p>
<p>1 if
<samp class="codeph">_DEBUG</samp> is defined,
</p>
<p>0 otherwise.
</p>
</td>
<td class="row-nocellborder" rowspan="2" valign="top" width="NaN%" headers="d59878e77 ">
<p>Default value for all other macros in this
table.
</p>
</td>
</tr>
<tr>
<td class="row-nocellborder" valign="top" width="NaN%" headers="d59878e69 ">
<p>All other systems: 0.
</p>
</td>
</tr>
<tr>
<td class="cellrowborder" valign="top" width="NaN%" headers="d59878e61 ">
<p><samp class="codeph">TBB_USE_ASSERT</samp>
</p>
</td>
<td class="cellrowborder" rowspan="3" valign="top" width="NaN%" headers="d59878e69 ">
<p><samp class="codeph">TBB_USE_DEBUG</samp>
</p>
<p>
</p>
</td>
<td class="row-nocellborder" valign="top" width="NaN%" headers="d59878e77 ">
<p>Enable internal assertion checking. Can
significantly slow performance.
</p>
</td>
</tr>
<tr>
<td class="cellrowborder" valign="top" width="NaN%" headers="d59878e61 ">
<p><samp class="codeph">TBB_USE_THREADING_TOOLS</samp>
</p>
</td>
<td class="row-nocellborder" valign="top" width="NaN%" headers="d59878e77 ">
<p>Enable full support for Intel® Parallel
Studio XE and Intel® Threading Tools.
</p>
</td>
</tr>
<tr>
<td class="cellrowborder" valign="top" width="NaN%" headers="d59878e61 ">
<p><samp class="codeph">TBB_USE_PERFORMANCE_WARNINGS</samp>
</p>
</td>
<td class="row-nocellborder" valign="top" width="NaN%" headers="d59878e77 ">
<p>Enable warnings about performance issues.
</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h2 class="sectiontitle"><samp class="codeph">TBB_USE_ASSERT</samp>
Macro</h2>
<p>The macro
<samp class="codeph">TBB_USE_ASSERT</samp> controls whether error checking is
enabled in the header files. Define
<samp class="codeph">TBB_USE_ASSERT</samp> as
<samp class="codeph">1</samp> to enable error checking.
</p>
<p>If an error is detected, the library prints an
error message on
<samp class="codeph">stderr</samp> and calls the standard C routine
<samp class="codeph">abort</samp>. To stop a program when internal error checking
detects a failure, place a breakpoint on
<samp class="codeph">tbb::assertion_failure</samp>.
</p>
<div class="Note"><h3 class="NoteTipHead">
Tip</h3>
<p>On Microsoft Windows* operating systems, debug
builds implicitly set
<samp class="codeph">TBB_USE_ASSERT</samp> to 1 by default
</p>
</div>
</div>
<div class="section"><h2 class="sectiontitle"><samp class="codeph">TBB_USE_THREADING_TOOLS</samp>
Macro</h2>
<p>The macro
<samp class="codeph">TBB_USE_THREADING_TOOLS</samp> controls support for Intel®
Threading Tools:
</p>
<ul type="disc">
<li>
<p>Intel® Inspector XE
</p>
</li>
<li>
<p>Intel® VTune™ Amplifier XE
</p>
</li>
<li>
<p>Intel® Parallel Inspector
</p>
</li>
<li>
<p>Intel® Parallel Amplifier
</p>
</li>
<li>
<p>Intel® Thread Profiler
</p>
</li>
<li>
<p>Intel® Thread Checker
</p>
</li>
</ul>
<p>Define
<samp class="codeph">TBB_USE_THREADING_TOOLS</samp> as
<samp class="codeph">1</samp> to enable full support for these tools.
</p>
<p>That is full support is enabled if error checking
is enabled. Leave
<samp class="codeph">TBB_USE_THREADING_TOOLS</samp> undefined or zero to enable
top performance in release builds, at the expense of turning off some support
for tools.
</p>
</div>
<div class="section"><h2 class="sectiontitle"><samp class="codeph">TBB_USE_PERFORMANCE_WARNINGS</samp>
Macro</h2>
<p>The macro
<samp class="codeph">TBB_USE_PERFORMANCE_WARNINGS</samp> controls performance
warnings. Define it to be 1 to enable the warnings. Currently, the warnings
affected are:
</p>
<ul type="disc">
<li>
<p>Some that report poor hash functions for
<samp class="codeph">concurrent_hash_map</samp>. Enabling the warnings may
impact performance.
</p>
</li>
<li>
<p>Misaligned 8-byte atomic stores on Intel® IA-32
processors.
</p>
</li>
</ul>
</div>
</div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="../../reference/environment.htm">Environment</a></div>
</div>
<div></div>
</body>
</html>
|