Browse thread
Re: GC time
- Markus Mottl
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 1999-11-08 (18:15) |
From: | Markus Mottl <mottl@m...> |
Subject: | Re: GC time |
> >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