summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/profile/InstrProfiling.c
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/profile/InstrProfiling.c')
-rw-r--r--compiler-rt/lib/profile/InstrProfiling.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler-rt/lib/profile/InstrProfiling.c b/compiler-rt/lib/profile/InstrProfiling.c
index c897052d8c4..936b8def38c 100644
--- a/compiler-rt/lib/profile/InstrProfiling.c
+++ b/compiler-rt/lib/profile/InstrProfiling.c
@@ -8,6 +8,7 @@
\*===----------------------------------------------------------------------===*/
#include "InstrProfiling.h"
+#include <string.h>
/* TODO: void __llvm_pgo_get_size_for_buffer(void); */
@@ -34,3 +35,10 @@ void __llvm_pgo_write_buffer(FILE *OutputFile) {
I != E; ++I)
writeFunction(OutputFile, I);
}
+
+void __llvm_pgo_reset_counters(void) {
+ uint64_t *I = __llvm_pgo_counters_begin();
+ uint64_t *E = __llvm_pgo_counters_end();
+
+ memset(I, 0, sizeof(uint64_t)*(E - I));
+}
OpenPOWER on IntegriCloud