[compiler-rt] r282294 - [profile] Hide lprofCurFilename

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 23 14:50:07 PDT 2016


Hi David,

This commit breaks test/profile/Linux/instrprof-set-filename-shared.test:

    http://lab.llvm.org:8011/builders/clang-cmake-aarch64-42vma/builds/12180

It looks like the test checks that __llvm_profile_set_filename() alters the raw
profile filename in both the dylib and the main program. Now that
lprofCurFilename is hidden, this can't work, and we get two profiles (one for
the call to "main" and one for "func").

Is anyone relying on this behavior? I don't think we can replicate this on
Darwin, and would prefer to turn it off to keep things consistent between OS's.
If users are already relying on this behavior on Linux then I'll just back this
change out.

thanks,
vedant

> On Sep 23, 2016, at 1:53 PM, Vedant Kumar via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> Author: vedantk
> Date: Fri Sep 23 15:53:42 2016
> New Revision: 282294
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=282294&view=rev
> Log:
> [profile] Hide lprofCurFilename
> 
> Differential Revision: https://reviews.llvm.org/D24885
> 
> Modified:
>    compiler-rt/trunk/lib/profile/InstrProfilingFile.c
> 
> Modified: compiler-rt/trunk/lib/profile/InstrProfilingFile.c
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingFile.c?rev=282294&r1=282293&r2=282294&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/profile/InstrProfilingFile.c (original)
> +++ compiler-rt/trunk/lib/profile/InstrProfilingFile.c Fri Sep 23 15:53:42 2016
> @@ -82,7 +82,8 @@ typedef struct lprofFilename {
>   ProfileNameSpecifier PNS;
> } lprofFilename;
> 
> -lprofFilename lprofCurFilename = {0, 0, 0, {0}, {0}, 0, 0, 0, PNS_unknown};
> +static lprofFilename lprofCurFilename = {0, 0, 0, {0}, {0},
> +                                         0, 0, 0, PNS_unknown};
> 
> int getpid(void);
> static int getCurFilenameLength();
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list