[compiler-rt] r204185 - profile: Include the function hash in PGO profiles
Justin Bogner
mail at justinbogner.com
Tue Mar 18 14:57:58 PDT 2014
Author: bogner
Date: Tue Mar 18 16:57:58 2014
New Revision: 204185
URL: http://llvm.org/viewvc/llvm-project?rev=204185&view=rev
Log:
profile: Include the function hash in PGO profiles
Modified:
compiler-rt/trunk/lib/profile/PGOProfiling.c
Modified: compiler-rt/trunk/lib/profile/PGOProfiling.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/PGOProfiling.c?rev=204185&r1=204184&r2=204185&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/PGOProfiling.c (original)
+++ compiler-rt/trunk/lib/profile/PGOProfiling.c Tue Mar 18 16:57:58 2014
@@ -35,6 +35,7 @@ typedef unsigned long long uint64_t;
typedef struct __llvm_pgo_data {
const uint32_t NameSize;
const uint32_t NumCounters;
+ const uint64_t FuncHash;
const char *const Name;
const uint64_t *const Counters;
} __llvm_pgo_data;
@@ -82,7 +83,7 @@ static void writeFunction(FILE *OutputFi
uint32_t I;
for (I = 0; I < Data->NameSize; ++I)
fputc(Data->Name[I], OutputFile);
- fprintf(OutputFile, " %u\n", Data->NumCounters);
+ fprintf(OutputFile, "\n%" PRIu64 "\n%u\n", Data->FuncHash, Data->NumCounters);
for (I = 0; I < Data->NumCounters; ++I)
fprintf(OutputFile, "%" PRIu64 "\n", Data->Counters[I]);
fprintf(OutputFile, "\n");
More information about the llvm-commits
mailing list