home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!auspex-gw!guy
- From: guy@Auspex.COM (Guy Harris)
- Newsgroups: comp.sys.sun.misc
- Subject: Re: -Bstatic required with -pg - why?
- Message-ID: <16231@auspex-gw.auspex.com>
- Date: 5 Jan 93 22:37:14 GMT
- References: <MONTNARO.93Jan5112608@ausable.crd.ge.com>
- Sender: news@auspex-gw.auspex.com
- Distribution: comp
- Organization: Auspex Systems, Santa Clara
- Lines: 17
- Nntp-Posting-Host: auspex.auspex.com
-
- >Is there some technical reason that the prof/gprof stuff on Suns (we are
- >running 4.1.2) requires static linkage, or did somebody at Sun just get
- >lazy?
-
- Yes. :-)
-
- The main headache with doing "prof"-style on programs linked with shared
- libraries is that, if you want to profile the library code, you either
- need a *huge* profiling buffer, to cover the large non-contiguous
- address space, or you need a version of the code that implements
- "profil()" that supports multiple profiling buffers.
-
- Whether one considers it laziness on Sun's part that they didn't do any
- of that, and didn't implement a different profiling scheme that doesn't
- just use the PC as an index into a (range of) buffer(s), and didn't just
- provide startup code and say "sorry, we don't profile shared library
- code", probably depends on who's doing the considering.
-