[m-dev.] Please help... once more
Erwan Jahier
Erwan.Jahier at irisa.fr
Tue Oct 17 03:18:00 AEDT 2000
| On 16-Oct-2000, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
| >
| > | Please send a proper diff, not just cut-and-paste extracts.
| >
| > diff -u trace-save/mercury_trace_external.c trace/mercury_trace_external.c
| > --- trace-save/mercury_trace_external.c Sat Aug 12 17:53:43 2000
| > +++ trace/mercury_trace_external.c Mon Oct 16 12:47:54 2000
| > @@ -809,7 +809,8 @@
| > if (collect_linked) {
| > MR_send_message_to_socket(
| > "collect_linked");
| > - external_debugger_mode = MR_collecting;
| > + cmd->MR_trace_cmd = MR_CMD_COLLECT;
| > + external_debugger_mode = MR_collecting;
| > MR_TRACE_CALL_MERCURY(
| > (*initialize_ptr)(&MR_collecting_variable));
| >
|
| Ah, I think I see the reason. The `finish' command, which you were
| comparing against, is strict. But with this implementation, `collect' is not.
| I think a good part of that factor of 5 is the time spent checking for
| breakpoints. Try setting `cmd->MR_trace_strict = TRUE' there.
Ok, thanks. This explains why I had 56 s when the MR_CMD_COLLECT case was
empty. Unfortunately, it did not have a big impact on the performance of
collect. Now the timings are (again for queens-11 and a very simple monitor):
if
a: is the code to get the value of event_info.MR_max_mr_num
b: is the call MR_copy_saved_regs_to_regs() and its twin
c: is the call MR_COLLECT_filter and is the check to see if stop_collecting
is set to TRUE
a+b+c: 216 seconds (user+sys)
a+b: 56 s
{}: 17 s
ps: wrapping the call to (*filter_ptr)() in MR_COLLECT_filter() by the macro
MR_TRACE_CALL_MERCURY() was not necessary. So now a+b+c is 182 seconds.
--
R1.
--------------------------------------------------------------------------
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