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 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>llvm-profdata - Profile data tool — LLVM 13 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/llvm-theme.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="llvm-readobj - LLVM Object Reader" href="llvm-readobj.html" />
<link rel="prev" title="llvm-otool - Mach-O dumping tool" href="llvm-otool.html" />
<style type="text/css">
table.right { float: right; margin-left: 20px; }
table.right td { border: 1px solid #ccc; }
</style>
</head><body>
<div class="logo">
<a href="../index.html">
<img src="../_static/logo.png"
alt="LLVM Logo" width="250" height="88"/></a>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="llvm-readobj.html" title="llvm-readobj - LLVM Object Reader"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="llvm-otool.html" title="llvm-otool - Mach-O dumping tool"
accesskey="P">previous</a> |</li>
<li><a href="https://llvm.org/">LLVM Home</a> | </li>
<li><a href="../index.html">Documentation</a>»</li>
<li class="nav-item nav-item-1"><a href="../Reference.html" >Reference</a> »</li>
<li class="nav-item nav-item-2"><a href="index.html" accesskey="U">LLVM Command Guide</a> »</li>
<li class="nav-item nav-item-this"><a href="">llvm-profdata - Profile data tool</a></li>
</ul>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3>Documentation</h3>
<ul class="want-points">
<li><a href="https://llvm.org/docs/GettingStartedTutorials.html">Getting Started/Tutorials</a></li>
<li><a href="https://llvm.org/docs/UserGuides.html">User Guides</a></li>
<li><a href="https://llvm.org/docs/Reference.html">Reference</a></li>
</ul>
<h3>Getting Involved</h3>
<ul class="want-points">
<li><a href="https://llvm.org/docs/Contributing.html">Contributing to LLVM</a></li>
<li><a href="https://llvm.org/docs/HowToSubmitABug.html">Submitting Bug Reports</a></li>
<li><a href="https://llvm.org/docs/GettingInvolved.html#mailing-lists">Mailing Lists</a></li>
<li><a href="https://llvm.org/docs/GettingInvolved.html#irc">IRC</a></li>
<li><a href="https://llvm.org/docs/GettingInvolved.html#meetups-and-social-events">Meetups and Social Events</a></li>
</ul>
<h3>Additional Links</h3>
<ul class="want-points">
<li><a href="https://llvm.org/docs/FAQ.html">FAQ</a></li>
<li><a href="https://llvm.org/docs/Lexicon.html">Glossary</a></li>
<li><a href="https://llvm.org/pubs">Publications</a></li>
<li><a href="https://github.com/llvm/llvm-project//">Github Repository</a></li>
</ul>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/CommandGuide/llvm-profdata.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="llvm-profdata-profile-data-tool">
<h1>llvm-profdata - Profile data tool<a class="headerlink" href="#llvm-profdata-profile-data-tool" title="Permalink to this headline">¶</a></h1>
<div class="section" id="synopsis">
<h2>SYNOPSIS<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h2>
<p><strong class="program">llvm-profdata</strong> <em>command</em> [<em>args…</em>]</p>
</div>
<div class="section" id="description">
<h2>DESCRIPTION<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>The <strong class="program">llvm-profdata</strong> tool is a small utility for working with profile
data files.</p>
</div>
<div class="section" id="commands">
<h2>COMMANDS<a class="headerlink" href="#commands" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p><a class="reference internal" href="#profdata-merge"><span class="std std-ref">merge</span></a></p></li>
<li><p><a class="reference internal" href="#profdata-show"><span class="std std-ref">show</span></a></p></li>
<li><p><a class="reference internal" href="#profdata-overlap"><span class="std std-ref">overlap</span></a></p></li>
</ul>
</div>
<div class="section" id="merge">
<span id="profdata-merge"></span><h2>MERGE<a class="headerlink" href="#merge" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id1">
<h3>SYNOPSIS<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
<p><strong class="program">llvm-profdata merge</strong> [<em>options</em>] [<em>filename…</em>]</p>
</div>
<div class="section" id="id2">
<h3>DESCRIPTION<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
<p><strong class="program">llvm-profdata merge</strong> takes several profile data files
generated by PGO instrumentation and merges them together into a single
indexed profile data file.</p>
<p>By default profile data is merged without modification. This means that the
relative importance of each input file is proportional to the number of samples
or counts it contains. In general, the input from a longer training run will be
interpreted as relatively more important than a shorter run. Depending on the
nature of the training runs it may be useful to adjust the weight given to each
input file by using the <code class="docutils literal notranslate"><span class="pre">-weighted-input</span></code> option.</p>
<p>Profiles passed in via <code class="docutils literal notranslate"><span class="pre">-weighted-input</span></code>, <code class="docutils literal notranslate"><span class="pre">-input-files</span></code>, or via positional
arguments are processed once for each time they are seen.</p>
</div>
<div class="section" id="options">
<h3>OPTIONS<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h3>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-help">
<code class="sig-name descname"><span class="pre">-help</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-help" title="Permalink to this definition">¶</a></dt>
<dd><p>Print a summary of command line options.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-output">
<span id="cmdoption-llvm-profdata-merge-o"></span><code class="sig-name descname"><span class="pre">-output</span></code><code class="sig-prename descclassname"><span class="pre">=output</span></code><code class="sig-prename descclassname"><span class="pre">,</span> </code><code class="sig-name descname"><span class="pre">-o</span></code><code class="sig-prename descclassname"><span class="pre">=output</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-output" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify the output file name. <em>Output</em> cannot be <code class="docutils literal notranslate"><span class="pre">-</span></code> as the resulting
indexed profile data can’t be written to standard output.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-weighted-input">
<code class="sig-name descname"><span class="pre">-weighted-input</span></code><code class="sig-prename descclassname"><span class="pre">=weight,filename</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-weighted-input" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify an input file name along with a weight. The profile counts of the
supplied <code class="docutils literal notranslate"><span class="pre">filename</span></code> will be scaled (multiplied) by the supplied
<code class="docutils literal notranslate"><span class="pre">weight</span></code>, where <code class="docutils literal notranslate"><span class="pre">weight</span></code> is a decimal integer >= 1.
Input files specified without using this option are assigned a default
weight of 1. Examples are shown below.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-input-files">
<span id="cmdoption-llvm-profdata-merge-f"></span><code class="sig-name descname"><span class="pre">-input-files</span></code><code class="sig-prename descclassname"><span class="pre">=path</span></code><code class="sig-prename descclassname"><span class="pre">,</span> </code><code class="sig-name descname"><span class="pre">-f</span></code><code class="sig-prename descclassname"><span class="pre">=path</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-input-files" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify a file which contains a list of files to merge. The entries in this
file are newline-separated. Lines starting with ‘#’ are skipped. Entries may
be of the form <filename> or <weight>,<filename>.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-remapping-file">
<span id="cmdoption-llvm-profdata-merge-r"></span><code class="sig-name descname"><span class="pre">-remapping-file</span></code><code class="sig-prename descclassname"><span class="pre">=path</span></code><code class="sig-prename descclassname"><span class="pre">,</span> </code><code class="sig-name descname"><span class="pre">-r</span></code><code class="sig-prename descclassname"><span class="pre">=path</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-remapping-file" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify a file which contains a remapping from symbol names in the input
profile to the symbol names that should be used in the output profile. The
file should consist of lines of the form <code class="docutils literal notranslate"><span class="pre"><input-symbol></span> <span class="pre"><output-symbol></span></code>.
Blank lines and lines starting with <code class="docutils literal notranslate"><span class="pre">#</span></code> are skipped.</p>
<p>The <a class="reference internal" href="llvm-cxxmap.html"><span class="doc">llvm-cxxmap</span></a> tool can be used to generate the symbol
remapping file.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-instr">
<code class="sig-name descname"><span class="pre">-instr</span></code><code class="sig-prename descclassname"> <span class="pre">(default)</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-instr" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify that the input profile is an instrumentation-based profile.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-sample">
<code class="sig-name descname"><span class="pre">-sample</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-sample" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify that the input profile is a sample-based profile.</p>
<p>The format of the generated file can be generated in one of three ways:</p>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-binary">
<code class="sig-name descname"><span class="pre">-binary</span></code><code class="sig-prename descclassname"> <span class="pre">(default)</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-binary" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<p>Emit the profile using a binary encoding. For instrumentation-based profile
the output format is the indexed binary format.</p>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-extbinary">
<code class="sig-name descname"><span class="pre">-extbinary</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-extbinary" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<p>Emit the profile using an extensible binary encoding. This option can only
be used with sample-based profile. The extensible binary encoding can be
more compact with compression enabled and can be loaded faster than the
default binary encoding.</p>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-text">
<code class="sig-name descname"><span class="pre">-text</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-text" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<p>Emit the profile in text mode. This option can also be used with both
sample-based and instrumentation-based profile. When this option is used
the profile will be dumped in the text format that is parsable by the profile
reader.</p>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-gcc">
<code class="sig-name descname"><span class="pre">-gcc</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-gcc" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<p>Emit the profile using GCC’s gcov format (Not yet supported).</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-sparse">
<code class="sig-name descname"><span class="pre">-sparse</span></code><code class="sig-prename descclassname"><span class="pre">[=true|false]</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-sparse" title="Permalink to this definition">¶</a></dt>
<dd><p>Do not emit function records with 0 execution count. Can only be used in
conjunction with -instr. Defaults to false, since it can inhibit compiler
optimization during PGO.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-num-threads">
<span id="cmdoption-llvm-profdata-merge-j"></span><code class="sig-name descname"><span class="pre">-num-threads</span></code><code class="sig-prename descclassname"><span class="pre">=N</span></code><code class="sig-prename descclassname"><span class="pre">,</span> </code><code class="sig-name descname"><span class="pre">-j</span></code><code class="sig-prename descclassname"><span class="pre">=N</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-num-threads" title="Permalink to this definition">¶</a></dt>
<dd><p>Use N threads to perform profile merging. When N=0, llvm-profdata auto-detects
an appropriate number of threads to use. This is the default.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-failure-mode">
<code class="sig-name descname"><span class="pre">-failure-mode</span></code><code class="sig-prename descclassname"><span class="pre">=[any|all]</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-failure-mode" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the failure mode. There are two options: ‘any’ causes the merge command to
fail if any profiles are invalid, and ‘all’ causes the merge command to fail
only if all profiles are invalid. If ‘all’ is set, information from any
invalid profiles is excluded from the final merged product. The default
failure mode is ‘any’.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-prof-sym-list">
<code class="sig-name descname"><span class="pre">-prof-sym-list</span></code><code class="sig-prename descclassname"><span class="pre">=path</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-prof-sym-list" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify a file which contains a list of symbols to generate profile symbol
list in the profile. This option can only be used with sample-based profile
in extbinary format. The entries in this file are newline-separated.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-compress-all-sections">
<code class="sig-name descname"><span class="pre">-compress-all-sections</span></code><code class="sig-prename descclassname"><span class="pre">=[true|false]</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-compress-all-sections" title="Permalink to this definition">¶</a></dt>
<dd><p>Compress all sections when writing the profile. This option can only be used
with sample-based profile in extbinary format.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-use-md5">
<code class="sig-name descname"><span class="pre">-use-md5</span></code><code class="sig-prename descclassname"><span class="pre">=[true|false]</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-use-md5" title="Permalink to this definition">¶</a></dt>
<dd><p>Use MD5 to represent string in name table when writing the profile.
This option can only be used with sample-based profile in extbinary format.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-gen-partial-profile">
<code class="sig-name descname"><span class="pre">-gen-partial-profile</span></code><code class="sig-prename descclassname"><span class="pre">=[true|false]</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-gen-partial-profile" title="Permalink to this definition">¶</a></dt>
<dd><p>Mark the profile to be a partial profile which only provides partial profile
coverage for the optimized target. This option can only be used with
sample-based profile in extbinary format.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-supplement-instr-with-sample">
<code class="sig-name descname"><span class="pre">-supplement-instr-with-sample</span></code><code class="sig-prename descclassname"><span class="pre">=path_to_sample_profile</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-supplement-instr-with-sample" title="Permalink to this definition">¶</a></dt>
<dd><p>Supplement an instrumentation profile with sample profile. The sample profile
is the input of the flag. Output will be in instrumentation format (only works
with -instr).</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-zero-counter-threshold">
<code class="sig-name descname"><span class="pre">-zero-counter-threshold</span></code><code class="sig-prename descclassname"><span class="pre">=threshold_float_number</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-zero-counter-threshold" title="Permalink to this definition">¶</a></dt>
<dd><p>For the function which is cold in instr profile but hot in sample profile, if
the ratio of the number of zero counters divided by the the total number of
counters is above the threshold, the profile of the function will be regarded
as being harmful for performance and will be dropped.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-instr-prof-cold-threshold">
<code class="sig-name descname"><span class="pre">-instr-prof-cold-threshold</span></code><code class="sig-prename descclassname"><span class="pre">=threshold_int_number</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-instr-prof-cold-threshold" title="Permalink to this definition">¶</a></dt>
<dd><p>User specified cold threshold for instr profile which will override the cold
threshold got from profile summary.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-merge-suppl-min-size-threshold">
<code class="sig-name descname"><span class="pre">-suppl-min-size-threshold</span></code><code class="sig-prename descclassname"><span class="pre">=threshold_int_number</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-merge-suppl-min-size-threshold" title="Permalink to this definition">¶</a></dt>
<dd><p>If the size of a function is smaller than the threshold, assume it can be
inlined by PGO early inliner and it will not be adjusted based on sample
profile.</p>
</dd></dl>
</div>
<div class="section" id="examples">
<h3>EXAMPLES<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h3>
<div class="section" id="basic-usage">
<h4>Basic Usage<a class="headerlink" href="#basic-usage" title="Permalink to this headline">¶</a></h4>
<p>Merge three profiles:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">llvm</span><span class="o">-</span><span class="n">profdata</span> <span class="n">merge</span> <span class="n">foo</span><span class="o">.</span><span class="n">profdata</span> <span class="n">bar</span><span class="o">.</span><span class="n">profdata</span> <span class="n">baz</span><span class="o">.</span><span class="n">profdata</span> <span class="o">-</span><span class="n">output</span> <span class="n">merged</span><span class="o">.</span><span class="n">profdata</span>
</pre></div>
</div>
</div>
<div class="section" id="weighted-input">
<h4>Weighted Input<a class="headerlink" href="#weighted-input" title="Permalink to this headline">¶</a></h4>
<p>The input file <cite>foo.profdata</cite> is especially important, multiply its counts by 10:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">llvm</span><span class="o">-</span><span class="n">profdata</span> <span class="n">merge</span> <span class="o">-</span><span class="n">weighted</span><span class="o">-</span><span class="nb">input</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span><span class="n">foo</span><span class="o">.</span><span class="n">profdata</span> <span class="n">bar</span><span class="o">.</span><span class="n">profdata</span> <span class="n">baz</span><span class="o">.</span><span class="n">profdata</span> <span class="o">-</span><span class="n">output</span> <span class="n">merged</span><span class="o">.</span><span class="n">profdata</span>
</pre></div>
</div>
<p>Exactly equivalent to the previous invocation (explicit form; useful for programmatic invocation):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">llvm</span><span class="o">-</span><span class="n">profdata</span> <span class="n">merge</span> <span class="o">-</span><span class="n">weighted</span><span class="o">-</span><span class="nb">input</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span><span class="n">foo</span><span class="o">.</span><span class="n">profdata</span> <span class="o">-</span><span class="n">weighted</span><span class="o">-</span><span class="nb">input</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span><span class="n">bar</span><span class="o">.</span><span class="n">profdata</span> <span class="o">-</span><span class="n">weighted</span><span class="o">-</span><span class="nb">input</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span><span class="n">baz</span><span class="o">.</span><span class="n">profdata</span> <span class="o">-</span><span class="n">output</span> <span class="n">merged</span><span class="o">.</span><span class="n">profdata</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="show">
<span id="profdata-show"></span><h2>SHOW<a class="headerlink" href="#show" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id3">
<h3>SYNOPSIS<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
<p><strong class="program">llvm-profdata show</strong> [<em>options</em>] [<em>filename</em>]</p>
</div>
<div class="section" id="id4">
<h3>DESCRIPTION<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
<p><strong class="program">llvm-profdata show</strong> takes a profile data file and displays the
information about the profile counters for this file and
for any of the specified function(s).</p>
<p>If <em>filename</em> is omitted or is <code class="docutils literal notranslate"><span class="pre">-</span></code>, then <strong>llvm-profdata show</strong> reads its
input from standard input.</p>
</div>
<div class="section" id="id5">
<h3>OPTIONS<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-show-all-functions">
<code class="sig-name descname"><span class="pre">-all-functions</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-profdata-show-all-functions" title="Permalink to this definition">¶</a></dt>
<dd><p>Print details for every function.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-show-counts">
<code class="sig-name descname"><span class="pre">-counts</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-profdata-show-counts" title="Permalink to this definition">¶</a></dt>
<dd><p>Print the counter values for the displayed functions.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-show-function">
<code class="sig-name descname"><span class="pre">-function</span></code><code class="sig-prename descclassname"><span class="pre">=string</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-show-function" title="Permalink to this definition">¶</a></dt>
<dd><p>Print details for a function if the function’s name contains the given string.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-show-help">
<code class="sig-name descname"><span class="pre">-help</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-profdata-show-help" title="Permalink to this definition">¶</a></dt>
<dd><p>Print a summary of command line options.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-show-output">
<span id="cmdoption-llvm-profdata-show-o"></span><code class="sig-name descname"><span class="pre">-output</span></code><code class="sig-prename descclassname"><span class="pre">=output</span></code><code class="sig-prename descclassname"><span class="pre">,</span> </code><code class="sig-name descname"><span class="pre">-o</span></code><code class="sig-prename descclassname"><span class="pre">=output</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-show-output" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify the output file name. If <em>output</em> is <code class="docutils literal notranslate"><span class="pre">-</span></code> or it isn’t specified,
then the output is sent to standard output.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-show-instr">
<code class="sig-name descname"><span class="pre">-instr</span></code><code class="sig-prename descclassname"> <span class="pre">(default)</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-show-instr" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify that the input profile is an instrumentation-based profile.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-show-text">
<code class="sig-name descname"><span class="pre">-text</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-profdata-show-text" title="Permalink to this definition">¶</a></dt>
<dd><p>Instruct the profile dumper to show profile counts in the text format of the
instrumentation-based profile data representation. By default, the profile
information is dumped in a more human readable form (also in text) with
annotations.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-show-topn">
<code class="sig-name descname"><span class="pre">-topn</span></code><code class="sig-prename descclassname"><span class="pre">=n</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-show-topn" title="Permalink to this definition">¶</a></dt>
<dd><p>Instruct the profile dumper to show the top <code class="docutils literal notranslate"><span class="pre">n</span></code> functions with the
hottest basic blocks in the summary section. By default, the topn functions
are not dumped.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-show-sample">
<code class="sig-name descname"><span class="pre">-sample</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-profdata-show-sample" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify that the input profile is a sample-based profile.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-show-memop-sizes">
<code class="sig-name descname"><span class="pre">-memop-sizes</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-profdata-show-memop-sizes" title="Permalink to this definition">¶</a></dt>
<dd><p>Show the profiled sizes of the memory intrinsic calls for shown functions.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-show-value-cutoff">
<code class="sig-name descname"><span class="pre">-value-cutoff</span></code><code class="sig-prename descclassname"><span class="pre">=n</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-show-value-cutoff" title="Permalink to this definition">¶</a></dt>
<dd><p>Show only those functions whose max count values are greater or equal to <code class="docutils literal notranslate"><span class="pre">n</span></code>.
By default, the value-cutoff is set to 0.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-show-list-below-cutoff">
<code class="sig-name descname"><span class="pre">-list-below-cutoff</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-profdata-show-list-below-cutoff" title="Permalink to this definition">¶</a></dt>
<dd><p>Only output names of functions whose max count value are below the cutoff
value.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-show-showcs">
<code class="sig-name descname"><span class="pre">-showcs</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-profdata-show-showcs" title="Permalink to this definition">¶</a></dt>
<dd><p>Only show context sensitive profile counts. The default is to filter all
context sensitive profile counts.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-show-show-prof-sym-list">
<code class="sig-name descname"><span class="pre">-show-prof-sym-list</span></code><code class="sig-prename descclassname"><span class="pre">=[true|false]</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-show-show-prof-sym-list" title="Permalink to this definition">¶</a></dt>
<dd><p>Show profile symbol list if it exists in the profile. This option is only
meaningful for sample-based profile in extbinary format.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-show-show-sec-info-only">
<code class="sig-name descname"><span class="pre">-show-sec-info-only</span></code><code class="sig-prename descclassname"><span class="pre">=[true|false]</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-show-show-sec-info-only" title="Permalink to this definition">¶</a></dt>
<dd><p>Show basic information about each section in the profile. This option is
only meaningful for sample-based profile in extbinary format.</p>
</dd></dl>
</div>
</div>
<div class="section" id="overlap">
<span id="profdata-overlap"></span><h2>OVERLAP<a class="headerlink" href="#overlap" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id6">
<h3>SYNOPSIS<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3>
<p><strong class="program">llvm-profdata overlap</strong> [<em>options</em>] [<em>base profile file</em>] [<em>test profile file</em>]</p>
</div>
<div class="section" id="id7">
<h3>DESCRIPTION<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h3>
<p><strong class="program">llvm-profdata overlap</strong> takes two profile data files and displays the
<em>overlap</em> of counter distribution between the whole files and between any of the
specified functions.</p>
<p>In this command, <em>overlap</em> is defined as follows:
Suppose <em>base profile file</em> has the following counts:
{c1_1, c1_2, …, c1_n, c1_u_1, c2_u_2, …, c2_u_s},
and <em>test profile file</em> has
{c2_1, c2_2, …, c2_n, c2_v_1, c2_v_2, …, c2_v_t}.
Here c{1|2}_i (i = 1 .. n) are matched counters and c1_u_i (i = 1 .. s) and
c2_v_i (i = 1 .. v) are unmatched counters (or counters only existing in)
<em>base profile file</em> and <em>test profile file</em>, respectively.
Let sum_1 = c1_1 + c1_2 + … + c1_n + c1_u_1 + c2_u_2 + … + c2_u_s, and
sum_2 = c2_1 + c2_2 + … + c2_n + c2_v_1 + c2_v_2 + … + c2_v_t.
<em>overlap</em> = min(c1_1/sum_1, c2_1/sum_2) + min(c1_2/sum_1, c2_2/sum_2) + …
+ min(c1_n/sum_1, c2_n/sum_2).</p>
<p>The result overlap distribution is a percentage number, ranging from 0.0% to
100.0%, where 0.0% means there is no overlap and 100.0% means a perfect
overlap.</p>
<p>Here is an example, if <em>base profile file</em> has counts of {400, 600}, and
<em>test profile file</em> has matched counts of {60000, 40000}. The <em>overlap</em> is 80%.</p>
</div>
<div class="section" id="id8">
<h3>OPTIONS<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h3>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-overlap-function">
<code class="sig-name descname"><span class="pre">-function</span></code><code class="sig-prename descclassname"><span class="pre">=string</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-overlap-function" title="Permalink to this definition">¶</a></dt>
<dd><p>Print details for a function if the function’s name contains the given string.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-overlap-help">
<code class="sig-name descname"><span class="pre">-help</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-profdata-overlap-help" title="Permalink to this definition">¶</a></dt>
<dd><p>Print a summary of command line options.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-overlap-o">
<code class="sig-name descname"><span class="pre">-o</span></code><code class="sig-prename descclassname"><span class="pre">=output</span> <span class="pre">or</span> <span class="pre">-o</span> <span class="pre">output</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-overlap-o" title="Permalink to this definition">¶</a></dt>
<dd><p>Specify the output file name. If <em>output</em> is <code class="docutils literal notranslate"><span class="pre">-</span></code> or it isn’t specified,
then the output is sent to standard output.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-overlap-value-cutoff">
<code class="sig-name descname"><span class="pre">-value-cutoff</span></code><code class="sig-prename descclassname"><span class="pre">=n</span></code><a class="headerlink" href="#cmdoption-llvm-profdata-overlap-value-cutoff" title="Permalink to this definition">¶</a></dt>
<dd><p>Show only those functions whose max count values are greater or equal to <code class="docutils literal notranslate"><span class="pre">n</span></code>.
By default, the value-cutoff is set to max of unsigned long long.</p>
</dd></dl>
<dl class="std option">
<dt id="cmdoption-llvm-profdata-overlap-cs">
<code class="sig-name descname"><span class="pre">-cs</span></code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-llvm-profdata-overlap-cs" title="Permalink to this definition">¶</a></dt>
<dd><p>Only show overlap for the context sensitive profile counts. The default is to show
non-context sensitive profile counts.</p>
</dd></dl>
</div>
</div>
<div class="section" id="exit-status">
<h2>EXIT STATUS<a class="headerlink" href="#exit-status" title="Permalink to this headline">¶</a></h2>
<p><strong class="program">llvm-profdata</strong> returns 1 if the command is omitted or is invalid,
if it cannot read input files, or if there is a mismatch between their data.</p>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="llvm-readobj.html" title="llvm-readobj - LLVM Object Reader"
>next</a> |</li>
<li class="right" >
<a href="llvm-otool.html" title="llvm-otool - Mach-O dumping tool"
>previous</a> |</li>
<li><a href="https://llvm.org/">LLVM Home</a> | </li>
<li><a href="../index.html">Documentation</a>»</li>
<li class="nav-item nav-item-1"><a href="../Reference.html" >Reference</a> »</li>
<li class="nav-item nav-item-2"><a href="index.html" >LLVM Command Guide</a> »</li>
<li class="nav-item nav-item-this"><a href="">llvm-profdata - Profile data tool</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2003-2021, LLVM Project.
Last updated on 2021-09-18.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.5.4.
</div>
</body>
</html>
|