From: Markus Mottl <mottl@miss.wu-wien.ac.at>
Message-Id: <199911081754.SAA22185@miss.wu-wien.ac.at>
Subject: Re: GC time
To: Damien.Doligez@inria.fr (Damien Doligez)
Date: Mon, 8 Nov 1999 18:54:36 +0100 (MET)
In-Reply-To: <199911081259.NAA18959@tobago.inria.fr> from "Damien Doligez" at Nov 8, 99 01:59:49 pm
> >It there a (simple) way for me to measure the GC time
> >spent on executing ocamlopt-generated native code or
> >ocaml bytecode?
>
> Not yet. We may include GC timers in a future release of O'Caml, but
> starting and stopping the timer takes almost as much time as the GC
> itself, so you'll take a performance hit and the accuracy of the
> timings will not be very good.
It is possible to do an exact (cycle level) analysis on Alpha-processors
under Digitial Unix. The tool "pixie" allows insertion of profiling code
into any kind of binary executable. The resulting information is extremely
detailed and also accurately counts cycles consumed by the OCaml-GC. So if
you have access to such a machine, profiling gets easy...
Here, for example, the first lines of output of such a run:
---------------------------------------------------------------------------
2297470 cycles (0.0077 seconds at 299.40 megahertz)
cycles %cycles cum % seconds cycles bytes procedure (file)
/call /line
380979 16.58 16.58 0.0013 62 ? oldify (<sm>)
315953 13.75 30.33 0.0011 45 ? Stream_get_data_66 (<sm>)
192558 8.38 38.72 0.0006 192558 ? proc_at_0x12004f080 (<sm>)
152879 6.65 45.37 0.0005 454 ? lex_engine (<sm>)
152832 6.65 52.02 0.0005 159 ? parse_engine (<sm>)
111860 4.87 56.89 0.0004 47 ? alloc_shr (<sm>)
106617 4.64 61.53 0.0004 36 ? modify (<sm>)
---------------------------------------------------------------------------
Regards,
Markus Mottl
-- Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:28 MET