Remove duplicate prof_file variable. Heap profiling should work again.
/* -----------------------------------------------------------------------------
- * $Id: ProfHeap.c,v 1.3 2000/02/17 17:19:42 simonmar Exp $
+ * $Id: ProfHeap.c,v 1.4 2000/03/07 11:53:12 simonmar Exp $
*
- * (c) The GHC Team, 1998-1999
+ * (c) The GHC Team, 1998-2000
*
* Support for heap profiling
*
#endif
char prof_filename[128]; /* urk */
-FILE *prof_file;
#ifdef DEBUG_HEAP_PROF
void initProfiling( void )
/* -----------------------------------------------------------------------------
- * $Id: ProfRts.h,v 1.8 2000/02/17 17:19:42 simonmar Exp $
+ * $Id: ProfRts.h,v 1.9 2000/03/07 11:53:12 simonmar Exp $
*
- * (c) The GHC Team, 1998-1999
+ * (c) The GHC Team, 1998-2000
*
* Support for profiling
*
#if defined(PROFILING) || defined(DEBUG)
void initProfiling ( void );
void endProfiling ( void );
+
+extern FILE *prof_file;
#endif
#ifdef PROFILING
/* -----------------------------------------------------------------------------
- * $Id: Profiling.c,v 1.14 2000/03/01 11:09:05 simonmar Exp $
+ * $Id: Profiling.c,v 1.15 2000/03/07 11:53:12 simonmar Exp $
*
- * (c) The GHC Team, 1998-1999
+ * (c) The GHC Team, 1998-2000
*
* Support for profiling
*
/* Globals for opening the profiling log file
*/
static char *prof_filename; /* prof report file name = <program>.prof */
-static FILE *prof_file;
+FILE *prof_file;
/* The Current Cost Centre Stack (for attributing costs)
*/
RtsFlags.CcFlags.doCostCentres = 0;
return;
}
-
+
if (RtsFlags.CcFlags.doCostCentres == COST_CENTRES_XML) {
/* dump the time, and the profiling interval */
fprintf(prof_file, "\"%s\"\n", time_str());