From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA12237 for caml-redistribution@pauillac.inria.fr; Mon, 8 Nov 1999 19:15:36 +0100 (MET) Resent-Message-Id: <199911081815.TAA12237@pauillac.inria.fr> Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA18444 for ; Mon, 8 Nov 1999 18:54:42 +0100 (MET) Received: from miss.wu-wien.ac.at (miss.wu-wien.ac.at [137.208.107.17]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id SAA13464; Mon, 8 Nov 1999 18:54:38 +0100 (MET) Received: (from mottl@localhost) by miss.wu-wien.ac.at (8.9.0/8.9.0) id SAA22185; Mon, 8 Nov 1999 18:54:37 +0100 (MET) From: Markus Mottl 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) Cc: caml-list@inria.fr (OCAML) In-Reply-To: <199911081259.NAA18959@tobago.inria.fr> from "Damien Doligez" at Nov 8, 99 01:59:49 pm X-Mailer: ELM [version 2.4 PL21] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Resent-From: weis@pauillac.inria.fr Resent-Date: Mon, 8 Nov 1999 19:15:36 +0100 Resent-To: caml-redistribution@pauillac.inria.fr > >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 () 315953 13.75 30.33 0.0011 45 ? Stream_get_data_66 () 192558 8.38 38.72 0.0006 192558 ? proc_at_0x12004f080 () 152879 6.65 45.37 0.0005 454 ? lex_engine () 152832 6.65 52.02 0.0005 159 ? parse_engine () 111860 4.87 56.89 0.0004 47 ? alloc_shr () 106617 4.64 61.53 0.0004 36 ? modify () --------------------------------------------------------------------------- Regards, Markus Mottl -- Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl