[m-dev.] Please help... once more
Zoltan Somogyi
zs at cs.mu.OZ.AU
Fri Sep 22 15:12:53 AEDT 2000
On 21-Sep-2000, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
> are (roughly) the overhead I get:
>
> with 10 000 evts there is no overhead,
> with 100 000 evts, there is a small overhead,
> ...
> with 2 000 000 evts, there is an overhead factor of 120,
> with 4 000 000 evts, there is an overhead factor of 230,
> ...
>
> Then it seems to stabilize; with 200 000 000 events, it still have a factor
> that is around 230: so at least there is a good news... )-;
Precisely what overhead are you measuring, and what units do these numbers
have?
In any case, a program that generates only 10 000 events will execute so
quickly that timings from it are meaningless; you would be measuring the
clock granularity, not the speed of the code.
> (3) During while, a certain number of calls to functions that save and restore
> registers, heaps, etc. are made to collect probably don't need:
> - restore_transient_registers(),
> - save__transient_registers(),
> - MR_saved_global_hp(saved_regs),
> - MR_copy_saved_regs_to_regs(),
If you are still working on SPARCs, then you need these calls *more* than
those of us who work on x86s. The lack of them in the proper place can easily
get you bus errors. So don't delete them if you don't understand them.
I think it is very likely that your core dump is caused by the absence of
a restore_transient_registers() in e.g. MR_COLLECT_filter.
save_transient_registers, restore_transient_registers and their relatives
are defined in runtime/mercury_regs.h, but that file doesn't contain any
documentation on what circumstances they should be used in. Fergus, do you
know of any such documentation?
> + switch (MR_trace_ctrl.MR_trace_cmd) {
> + case MR_CMD_COLLECT:
> + port = (MR_Trace_Port) layout->MR_sll_port;
> + path = layout->MR_sll_entry->MR_sle_module_layout
> + ->MR_ml_string_table + layout->MR_sll_goal_path;
> + MR_COLLECT_filter(seqno, depth, port, layout,
> + path, &stop_collecting);
> + if (stop_collecting) {
> + MR_send_collect_result();
> + MR_send_message_to_socket("execution_continuing");
> + }
> + return NULL;
> +
> case MR_CMD_FINISH:
This looks like the right code, modulo formatting.
> (gdb) b MR_COLLECT_filter
> Breakpoint 1 at 0x52960: file mercury_trace_external.c, line 1486.
> (gdb) r
> Starting program: /home/terre/d02/lande/jahier/these/./queens
>
> Breakpoint 1, MR_COLLECT_filter (seqno=0, depth=4290683468, port=1356800,
> layout=0x1520d8, path=0x16 <Address 0x16 out of bounds>,
> stop_collecting=0xff1c84c0 "") at mercury_trace_external.c:1486
> 1486 if (MR_collect_arguments) {
This already shows several errors: the values of seqno, depth, port and path
all look invalid. Have a look at values of the variables from which the values
of these arguments are computed in the caller.
Zoltan.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list