From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA11133; Sat, 15 Nov 2003 13:54:11 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 NAA11740 for ; Sat, 15 Nov 2003 13:54:10 +0100 (MET) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hAFCs8114236 for ; Sat, 15 Nov 2003 13:54:09 +0100 (MET) Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 1AKzwF-0001Ab-00 for ; Sat, 15 Nov 2003 12:54:07 +0000 Date: Sat, 15 Nov 2003 12:54:07 +0000 Cc: Ocaml Mailing List Subject: Re: [Caml-list] Profiling a function execution Message-ID: <20031115125407.GA4431@redhat.com> References: <20031114123358.GA24353@redhat.com> <6F530E3A-175C-11D8-A49C-0003937628DA@uni-muenster.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6F530E3A-175C-11D8-A49C-0003937628DA@uni-muenster.de> User-Agent: Mutt/1.5.4i From: Richard Jones X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 elapsed:01 freshmeat:01 team's:01 ltd:98 distinguish:01 nov:01 wolfgang:02 worse:03 wrote:03 wrote:03 trick:03 profiled:95 prototype:04 cycles:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, Nov 15, 2003 at 12:11:17PM +0100, Wolfgang Lux wrote: > Richard Jones wrote: > > >If you're using a Pentium-class machine, then a nice trick is to wrap > >the RDTSC assembly instruction and call that. It returns number of > >clock cycles elapsed (a 64 bit number IIRC). Here's some code to get > >you started: > > This looks like complete nonsense to me. This will neither distinguish > user and system mode execution times. Even worse, clock cycles will > not have any meaning if the operating system chooses to perform a > task switch while the profiled function is executed. Obviously. It was only a suggestion after all ... Rich. -- Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj Merjis Ltd. http://www.merjis.com/ - improving website return on investment 'There is a joke about American engineers and French engineers. The American team brings a prototype to the French team. The French team's response is: "Well, it works fine in practice; but how will it hold up in theory?"' ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners