Help on Gcov
Ian Lance Taylor
iant@google.com
Wed Apr 6 20:10:00 GMT 2011
Harry Trinta <harrytpc@gmail.com> writes:
> - The instrumentator uses any technique to reduce the amount of
> instrumentation points, for example, dominance?
Yes.
> - I know that the instrumentation is done at compile time. However, it
> is done in C code or in compiled code ?
I'm not sure I understand this question. The compiler generates the
instrumentation code. It doesn't generate C code. It just adds
additional function calls as it compiles. So perhaps the answer is that
the instrumentation is done in compiled code.
> - What commands runs when the probes are executed? The probes calls
> some function in lib? What?
There are several different functions. They all have names start with
"__gcov_".
> Now I'd want to know more about the sources that I have identified as
> part of gcov:
>
> - coverage.c: I do not know.
Generates the .gcno file. If you don't know what that means, see
http://gcc.gnu.org/onlinedocs/gcc/Gcov-Data-Files.html .
> - gcov: It is responsible for generating the file. gcov?
Part of the gcov program which turns the .gcda files into a readable
form.
> - profile:
Branch probability coverage support.
> - gcov-io: Responsible for reading and writing files. gcda and. gcno?
Yes. Used by both gcov and the runtime library.
> - libgcov: library that supports the execution of the instrumented program?
Yes.
> - tree-profile.c: insert the probes in code?
Yes.
> Which of these files are used during compile? And which of these files
> are used during program execution?
All of the above are used at compile time except libgcov. gcov-io is
used at both compile time and runtime.
Ian
More information about the Gcc-help
mailing list