Instrumenting code for profiling.

par_ianth@yahoo.com (PK)
14 Nov 2004 22:45:01 -0500

          From comp.compilers

Related articles
Instrumenting code for profiling. par_ianth@yahoo.com (2004-11-14)
Re: Instrumenting code for profiling. gah@ugcs.caltech.edu (glen herrmannsfeldt) (2004-11-17)
Re: Instrumenting code for profiling. s.bosscher@student.tudelft.nl (2004-11-17)
Re: Instrumenting code for profiling. nmm1@cus.cam.ac.uk (2004-11-19)
Re: Instrumenting code for profiling. diablovision@yahoo.com (2004-11-20)
Re: Instrumenting code for profiling. idbaxter@semdesigns.com (Ira Baxter) (2004-11-20)
Re: Instrumenting code for profiling. tmk@netvision.net.il (2004-11-20)
[1 later articles]
| List of all articles for this month |

From: par_ianth@yahoo.com (PK)
Newsgroups: comp.compilers
Date: 14 Nov 2004 22:45:01 -0500
Organization: http://groups.google.com
Keywords: debug, question
Posted-Date: 14 Nov 2004 22:45:01 EST

Greetings!


    I had a question regarding how compilers do instrumentation to
collect profile information. Specifically, how do compilers handle the
part of mapping the collected profile back to the original program
(which is without the instrumentation).


Say a program X is instrumented with profiling calls for gathering
branch execution frequency. If I use the virtual address of the branch
instruction as the index or key against which I collect the frequency
of that branch, then I have a problem since the virtual address would
be completely different in the instrumented version and in the
non-instrumented version. So how do I maintain this mapping between
the profile data that I collect and the actual instruction in the
program? I think I need some sort of 'unique' id for each branch in
the original program. Could someone give me some pointers about how
this is done in the commercial compilers?


Warm regards,
Parianth


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.