This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
profiling
- From: "Zdenka Safarzik" <zsafarzi at iskon dot hr>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 14 Jun 2002 11:49:31 MET
- Subject: profiling
- Reply-to: zsafarzi at iskon dot hr
Hello,
I want to made hardware profiling. For that purposes I need to have
instrumented source code that has to be profiled. At every beginning and end
of function and program loops writing to one register must be inserted. Each
faction write different value in that register. My hardware detects access
to that register, which function had access and time when that access was
happen.
For source code instrumentation I want to use gcc. As gcc is very complex
software, I hope that you can help me.
I read gecko documentation, and it seems to me that -pg or -test-coverage
options can be used for this purpose. Can you please tell me what exactly
these options do? Do they insert some code before compiling or before
linking? Where is it in gcc source code? Can I easy change that code with
writing to some register? Is it possible to set profiling hierarchy level
(for example: to add extra code only on "main" function instead of whole
source)?
Thank you for your time
Regards
Zdenka Safarzik