From 88740ad379e77efc892ecbef82cde626ee9a6bd9 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 7 Mar 2000 11:53:12 +0000 Subject: [PATCH] [project @ 2000-03-07 11:53:12 by simonmar] Remove duplicate prof_file variable. Heap profiling should work again. --- ghc/rts/ProfHeap.c | 5 ++--- ghc/rts/ProfRts.h | 6 ++++-- ghc/rts/Profiling.c | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ghc/rts/ProfHeap.c b/ghc/rts/ProfHeap.c index e328b33..9bb10ae 100644 --- a/ghc/rts/ProfHeap.c +++ b/ghc/rts/ProfHeap.c @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- - * $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 * @@ -31,7 +31,6 @@ static void fprint_data(FILE *fp); #endif char prof_filename[128]; /* urk */ -FILE *prof_file; #ifdef DEBUG_HEAP_PROF void initProfiling( void ) diff --git a/ghc/rts/ProfRts.h b/ghc/rts/ProfRts.h index 5dcfd36..106b1fb 100644 --- a/ghc/rts/ProfRts.h +++ b/ghc/rts/ProfRts.h @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- - * $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 * @@ -10,6 +10,8 @@ #if defined(PROFILING) || defined(DEBUG) void initProfiling ( void ); void endProfiling ( void ); + +extern FILE *prof_file; #endif #ifdef PROFILING diff --git a/ghc/rts/Profiling.c b/ghc/rts/Profiling.c index b5dc659..fd5dc92 100644 --- a/ghc/rts/Profiling.c +++ b/ghc/rts/Profiling.c @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------------- - * $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 * @@ -51,7 +51,7 @@ static lnat total_alloc, total_prof_ticks; /* Globals for opening the profiling log file */ static char *prof_filename; /* prof report file name = .prof */ -static FILE *prof_file; +FILE *prof_file; /* The Current Cost Centre Stack (for attributing costs) */ @@ -224,7 +224,7 @@ initProfilingLogFile(void) 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()); -- 1.7.10.4