Date: Fri, 11 Oct 2002 18:49:51 -0400 Message-Id: <200210112249.g9BMnpa10748@envy.delorie.com> X-Authentication-Warning: envy.delorie.com: dj set sender to dj AT delorie DOT com using -f From: DJ Delorie To: djgpp AT delorie DOT com In-reply-to: <2.7.9.191MP.H3U9EW@pauzner.dnttm.ru> (uue@pauzner.dnttm.ru) Subject: Re: profiling with DJGPP References: <2 DOT 7 DOT 9 DOT 191MP DOT H3U9EW AT pauzner DOT dnttm DOT ru> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > 1) getenv implemented ineffectively - no hashing > 2) getenv heavily used by timer functions for timezone info > (TZ, TZDIR, etc. - seems things are stored in static > variables but probably not in all places?) > 3) days_to_years intended for date calculation... > but profiling needs only relative time. Patches welcome, if you want to try fixing these. http://www.delorie.com/djgpp/cvs.html > 4) I was unable to link my program with profiled libc version > to figure out the real number of calls of these strange functions: > linking with -lc_p (or just renaming my prepared libc_p.a to regular libc.a) > doesn't work: I got a coredump with error somewhere from mcount.c Right. If you try to profile the profiling function (mcount()), it recurses and crashes. It's fixed in cvs - you just need to compile src/libc/crt0/mcount.c without profiling. You should be able to do this manually and insert it into your libc_p.a. > Also I have some difficulties building profiled libc outside the > DJGPP tree (had no intention to destroy my normal DJGPP > environment). What is the *right way*? Inside the tree. Just duplicate the whole source tree (or at least the bits you're interested in)