[mercury-users] Deep profiler data corrupted: unwritten nodes

Ondrej Bojar obo at cuni.cz
Fri Dec 22 15:19:45 AEDT 2006


Julien Fischer wrote:
> It's more likely that in this case the profiling interrupt turned up
> while the program was executing some C code.

The same issue appeared in with a program with very limited or maybe 
none C code, but I would need to double check to be sure.

But in case there is a significant portion of C code used in my app, it 
is very likely that the profiling interrupt would strike at a wrong 
point. Deep profiling is not usable for such situations?

>> 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.

The _init.c file for my program indeed does not contain any calls to 
save deep profiler data for my libtools modules. (But it contains such 
calls for mercury standard library modules, though.)

In fact, I am surprised to see no _init.c files in the 
tools/obomerclib/Mercury/<grade>/ at all. So there are no _init.c files 
generated for the library modules? Or are they generated only when the 
library gets installed? (As mentioned, I am not doing this.)

Thanks, O.

> 
> 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
> --------------------------------------------------------------------------
> 

-- 
Ondrej Bojar (mailto:obo at cuni.cz)
http://www.cuni.cz/~obo
--------------------------------------------------------------------------
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