Re: Two questions, -gp and why is it slow?

Brandon Heller <[email protected]> Thu, 7 Jul 2005 21:39:59 +0000 (UTC)
Newsgroups gmane.comp.java.vm.sablevm.general
Message-ID <[email protected]>
Stephen Compall <s11 <at> member.fsf.org> writes:  
  
>   
> On Thu, 2005-07-07 at 15:11 +0000, Brandon Heller wrote:  
> > For a project, I need to generate profile information on SableVM with  
gprof.   
> > I can successfully compile sableVM on a SuSE machine and run sableCC as a   
> > benchmark on it.  After running configure, I modified the makefile in   
> > sablevm-sdk/sablevm by adding the -gp option to both CFLAGS and CXXFLAGS.   
I   
> > then ran 'make' and 'make install', yet the profile information (gmon.out)   
> > wasn't created. I'm wondering if this option must be specified in the   
> > configure file, and if so, how one might do that.  I'm using new 1.12  
release.  
>   
> Don't modify the Makefiles generated by configure, as the changes won't  
> automatically propagate, especially in situations where configure itself  
> gives you everything you need:  
>   
> ./configure other-options CFLAGS='-gp other cflags' other-options  
>   
> > These times were from an unloaded P4 2.6Ghz with 512MB RAM and HT, yet the   
> > times are much slower than the 1.5GHz 1.5GB RAM machine from Etienne's  
thesis   
> > paper.  Is the sablecc benchmark heavily memory-dependent, have I missed a   
> > 'debug' compiler switch, did the Simple C file change, or is something  
else to   
> > blame for this discrepancy?  
>   
> I cannot say for sure the situation then, but I think now egagnon  
> usually uses PPC.  I think a 1.5GHz PPC might be faster than your P4 in  
> such cases.  Oh, I really don't know hardware that well.  
>   
> --  
> I am away from my computer right now.  
> Sorry, I ran out for a bit!  
>   
  
I took your advice and was able to use -pg to get a gprof output, by passing  
in a modified CFLAGS variable to ./configure.  My new problem is that the  
gprof output is useless.  I get the following:  
  
Call graph (explanation follows)  
  
granularity: each sample hit covers 4 byte(s) no time propagated  
  
index % time    self  children    called     name  
                0.00    0.00      18/18          main [23]  
[1]      0.0    0.00    0.00      18         data_start [1]  
-----------------------------------------------  
                0.00    0.00       2/2           main [23]  
[2]      0.0    0.00    0.00       2         getProperties [2]  
-----------------------------------------------  
  
Gprof doesn't think any time has expired, and gives no useful info, when I run  
sablevm on sablecc.    
  
Does anyone have suggestions?  
  
Thanks,  
Brandon Heller