Commit 71d6db22 authored by Simon Marlow's avatar Simon Marlow

fix profiling on Win32

The recent patch to free memory in hs_exit() on Win32 unfortunately broke
profiling, because it freed the memory slightly too early.
parent acd07df5
# Initialise and check sanity.
AC_INIT([The Glorious Glasgow Haskell Compilation System], [6.5], [glasgow-haskell-bugs@haskell.org], [ghc])
AC_INIT([The Glorious Glasgow Haskell Compilation System], [6.5.20060329], [glasgow-haskell-bugs@haskell.org], [ghc])
AC_CONFIG_SRCDIR([ghc.spec.in])
# duplicate from ../configure.ac
......
......@@ -373,9 +373,8 @@ hs_exit(void)
/* stop timing the shutdown, we're about to print stats */
stat_endExit();
/* clean up things from the storage manager's point of view.
* also outputs the stats (+RTS -s) info.
*/
// clean up things from the storage manager's point of view.
// also outputs the stats (+RTS -s) info.
exitStorage();
#ifdef RTS_GTK_FRONTPANEL
......@@ -398,7 +397,7 @@ hs_exit(void)
// during endProfiling().
fclose(prof_file);
#endif
#if defined(TICKY_TICKY)
if (RtsFlags.TickyFlags.showTickyStats) PrintTickyInfo();
#endif
......@@ -406,6 +405,9 @@ hs_exit(void)
#if defined(mingw32_HOST_OS)
shutdownAsyncIO();
#endif
// Finally, free all our storage.
freeStorage();
}
// Compatibility interfaces
......
......@@ -266,6 +266,11 @@ void
exitStorage (void)
{
stat_exit(calcAllocated());
}
void
freeStorage (void)
{
freeAllMBlocks();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment