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 PAA27588; Mon, 19 Jul 2004 15:32:45 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA27250 for ; Mon, 19 Jul 2004 15:32:44 +0200 (MET DST) Received: from postfix4-1.free.fr (postfix4-1.free.fr [213.228.0.62]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i6JDWhSH028936; Mon, 19 Jul 2004 15:32:44 +0200 Received: from univ-savoie.fr (grenoble-1-62-147-75-177.dial.proxad.net [62.147.75.177]) by postfix4-1.free.fr (Postfix) with ESMTP id 3D3271648A4; Mon, 19 Jul 2004 15:32:41 +0200 (CEST) Message-ID: <40FC21F3.3040108@univ-savoie.fr> Date: Mon, 19 Jul 2004 15:33:07 -0400 From: Christophe Raffalli User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Damien Doligez Cc: caml-list Subject: Re: [Caml-list] GC and caml_oldify_local_roots taking too much time References: <40FC0BEF.4080909@univ-savoie.fr> <3B84CC2A-D97E-11D8-A7B0-00039310CAE8@inria.fr> In-Reply-To: <3B84CC2A-D97E-11D8-A7B0-00039310CAE8@inria.fr> X-Enigmail-Version: 0.83.3.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Miltered: at concorde with ID 40FBCD7B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; raffalli:01 raffalli:01 univ-savoie:01 caml-list:01 oldify:01 damien:01 oldify:01 threads:01 recursion:01 recursion:01 bounded:01 bug:01 lablgl:01 threads:01 posix:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Damien Doligez wrote: > On Jul 19, 2004, at 19:59, Christophe Raffalli wrote: > >> What could cause the increase of time spent in caml_oldify_local_roots ? >> And what is this function in the first place ? > > > It is the function that finds the roots of the memory graph: > > 1. in the stack > 2. in the global C roots > 3. among finalised values > 4. in the stacks of other threads, if any > > I guess your program does one or more of the following: > > 1. allocate lots of stack space (deep recursion) That's not the case, I am in a while loop so recursion depth is bounded > 2. declare lots of C roots (with caml_register_global_root) That may be a bug in the lablGL code ... I had a short look but found nothing. > 3. launch lots of threads that allocate big stacks I launch only two threads (native posix threads) > I don't think finalised values can be the problem, because this > particular set of roots is emptied after each minor collection. I removed call to finalise and saw no change. Anyway I have always less than 10 not collected object with finaliser. > It should be possible to do something better for case (2), but > if you declare arbitrary amounts of C roots, you will still pay > the price at each major collection (instead of each minor > collection as it is now). I will look better at lablGL/Glut code now. Thanks > -- Damien > > ------------------- > 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 -- Christophe Raffalli Université de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tél: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution can check this signature --------------------------------------------- ------------------- 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