[compiler-rt] r176236 - Holy macaroons, somebody made a copy of llvm/runtime/profile/GCDAProfiling.c,

Alexey Samsonov samsonov at google.com
Wed Feb 27 23:13:45 PST 2013


+Daniel, Bill


On Thu, Feb 28, 2013 at 11:00 AM, Nick Lewycky <nicholas at mxc.ca> wrote:

> Author: nicholas
> Date: Thu Feb 28 01:00:13 2013
> New Revision: 176236
>
> URL: http://llvm.org/viewvc/llvm-project?rev=176236&view=rev
> Log:
> Holy macaroons, somebody made a copy of
> llvm/runtime/profile/GCDAProfiling.c,
> didn't delete the original, and now they've diverged. I have no idea what's
> going on. Apply my patch in r176173 to this one too, this one looks newer?
>
> Modified:
>     compiler-rt/trunk/lib/profile/GCDAProfiling.c
>
> Modified: compiler-rt/trunk/lib/profile/GCDAProfiling.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/GCDAProfiling.c?rev=176236&r1=176235&r2=176236&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/profile/GCDAProfiling.c (original)
> +++ compiler-rt/trunk/lib/profile/GCDAProfiling.c Thu Feb 28 01:00:13 2013
> @@ -207,18 +207,23 @@ void llvm_gcda_increment_indirect_counte
>  }
>
>  void llvm_gcda_emit_function(uint32_t ident, const char *function_name) {
> +  uint32_t len = 3;
>  #ifdef DEBUG_GCDAPROFILING
> -  fprintf(stderr, "llvmgcda: function id=0x%08x\n", ident);
> +  fprintf(stderr, "llvmgcda: function id=0x%08x name=%s\n", ident,
> +          function_name ? function_name : "NULL");
>  #endif
>    if (!output_file) return;
>
> -  /* function tag */
> +  /* function tag */
>    fwrite("\0\0\0\1", 4, 1, output_file);
> -  write_int32(3 + 1 + length_of_string(function_name));
> +  if (function_name)
> +    len += 1 + length_of_string(function_name);
> +  write_int32(len);
>    write_int32(ident);
>    write_int32(0);
>    write_int32(0);
> -  write_string(function_name);
> +  if (function_name)
> +    write_string(function_name);
>  }
>
>  void llvm_gcda_emit_arcs(uint32_t num_counters, uint64_t *counters) {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



-- 
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130228/6af8835a/attachment.html>


More information about the llvm-commits mailing list