[compiler-rt] r272375 - [profile] add profile path tests for shared lib

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 10 09:06:34 PDT 2016


will take a look.

On Fri, Jun 10, 2016 at 8:43 AM, Adrian Prantl <aprantl at apple.com> wrote:

> Hello David,
>
> this testcase is failing on the green dragon bots:
>
>
> http://lab.llvm.org:8080/green//job/clang-stage1-cmake-RA-globalisel_check/2266/consoleFull#16395563108254eaf0-7326-4999-85b0-388101f2d404
>
> >
> /Users/buildslave/jenkins/sharedspace/clang-stage1-cmake-RA_workspace/llvm/projects/compiler-rt/test/profile/instrprof-set-filename.c:63:12:
> error: expected string not found in input
> >
> > // SHARED: Total functions: 2
> >            ^
> > <stdin>:1:1: note: scanning from here
> > Total functions: 1
> > ^
>
> could you please take a look?
>
> thanks,
> adrian
>
>
> > On Jun 9, 2016, at 11:14 PM, Xinliang David Li via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
> >
> > Author: davidxl
> > Date: Fri Jun 10 01:14:17 2016
> > New Revision: 272375
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=272375&view=rev
> > Log:
> > [profile] add profile path tests for shared lib
> >
> > Test that __llvm_profile_set_filename invoked in
> > main program is 'visible' to shared lib (overriding
> > shared libary's profile path set on command line)
> >
> > Modified:
> >    compiler-rt/trunk/test/profile/instrprof-set-filename.c
> >
> > Modified: compiler-rt/trunk/test/profile/instrprof-set-filename.c
> > URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/instrprof-set-filename.c?rev=272375&r1=272374&r2=272375&view=diff
> >
> ==============================================================================
> > --- compiler-rt/trunk/test/profile/instrprof-set-filename.c (original)
> > +++ compiler-rt/trunk/test/profile/instrprof-set-filename.c Fri Jun 10
> 01:14:17 2016
> > @@ -35,7 +35,16 @@
> > // RUN: %clang_profuse=%t.env.profdata -o - -S -emit-llvm %s | FileCheck
> %s
> > // RUN: rm %t.env.profraw
> > // RUN: rm %t.env.profdata
> > +// 6. Test that __llvm_profile_set_filename is honored by shared libary
> too.
> > +// RUN: mkdir -p %t.d
> > +// RUN: %clang -fprofile-instr-generate=%t.shared.profraw -fPIC -shared
> -o %t.d/t.shared %S/Inputs/instrprof-dlopen-func.c
> > +// RUN: %clang_profgen -DCALL_SHARED -o %t.m -O3 -rpath %t.d
> %t.d/t.shared %s
> > +// RUN: %run %t.m %t.main.profraw
> > +// RUN: llvm-profdata show %t.main.profraw | FileCheck
> --check-prefix=SHARED %s
> >
> > +#ifdef CALL_SHARED
> > +extern void func(int);
> > +#endif
> > void __llvm_profile_set_filename(const char *);
> > int main(int argc, const char *argv[]) {
> >   // CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof
> ![[PD1:[0-9]+]]
> > @@ -44,6 +53,11 @@ int main(int argc, const char *argv[]) {
> > #ifndef NO_API
> >   __llvm_profile_set_filename(argv[1]);
> > #endif
> > +
> > +#ifdef CALL_SHARED
> > +  func(1);
> > +#endif
> >   return 0;
> > }
> > // CHECK: ![[PD1]] = !{!"branch_weights", i32 1, i32 2}
> > +// SHARED: Total functions: 2
> >
> >
> > _______________________________________________
> > 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/20160610/50c0f98e/attachment.html>


More information about the llvm-commits mailing list