chh added a comment. If we use the unit test case, call `__gcov_flush` from the main function, and dump static variables in GCDAProfiling.c, we can see that `__gcov_flush` is resolved to the same copy for func.shared, func2.shared, and main. However, when `__gcov_flush` is called from main and from f1_flush and f2_flush, they use different copies of static variables defined in GCDAProfiling.c. The "flush_fn_head" and its flush functions are different, so 3 calls of `__gcov_flush` will flush to 3 different output files:
instrprof-dlopen-func.gcda instrprof-dlopen-func2.gcda instrprof-dlopen-dlclose-main.gcda This keeps current Android use cases working as before `__gcov_flush` is hidden. Is there other use case that could be broken by this change? https://reviews.llvm.org/D45454 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits