Mail Archives: djgpp/2002/10/11/18:49:55
> 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)
- Raw text -