#include <unistd.h>
#endif
-#ifndef mingw32_TARGET_OS
+#ifndef mingw32_HOST_OS
# ifdef HAVE_SYS_TIMES_H
# include <sys/times.h>
# endif
# endif
#endif
-#if ! irix_TARGET_OS && ! defined(mingw32_TARGET_OS)
+#if ! irix_HOST_OS && ! defined(mingw32_HOST_OS)
# if defined(HAVE_SYS_RESOURCE_H)
# include <sys/resource.h>
# endif
#include <windows.h>
#endif
-#if defined(PAR) || !(!defined(HAVE_GETRUSAGE) || irix_TARGET_OS || defined(mingw32_TARGET_OS) || defined(cygwin32_TARGET_OS))
+#if defined(PAR) || !(!defined(HAVE_GETRUSAGE) || irix_HOST_OS || defined(mingw32_HOST_OS) || defined(cygwin32_HOST_OS))
#include <sys/resource.h>
#endif
/* elapsedtime() -- The current elapsed time in seconds */
-#if defined(mingw32_TARGET_OS) || defined(cygwin32_TARGET_OS)
+#if defined(mingw32_HOST_OS) || defined(cygwin32_HOST_OS)
#define HNS_PER_SEC 10000000LL /* FILETIMES are in units of 100ns */
/* Convert FILETIMEs into secs */
#define FT2longlong(ll,ft) \
(ll) /= (unsigned long long) (HNS_PER_SEC / CLOCKS_PER_SEC)
#endif
-#if defined(mingw32_TARGET_OS) || defined(cygwin32_TARGET_OS)
+#if defined(mingw32_HOST_OS) || defined(cygwin32_HOST_OS)
/* cygwin32 or mingw32 version */
static void
getTimes(void)
{
/* ToDo (on NT): better, get this via the performance data
that's stored in the registry. */
-# if !defined(HAVE_GETRUSAGE) || irix_TARGET_OS || defined(mingw32_TARGET_OS) || defined(cygwin32_TARGET_OS)
+# if !defined(HAVE_GETRUSAGE) || irix_HOST_OS || defined(mingw32_HOST_OS) || defined(cygwin32_HOST_OS)
return 0;
# else
struct rusage t;
void
statDescribeGens(void)
{
- nat g, s, mut, mut_once, lge, live;
- StgMutClosure *m;
+ nat g, s, mut, lge, live;
bdescr *bd;
step *step;
- debugBelch(" Gen Steps Max Mutable Mut-Once Step Blocks Live Large\n Blocks Closures Closures Objects\n");
+ debugBelch(" Gen Steps Max Mutable Step Blocks Live Large\n Blocks Closures Closures Objects\n");
+ mut = 0;
for (g = 0; g < RtsFlags.GcFlags.generations; g++) {
- for (m = generations[g].mut_list, mut = 0; m != END_MUT_LIST;
- m = m->mut_link)
- mut++;
- for (m = generations[g].mut_once_list, mut_once = 0; m != END_MUT_LIST;
- m = m->mut_link)
- mut_once++;
- debugBelch("%8d %8d %8d %9d %9d", g, generations[g].n_steps,
- generations[g].max_blocks, mut, mut_once);
+ for (bd = generations[g].mut_list; bd != NULL; bd = bd->link) {
+ mut += bd->free - bd->start;
+ }
+
+ debugBelch("%8d %8d %8d %9d", g, generations[g].n_steps,
+ generations[g].max_blocks, mut);
for (s = 0; s < generations[g].n_steps; s++) {
step = &generations[g].steps[s];