This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: finstrument-functions dual instrumentation problem



-----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





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]