This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT336019: [profile] Add llvm_gcov_flush to be called outside
a shared library (authored by chh, committed by ).
Herald added a subscriber: Sanitizers.
Repository:
rCRT Compiler Runtime
https://reviews.
davidxl accepted this revision.
davidxl added a comment.
This revision is now accepted and ready to land.
lgtm
https://reviews.llvm.org/D45454
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe
chh updated this revision to Diff 153576.
chh marked an inline comment as done.
https://reviews.llvm.org/D45454
Files:
lib/profile/GCDAProfiling.c
test/profile/Inputs/instrprof-dlopen-dlclose-main.c
Index: test/profile/Inputs/instrprof-dlopen-dlclose-main.c
=
srhines added a comment.
LGTM. Thanks for making the checking more clear. This should help bridge the
gap for now, so that we can resume getting per-library profile data in Android.
https://reviews.llvm.org/D45454
___
cfe-commits mailing list
cfe-c
chh added inline comments.
Comment at: test/profile/Inputs/instrprof-dlopen-dlclose-main.c:20
+ void (*gcov_flush)() = (void (*)())dlsym(f1_handle, "__gcov_flush");
+ if (gcov_flush != NULL) {
+fprintf(stderr, "__gcov_flush should not be visible in func.shared'\n");
---
chh updated this revision to Diff 153573.
chh added a comment.
check dlerror() where it shouldn't be NULL
https://reviews.llvm.org/D45454
Files:
lib/profile/GCDAProfiling.c
test/profile/Inputs/instrprof-dlopen-dlclose-main.c
Index: test/profile/Inputs/instrprof-dlopen-dlclose-main.c
=
davidxl added inline comments.
Comment at: lib/profile/GCDAProfiling.c:546
+// find and call. In that case, it dumps profile data of a .so file.
+// If it is called directly inside a .so file, the unified copy of
+// llvm_gcov_flush might dump data of other .so file or the main m
chh updated this revision to Diff 153569.
chh marked an inline comment as done.
chh added a comment.
Added calls to dlerror() before other dl* functions.
https://reviews.llvm.org/D45454
Files:
lib/profile/GCDAProfiling.c
test/profile/Inputs/instrprof-dlopen-dlclose-main.c
Index: test/prof
marco-c added a comment.
OK! Sounds good to me to keep it hidden until
https://reviews.llvm.org/D48538 is done (I'm going to try to finish it
soon).
Il 29/06/2018 19:34, David Li via Phabricator ha scritto:
> davidxl added a comment.
>
> With the current gcov_flush implementation in LLVM, makin
OK! Sounds good to me to keep it hidden until
https://reviews.llvm.org/D48538 is done (I'm going to try to finish it
soon).
Il 29/06/2018 19:34, David Li via Phabricator ha scritto:
> davidxl added a comment.
>
> With the current gcov_flush implementation in LLVM, making gcov_flush's
> visibilit
chh added a comment.
Marco, latest patch does not change __gcov_flush, which is also hidden in
libgcov.
Android coverage test programs have depended on an earlier compiler-rt that did
not hide __gcov_flush.
If that's the only use case broken by recent change of compiler-rt, which hide
__gcov_fl
davidxl added a comment.
With the current gcov_flush implementation in LLVM, making gcov_flush's
visibility to be default will simply lead to wrong behavior. GCC libgcov's
implementation is more elaborate -- it allows gcov_flush to dump gcda data for
all dynamic objects while making sure gcov
marco-c added a comment.
Why keeping a __gcov_flush which is incompatible with GCC and previous versions
of LLVM and adding a __llvm_gcov_flush which is compatible? I feel the other
way around (or even just having an unhidden "__gcov_flush" and not introducing
"__llvm_gcov_flush") would be mor
srhines added a comment.
Thanks for picking this up again and updating the change to add
llvm_gcov_flush().
Comment at: test/profile/Inputs/instrprof-dlopen-dlclose-main.c:20
+ void (*gcov_flush)() = (void (*)())dlsym(f1_handle, "__gcov_flush");
+ if (gcov_flush != NULL) {
+
chh updated this revision to Diff 153532.
chh retitled this revision from "Make __gcov_flush visible outside a shared
library" to "Add llvm_gcov_flush to be called outside a shared library".
chh edited the summary of this revision.
chh added a comment.
Now keep __gcov_flush hidden as libgcov; add
15 matches
Mail list logo