This is the mail archive of the gcc-patches@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]

Re: RFA: Inserting NOPs for profiling.


>  If profiling is enabled (with -pg) then GCC will emit a NOP at the
>  start of the file, between the .gcc2_compiled symbol and the start
>  of the first function.  This ensures that the address of the first
>  function is not the same as the address of the .gcc2_compiled
>  symbol, and so ensures that the profiler's output does not refer to
>  the first function as if it were the .gcc2_compiled symbol.
>
>  Unfortunately the code that is currently in GCC to generate this NOP
>  does not work if the NOP pattern is a define_expand or if it is a
>  define_insn which has a C body to compute the emitted assembler
>  string.  In both cases the code will abort inside
>  get_insn_template.  One particular case where this happens is the
>  ARM port where the NOP pattern is complicated by the fact that there
>  are two NOP instructions, one for ARM mode and one for Thumb mode.

Hi Nick,

Was there ever a resolution to this issue?  Profiling still seems to be busted 
at least on the 3.0 branch. 

p.



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