[compiler-rt] r269964 - [profile] add runtime variable documentation

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Wed May 18 17:20:30 PDT 2016


This is awesome, thanks!

-- Sean Silva

On Wed, May 18, 2016 at 10:44 AM, Xinliang David Li via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: davidxl
> Date: Wed May 18 12:44:57 2016
> New Revision: 269964
>
> URL: http://llvm.org/viewvc/llvm-project?rev=269964&view=rev
> Log:
> [profile] add runtime variable documentation
>
> Modified:
>     compiler-rt/trunk/lib/profile/InstrProfiling.h
>
> Modified: compiler-rt/trunk/lib/profile/InstrProfiling.h
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfiling.h?rev=269964&r1=269963&r2=269964&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/profile/InstrProfiling.h (original)
> +++ compiler-rt/trunk/lib/profile/InstrProfiling.h Wed May 18 12:44:57 2016
> @@ -154,4 +154,33 @@ uint64_t __llvm_profile_get_version(void
>  uint64_t __llvm_profile_get_data_size(const __llvm_profile_data *Begin,
>                                        const __llvm_profile_data *End);
>
> +/*!
> + * This variable is defined in InstrProfilingRuntime.c as a hidden
> + * symbol. Its main purpose is to enable profile runtime user to
> + * bypass runtime initialization code -- if the client code explicitly
> + * define this variable, then InstProfileRuntime.o won't be linked in.
> + * Note that this variable's visibility needs to be hidden so that the
> + * definition of this variable in an instrumented shared library won't
> + * affect runtime initialization decision of the main program.
> + */
> +COMPILER_RT_VISIBILITY extern int __llvm_profile_runtime;
> +/*!
> + * This variable is defined in InstrProfilingFile.c. Its visibility is
> + * not hidden so that instrumented shared libraries and the main program
> + * can share the raw data file with the same name.
> + */
> +extern int __llvm_profile_OwnsFilename;
> +extern const char *__llvm_profile_CurrentFilename;
> +/*!
> + * This variable is defined in InstrProfiling.c. Its main purpose is to
> + * encode the raw profile version value and other format related
> information
> + * such as whether the profile is from IR based instrumentation. The
> variable
> + * is defined as weak so that compiler can emit an overriding definition
> + * depending on user option.  Since we don't support mixing FE and IR
> based
> + * data in the same raw profile data file (in other words, shared libs and
> + * main program are expected to be instrumented in the same way), there is
> + * no need for this variale to be hidden.
> + */
> +extern uint64_t __llvm_profile_raw_version;
> +
>  #endif /* PROFILE_INSTRPROFILING_H_ */
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160518/5f041b5c/attachment.html>


More information about the llvm-commits mailing list