Gcov Internals

Sebastian Roland seroland86@gmail.com
Fri Mar 22 11:58:00 GMT 2019


Hi,

I am currently trying to understand the internals of Gcov. Specifically 
I am wondering of the following:

1) Certain Basic Blocks are instrumented with counters that are 
incremented during execution. During compilation a destructor is 
registered that actually goes through a gcov_info struct and finds all 
counters in the appropriate gcov_fn_info struct(s). My question is how 
(and where in the source code) do the references to the various counters 
are linked to the gcov_info struct?

2) What exactly is the purpose of the constructor (__gcov_init()) and 
where are the values of the passed gcov_info struct set (probably 
related to 1)?

--Sebastian


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3992 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20190322/1d321d5f/attachment.p7s>


More information about the Gcc mailing list