From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <0cb759c1e71dffcf7d9ebbb108d5c0cc.axp-list@archive.invalid> X-Archive-Original-Message-ID: <9709291751.AA16877@moene.indiv.nluug.nl> Date: Mon, 29 Sep 97 19:51:44 +0200 From: Toon Moene Subject: Re: Profiling still broken? Harvey, > Is profiling working now? I saw various discussions in > the axp-list archive about broken profiling, but they > seemed to be fairly old and have been resolved. None > the less, I'm still having trouble using profiling. > > Basically, if I compile with -pg then the program > segfaults in __i333_set_fp_control. If I compile with > -p then the program runs but gprof can't process the > profiling file, and I don't seem to have a prof program. > This is with gcc-2.7.2.1-2b, which is rpm 2.7.2.1-2 + > Richard Henderson's recently distributed patch, > glibc-0.961212-5, and kernel-source-2.0.30-3. I.e. - a > fairly straight forward RedHat 4.2 + the recent gcc patch. Well, I don't know for sure, because I don't know what's in "the recent gcc patch", but there is (still) a problem in gcc with respect to profiling. The symptom is that C code with nested functions (of which glibc seems to use a lot) has a fairly good chance of dying with a segmentation violation. For instance, g77-0.5.21 has a change in the code of profile_function in final.c that fixes this in gcc-2.7.2.3, so apparently all publicly available gcc's have this bug. The problem is that the static chain pointer has to be saved around the calls of mcount that profiling inserts. HTH, Toon. -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com