time bug
Henry Cejtin
henry@sourcelight.com
Fri, 13 Jul 2001 19:39:35 -0500
Is it intentional to copy the struct rusage ru_gc from the gcState to the
file static gc on calls to MLton_Rusage_ru()? I guess it might be to copy
something which might change, but it seems strange.
The only thing I would like to get to track down the Time exception stuff is
to modify MLton_Rusage_ru() in rusage.c to be the following:
#include <stdio.h>
void
MLton_Rusage_ru()
{
gc = gcState.ru_gc;
getrusage(RUSAGE_SELF, &self);
getrusage(RUSAGE_CHILDREN, &children);
fprintf(stderr, "MLton_Rusage_ru: self: user = %ld.%06ld, sys = %ld.%06ld, child: user = %ld.%06ld, sys = %ld.%06ld0,
(long)self.ru_utime.tv_sec, (long)self.ru_utime.tv_usec,
(long)self.ru_stime.tv_sec, (long)self.ru_stime.tv_usec,
(long)children.ru_utime.tv_sec, (long)children.ru_utime.tv_usec,
(long)children.ru_stime.tv_sec, (long)children.ru_stime.tv_usec);
}
and to then run self compiles until the bug. This way I can see exactly what
the kernel is returning so I will know if if was its fault.