This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
reading profile information
- From: "Aleksandar Dragojevic" <aleksandar_dragojevic at yahoo dot co dot uk>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Mon, 31 Jan 2005 11:19:45 +0100
- Subject: reading profile information
Hello
I am trying to make execution record / replay debugger for custom threading
library. Debugger is an extension to gdb. Everything is running on i386 /
Linux platform. Newer versions of gcc are used (3.2+).
What I need is to save execution state whenever signal occurs, so I can know
when to deliver signals in replay runs. In older versions of gcc there
was -a command line option which would be suitable for my needs. In new
versions this option was replaced with -fprofile-arcs. I could achieve what
I need if I could read profile information (arc counts) from executing
program. It would be enough to read only counts in deterministic order (I
don't need any other basic block information or anything else). I hope this
make sense.
What I saw from disassembly of a program compiled with -fprofile-arcs is
that some 64 bits ints are incremented on calls, jumps etc (these are the
counters I need). Debugger is reporting that they are relative to variable
completed.1. Also I saw new (compared to disassembly of same program
compiled without -fprofile-arcs) variable bb_head which points to a location
reported to be relative to variable p.0.
Any help is appreciated.
Aleksandar