From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=SPF_FAIL autolearn=disabled version=3.1.3 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 4D3EFBC37 for ; Mon, 8 Jun 2009 20:09:29 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgwDABjxLEqVnFmTgWdsb2JhbACYKgEBFiO1IYQKBQ X-IronPort-AV: E=Sophos;i="4.41,325,1241388000"; d="scan'208";a="30786196" Received: from mail.uj.edu.pl ([149.156.89.147]) by mail1-smtp-roc.national.inria.fr with ESMTP; 08 Jun 2009 20:09:28 +0200 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-2; format=flowed Received: from [127.0.0.1] ([149.156.90.26]) by mail.uj.edu.pl (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPA id <0KKX00EU8MFR3KJ0@mail.uj.edu.pl> for caml-list@yquem.inria.fr; Mon, 08 Jun 2009 20:09:28 +0200 (CEST) Message-id: <4A2D53D0.2070108@wp.pl> Date: Mon, 08 Jun 2009 20:09:20 +0200 From: Dawid Toton User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) To: caml-list@yquem.inria.fr Subject: Broken dumps from memprof patch? X-Spam: no; 0.00; mingw:01 unistd:01 stub:01 getpid:01 stdlib:01 makefile:01 bytecode:01 labltk:01 makefile:01 'make:01 installopt':01 cmxa:01 cygwin:01 toplevel:01 globals:01 I have compiled MinGW port of the comopiler (3.10) with memprof patch applied. I can produce heap dumps, but heapstats tool fails to load it. I had to change major_gc.c, the line: #include is replaced by a stub: int getpid() {return 8;} I had to tag all files in hp dir as precious (using hp/_tags file). Surprisingly I get no linking error with boot/stdlib.cma when doing the first step: make -f Makefile.nt world Gc.dump_heap successfully created a file while running bytecode. I had to remove labltk from OTHERLIBRARIES (in config/Makefile), otherwise bootstrap step results in: File "shell.ml", line 78, characters 15-27: Unbound value Mutex.create I got three executables: heapstats.exe, heapstats.opt and hp2ps.exe in root dir of the sources. 'make -f Makefile.nt install installopt' didn't install them. At first, threads.cmxa and friends were not built, because my make (using normal Cygwin) was unable to resolve a symbolic link (thread.ml to thread_posix.ml). I made a copy instead and it compiled. Trying to run heapstats on a fresh dump file (from toplevel loop) results in (the first line is my debug output): globals_map length = 469785344 Fatal error: exception Invalid_argument("String.create") Raised at file "hp/hPLoadHeap.ml", line 88, characters 20-37 The file is 320kB only, it can't contain 470MB of globals_map. Should I assume that bytecode produces broken heap dumps? Loading of a dump produced from native code went further: $ heapstats.opt -heap heap.dump.8.0 globals_map length = 115 info list element length = 1721 info list element length = 193024 Fatal error: exception End_of_file Raised at file "pervasives.ml", line 302, characters 15-26 Called from file "hp/hPLoadHeap.ml", line 118, characters 4-30 Called from file "hp/hPLoadHeap.ml", line 121, characters 14-21 Called from file "hp/hPLoadHeap.ml", line 173, characters 18-43 Called from file "hp/hPMain.ml", line 20, characters 16-38 Called from file "arg.ml", line 146, characters 12-33 Called from file "arg.ml", line 197, characters 8-27 Called from file "arg.ml", line 211, characters 4-32 Called from file "hp/hPMain.ml", line 10, characters 2-1023 Any ideas? Dawid