<div dir="ltr">+Daniel, Bill<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 28, 2013 at 11:00 AM, Nick Lewycky <span dir="ltr"><<a href="mailto:nicholas@mxc.ca" target="_blank">nicholas@mxc.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: nicholas<br>
Date: Thu Feb 28 01:00:13 2013<br>
New Revision: 176236<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=176236&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=176236&view=rev</a><br>
Log:<br>
Holy macaroons, somebody made a copy of llvm/runtime/profile/GCDAProfiling.c,<br>
didn't delete the original, and now they've diverged. I have no idea what's<br>
going on. Apply my patch in r176173 to this one too, this one looks newer?<br>
<br>
Modified:<br>
compiler-rt/trunk/lib/profile/GCDAProfiling.c<br>
<br>
Modified: compiler-rt/trunk/lib/profile/GCDAProfiling.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/GCDAProfiling.c?rev=176236&r1=176235&r2=176236&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/GCDAProfiling.c?rev=176236&r1=176235&r2=176236&view=diff</a><br>
==============================================================================<br>
--- compiler-rt/trunk/lib/profile/GCDAProfiling.c (original)<br>
+++ compiler-rt/trunk/lib/profile/GCDAProfiling.c Thu Feb 28 01:00:13 2013<br>
@@ -207,18 +207,23 @@ void llvm_gcda_increment_indirect_counte<br>
}<br>
<br>
void llvm_gcda_emit_function(uint32_t ident, const char *function_name) {<br>
+ uint32_t len = 3;<br>
#ifdef DEBUG_GCDAPROFILING<br>
- fprintf(stderr, "llvmgcda: function id=0x%08x\n", ident);<br>
+ fprintf(stderr, "llvmgcda: function id=0x%08x name=%s\n", ident,<br>
+ function_name ? function_name : "NULL");<br>
#endif<br>
if (!output_file) return;<br>
<br>
- /* function tag */<br>
+ /* function tag */<br>
fwrite("\0\0\0\1", 4, 1, output_file);<br>
- write_int32(3 + 1 + length_of_string(function_name));<br>
+ if (function_name)<br>
+ len += 1 + length_of_string(function_name);<br>
+ write_int32(len);<br>
write_int32(ident);<br>
write_int32(0);<br>
write_int32(0);<br>
- write_string(function_name);<br>
+ if (function_name)<br>
+ write_string(function_name);<br>
}<br>
<br>
void llvm_gcda_emit_arcs(uint32_t num_counters, uint64_t *counters) {<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div>
</div>