Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at ocaml.org.

Browse thread
profiling
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-05-03 (03:43)
From: Gerd Stolpmann <info@g...>
Subject: Re: "ocaml_beginners"::[] profiling

On 2002.05.03 07:16 bwv211mail wrote:
> I tried the profiling example in the new Ocaml book, p.281ff. But I
> am not getting any information that seems worthwhile. I hope someone
> can help me...

> $ ocamlopt -p -o test test.ml
> $ ./test
> -738197504
> 0
> $ gprof test > test.profile
> $ cat test.profile
> [...]
> % cumulative self self total 
> time seconds seconds calls ms/call ms/call name 
> 82.2 1.23 1.23 .mcount (104)
> 17.8 1.49 0.27 1 265.62 265.62 init_dummy
> <cycle 1> [3]
> 0.0 1.49 0.00 114 0.00 0.00 darken [6]
> [...]

I get:

% cumulative self self total 
time seconds seconds calls us/call us/call name 
96.30 0.26 0.26 200004 1.30 1.30 S_f_54
3.70 0.27 0.01 200004 0.05 1.35 S_mult_52
0.00 0.27 0.00 292 0.00 0.00 oldify
[...]

and that looks reasonable. Maybe your gprof is broken?

Gerd
-- 
----------------------------------------------------------------------------
Gerd Stolpmann Telefon: +49 6151 997705 (privat)
Viktoriastr. 45 
64293 Darmstadt EMail: gerd@g...
Germany 
----------------------------------------------------------------------------