home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / sun / misc / 6151 < prev    next >
Encoding:
Text File  |  1993-01-06  |  2.5 KB  |  54 lines

  1. Newsgroups: comp.sys.sun.misc
  2. 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
  3. From: elling@eng.auburn.edu (Richard Elling)
  4. Subject: Re: -Bstatic required with -pg - why?
  5. Message-ID: <1993Jan6.145941.14223@news.duc.auburn.edu>
  6. Sender: usenet@news.duc.auburn.edu (News Account)
  7. Nntp-Posting-Host: netman.eng.auburn.edu
  8. Reply-To: elling@eng.auburn.edu
  9. Organization: Auburn University Engineering
  10. References: <16231@auspex-gw.auspex.com>
  11. Date: Wed, 6 Jan 1993 14:59:41 GMT
  12. Lines: 40
  13.  
  14. In article 16231@auspex-gw.auspex.com, guy@Auspex.COM (Guy Harris) writes:
  15. >>Is there some technical reason that the prof/gprof stuff on Suns (we are
  16. >>running 4.1.2) requires static linkage, or did somebody at Sun just get
  17. >>lazy? 
  18. >
  19. >Yes. :-)
  20. >
  21. >The main headache with doing "prof"-style on programs linked with shared
  22. >libraries is that, if you want to profile the library code, you either
  23. >need a *huge* profiling buffer, to cover the large non-contiguous
  24. >address space, or you need a version of the code that implements
  25. >"profil()" that supports multiple profiling buffers.
  26. >
  27. >Whether one considers it laziness on Sun's part that they didn't do any
  28. >of that, and didn't implement a different profiling scheme that doesn't
  29. >just use the PC as an index into a (range of) buffer(s), and didn't just
  30. >provide startup code and say "sorry, we don't profile shared library
  31. >code", probably depends on who's doing the considering.
  32.  
  33. This is another one of those "fixed in Solaris 2.x" things.
  34. In Solaris 2.x you have the /proc filesystem which allows
  35. access to the image of each process on the system.  Thus you
  36. can attach to a process and profile it or debug it on the fly.
  37. Definitely an advantage since now you can choose to only profile
  38. parts of the program.  Also, you don't need to store a bunch of
  39. profiling libraries.  A definite win.
  40.  
  41. Meanwhile, unless you are really into profiling, you can save
  42. quite a few megabytes in /usr/lib and /usr/openwin/lib by taking
  43. the lib*_p.a files out.  At my site, we replace them with symlinks
  44. to an automounted directory so that we really only have one 
  45. copy of them on the net.  If you never profile, then just remove
  46. them.
  47.  
  48. ---
  49.  Richard Elling                          Manager of Network Support
  50.  Auburn University                       Engineering Administration
  51.  richard.elling@eng.auburn.edu   KB4HB [44.100.0.72]  (205)844-2280
  52.  Type-5 keyboard survival: xmodmap -e "keysym BackSpace = Delete"
  53.  
  54.