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:


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?

cfe-commits mailing list

Reply via email to