<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Inconsistent function identifiers in GCOV notes / data"
href="http://llvm.org/bugs/show_bug.cgi?id=20306">20306</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Inconsistent function identifiers in GCOV notes / data
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jonas.wagner@epfl.ch
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=12765" name="attach_12765" title="Patch: Use correct function identity in GCOV writeout.">attachment 12765</a> <a href="attachment.cgi?id=12765&action=edit" title="Patch: Use correct function identity in GCOV writeout.">[details]</a></span>
Patch: Use correct function identity in GCOV writeout.
The code in lib/Transforms/Instrumentation/GCOVProfiling.cpp creates both GCOV
note (.gcno) and GCOV data (.gcda) files. The content of these must be in sync
for the files to be parsed correctly.
Currently, there is a problem when generating function identifiers. These are
increasing numbers. While generating .gcno, numbers can be skipped if functions
are excluded from profiling. On the other hand, the .gcda code assumes that the
numbers are consecutive.
Attached is one patch that fixes the issue for the case where .gcno and .gcda
are generated simultaneously. I'm unsure if this is the best solution;
alternatively, we could just force function identifiers to be consecutive. On
the other hand, it seems as if it is assumed that .gcno and .gcda files are
always generated together (e.g., lib/IR/GCOV.cpp aborts if checksums don't
match, and they won't unless .gcno and .gcda are generated together), so maybe
this should be the only supported case?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>