[mercury-users] Deep profiler data corrupted: unwritten nodes
Julien Fischer
juliensf at csse.unimelb.edu.au
Fri Dec 22 14:05:37 AEDT 2006
On Fri, 22 Dec 2006, Ondrej Bojar wrote:
> Hi,
>
> I'm trying to use the deep profiler but the profiled program fails to prepare
> Deep.data file correctly:
>
> Mercury runtime: UNWRITTEN nodes: Deep.data file corrupted
>
> As a possible hint, I've noticed that there is a bunch of 'unknown'
> procedures in the regular (mprof) profile:
>
> ...
> 0.00 2.45 1/1 unknown__134606628 [3]
> 0.00 0.00 1/1 unknown__134657636 [190]
> ...
>
> Could that be the reason?
It's more likely that in this case the profiling interrupt turned up
while the program was executing some C code.
> These unknown procedures come from an uninstalled library that I link
> explicitly with the main program using these extra flags to mmc:
>
> --search-lib-files-dir $(HOME)/tools/obomerclib/ \
> --link-object \
> $(HOME)/tools/obomerclib/Mercury/$(LIBGRADE)/*/Mercury/as/libtools.a
>
> The search-lib-files-dir is to provide access to interfaces, the link-object
> is for the linker. $(LIBGRADE) is set carefully to the same grade as the main
> program is compiled in (asm_fast.gc.prof or asm_fast.gc.profdeep). The
> library file libtools.a is fresh and ready there.
For each module in the program the _init.c file contains some code that
invokes the code in the runtime that writes out the deep profiling data
structures for that module. As a sanity check we mark the data structures as
they are written and when we've finished we check that they have indeed all
been written. The assertion failure above indicates that some of them
haven't. My guess is that the _init.c file for you program does not contain
all the calls to write out the deep profiling information for libtools. This
is possibly caused the --search-lib-files-dir not doing the correct thing with
.init files (it may have become broken when we moved over to grade specific
.init files.).
Visually inspecting the _init.c file for the program ought to tell you
if this is the case.
Cheers,
Julien.
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to: mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions: mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the users
mailing list