summaryrefslogtreecommitdiff
path: root/contrib/compiler-rt/lib/profile/InstrProfiling.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-09-10 20:35:47 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-09-10 20:35:47 +0000
commit852790874793186f2dfe59fd7c7a082c6920ed9c (patch)
treef8f8e6ce180ca5204b650ff6315e6e0893f9a679 /contrib/compiler-rt/lib/profile/InstrProfiling.h
parentcfab224f313612ff1961bdd7b9749e29d0e4e6af (diff)
parentf31bcc68c72371a2bf63aead9f3373a1ff2053b6 (diff)
downloadsrc-test2-852790874793186f2dfe59fd7c7a082c6920ed9c.tar.gz
src-test2-852790874793186f2dfe59fd7c7a082c6920ed9c.zip
Notes
Diffstat (limited to 'contrib/compiler-rt/lib/profile/InstrProfiling.h')
-rw-r--r--contrib/compiler-rt/lib/profile/InstrProfiling.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/contrib/compiler-rt/lib/profile/InstrProfiling.h b/contrib/compiler-rt/lib/profile/InstrProfiling.h
index 2b1bd003668e..3778a88893e6 100644
--- a/contrib/compiler-rt/lib/profile/InstrProfiling.h
+++ b/contrib/compiler-rt/lib/profile/InstrProfiling.h
@@ -62,7 +62,9 @@ uint64_t *__llvm_profile_end_counters(void);
*
* Writes to the file with the last name given to \a __llvm_profile_set_filename(),
* or if it hasn't been called, the \c LLVM_PROFILE_FILE environment variable,
- * or if that's not set, \c "default.profdata".
+ * or if that's not set, the last name given to
+ * \a __llvm_profile_override_default_filename(), or if that's not set,
+ * \c "default.profraw".
*/
int __llvm_profile_write_file(void);
@@ -77,6 +79,19 @@ int __llvm_profile_write_file(void);
*/
void __llvm_profile_set_filename(const char *Name);
+/*!
+ * \brief Set the filename for writing instrumentation data, unless the
+ * \c LLVM_PROFILE_FILE environment variable was set.
+ *
+ * Unless overridden, sets the filename to be used for subsequent calls to
+ * \a __llvm_profile_write_file().
+ *
+ * \c Name is not copied, so it must remain valid. Passing NULL resets the
+ * filename logic to the default behaviour (unless the \c LLVM_PROFILE_FILE
+ * was set in which case it has no effect).
+ */
+void __llvm_profile_override_default_filename(const char *Name);
+
/*! \brief Register to write instrumentation data to file at exit. */
int __llvm_profile_register_write_file_atexit(void);