diff options
Diffstat (limited to 'lib/profile')
-rw-r--r-- | lib/profile/InstrProfilingExtras.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/profile/InstrProfilingExtras.h b/lib/profile/InstrProfilingExtras.h new file mode 100644 index 000000000..1db612a7c --- /dev/null +++ b/lib/profile/InstrProfilingExtras.h @@ -0,0 +1,28 @@ +/*===- InstrProfilingExtras.h - Support library for PGO instrumentation ---===*\ +|* +|* The LLVM Compiler Infrastructure +|* +|* This file is distributed under the University of Illinois Open Source +|* License. See LICENSE.TXT for details. +|* +\*===----------------------------------------------------------------------===*/ + +/*! + * \brief Write instrumentation data to the current file. + * + * Writes to the file with the last name given to \a __llvm_pgo_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". + */ +void __llvm_pgo_write_file(); + +/*! + * \brief Set the filename for writing instrumentation data. + * + * Sets the filename to be used for subsequent calls to + * \a __llvm_pgo_write_file(). + */ +void __llvm_pgo_set_filename(const char *Name); + +/*! \brief Register to write instrumentation data to file at exit. */ +void __llvm_pgo_register_write_file_atexit(); |