home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sun.misc
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!paladin.american.edu!darwin.sura.net!news.duc.auburn.edu!netman!elling
- From: elling@eng.auburn.edu (Richard Elling)
- Subject: Re: -Bstatic required with -pg - why?
- Message-ID: <1993Jan6.145941.14223@news.duc.auburn.edu>
- Sender: usenet@news.duc.auburn.edu (News Account)
- Nntp-Posting-Host: netman.eng.auburn.edu
- Reply-To: elling@eng.auburn.edu
- Organization: Auburn University Engineering
- References: <16231@auspex-gw.auspex.com>
- Date: Wed, 6 Jan 1993 14:59:41 GMT
- Lines: 40
-
- In article 16231@auspex-gw.auspex.com, guy@Auspex.COM (Guy Harris) writes:
- >>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.
-
- This is another one of those "fixed in Solaris 2.x" things.
- In Solaris 2.x you have the /proc filesystem which allows
- access to the image of each process on the system. Thus you
- can attach to a process and profile it or debug it on the fly.
- Definitely an advantage since now you can choose to only profile
- parts of the program. Also, you don't need to store a bunch of
- profiling libraries. A definite win.
-
- Meanwhile, unless you are really into profiling, you can save
- quite a few megabytes in /usr/lib and /usr/openwin/lib by taking
- the lib*_p.a files out. At my site, we replace them with symlinks
- to an automounted directory so that we really only have one
- copy of them on the net. If you never profile, then just remove
- them.
-
- ---
- Richard Elling Manager of Network Support
- Auburn University Engineering Administration
- richard.elling@eng.auburn.edu KB4HB [44.100.0.72] (205)844-2280
- Type-5 keyboard survival: xmodmap -e "keysym BackSpace = Delete"
-
-