Re: How to get profile data?
Chris Pickett <[email protected]>
| Newsgroups | gmane.comp.java.vm.sablevm.devel |
|---|---|
| Message-ID | <[email protected]> |
Grzegorz B. Prokopski wrote:
> Hi,
>
> On Mon, 2004-10-25 at 22:33, fei yang wrote:
>
>> I am a student coming from China and I am interesting in GC
>>Algorithm. Now I write a new algorithm based sablevm1.0.9(include
>>three parts: class-library-1.0.9, native-library-1.0.9, sablevm-1.0.9)
>>in RedHat 7.3, with gcc 2.96. but I can't get profile data.
>
>
> Firstly, 1.0.9 is *very* old. You should really be using latest
> released version, which ATM is 1.1.6. Or, it might turn out, that in
> your case you should actually either wait for 1.1.7 to be released or
> use latest staging version ("staging" is our main development branch).
>
>
>> First, I installed class-library, native-library, when configuring
>>sablevm-1.0.9, I added option CFLAGS=-pg. After make and make intall,
>>I used specjvm98 _201_compress to test, got gmon.out.
>
>
> I don't think you can just set CFLAGS to whatever you want. SableVM,
> unless specially instructed, is quite picky as to what CFLAGS are set
> to.
>
>
>> Then, I used gprof to analyse gmon.out, I got the following
>>result, no subfunctions's profile data.
>>
>>Flat profile:
>>Each sample counts as 0.01 seconds.
>> no time accumulated
>> % cumulative self self total
>> time seconds seconds calls Ts/call Ts/call name
>> 0.00 0.00 0.00 14 0.00 0.00 data_start
>> 0.00 0.00 0.00 2 0.00 0.00 getProperties
>> 0.00 0.00 0.00 1 0.00 0.00 parseConfig
>> 0.00 0.00 0.00 1 0.00 0.00
>>printVersionAndCopyright
>
>
> I am not sure if gprof is able to deal with libraries and/or
> multi-threaded applications. I'd suggest you use something like
> qprof (from HP).
>
> Time for something constructive.
>
> In current development versions I added --with-profiling= configure
> switch, that has two values "gprof" or "nostatic". If you want to
> use gprof, just use --with-profiling=gprof. If you want to use
> qprof - you'll need to pass --with-profiling=nostatic. This switch
> will remove "static" keyword from definitions of many functions of
> libsablevm, making the functions visible to outside worlds and also
> profiler (i.e. qprof).
Thanks. Note that when I was profiling I could never get gprof to work
properly with SableVM -- it doesn't support multiple threads.
Chris