* Broken dumps from memprof patch?
@ 2009-06-08 18:09 Dawid Toton
0 siblings, 0 replies; only message in thread
From: Dawid Toton @ 2009-06-08 18:09 UTC (permalink / raw)
To: caml-list
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 <unistd.h>
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-08 18:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-08 18:09 Broken dumps from memprof patch? Dawid Toton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox