This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: finstrument-functions dual instrumentation problem
- From: "Dale Reese" <dreese at cmlab dot biz>
- To: <dreese at cmlab dot biz>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Thu, 19 Nov 2009 09:09:08 -0700
- Subject: RE: finstrument-functions dual instrumentation problem
- References: <003c01ca6881$0e5d0ed0$2b172c70$@biz>
-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Dale Reese
Sent: Wednesday, November 18, 2009 11:58 AM
To: gcc-help@gcc.gnu.org
Subject: finstrument-functions dual instrumentation problem
>>Hello,
>>Thank you in advance for your help. This is my first time using the
mailing
>>list. Please notify me if this is not the proper place for these types of
>>questions.
>>I am working with gcc and the ?finstrument-functions option. I have been
>>trying to instrument both kerbose ftp and putty sfpt. I have noticed an
>>unusual event. It seems that gcc is instrumenting the function entry and
>>exit twice. ?Has anyone experienced this? Any ideas on what might be
causing
>>this?
I found the problem. It seems that the CFLAG -O2 was causing the problem.
My theory is that loop unrolling was causing the compiler to
duplicate/unroll
the instrumentation routine in certain functions. My fix is to compile
without
the -O2 option.
I am a little skeptical about what actually was happening because I wouldn't
think that
The optimization would change the program in such a way as to alter its
operation.
This might be a bug with the way the optimizer handles code that utilizes
finstrument-functions
Dale Reese