Re: Sablevm shared libraries question
Chris Pickett <[email protected]> Fri, 05 Aug 2005 11:57:53 -0400
| Newsgroups | gmane.comp.java.vm.sablevm.devel |
|---|---|
| Message-ID | <[email protected]> |
Brandon Heller wrote: > Also, I could find no documentation on how shared libraries are used > in SVM. If someone could reply with a bit of info on that, for the > sake of better docs, I'd really appreciate it. My next step will be > to try VTune, but I expect the same issue to happen. What tools do > you guys use to profile/tune SVM? I have only ever gotten qprof to work, it's available from HP's website. You'll need libunwind from there as well. gprof does not work with multithreaded programs, so it is a lost cause. Ulrich Drepper, the maintainer of glibc actually said, "gprof is useless in today world." I'm not entirely positive about the static vs. shared library stuff. I do know that --enable-debugging-features will give you -O0, disable function inlining, and use the basic switch interpreter, and --with-profiling=gprof should be good for you too (this disables the static keyword before functions and sets -pg, even if you're not using gprof). Also, since you'll get lots of errors without the static keyword, use --disable-errors-on-warnings. If you're interested in hardware counters and system-wide stuff, look at Prospect and OProfile. I have personally been using the RDTSC instruction to time pieces of code within a function or execution phases that cross function boundaries. You can grep around in my sandbox for details -- svn+ssh://svn.sablevm.org/public/developers/chris. If you do decide to do something fine-grained like this, I would recommend putting it inside #ifdef blocks somehow so as not impact on normal execution. There was something else that I heard about, but I can't remember its name, so let me know if none of these suggestions work for you. Cheers, Chris [please CC me, I'm not on the sablevm-devel list atm, although strangely I got this message.]