Commit 373fabef authored by sof's avatar sof

[project @ 2002-01-24 07:50:01 by sof]

SMP: misc tasks timing stats fixes
parent 2a59f826
/* ---------------------------------------------------------------------------
* $Id: Schedule.c,v 1.112 2002/01/24 02:06:48 sof Exp $
* $Id: Schedule.c,v 1.113 2002/01/24 07:50:02 sof Exp $
*
* (c) The GHC Team, 1998-2000
*
......@@ -1907,7 +1907,7 @@ initScheduler(void)
initCapability(&MainCapability);
#endif
#if defined(SMP) || defined(PAR)
#if /* defined(SMP) ||*/ defined(PAR)
initSparkPools();
#endif
}
......@@ -1935,7 +1935,7 @@ startTasks( void )
task_ids[i].mut_etime = 0.0;
task_ids[i].gc_time = 0.0;
task_ids[i].gc_etime = 0.0;
task_ids[i].elapsedtimestart = elapsedtime();
task_ids[i].elapsedtimestart = stat_getElapsedTime();
IF_DEBUG(scheduler,fprintf(stderr,"scheduler: Started task: %ld\n",tid););
}
}
......
/* -----------------------------------------------------------------------------
* $Id: Stats.c,v 1.41 2001/11/28 14:29:59 simonmar Exp $
* $Id: Stats.c,v 1.42 2002/01/24 07:50:01 sof Exp $
*
* (c) The GHC Team, 1998-1999
*
......@@ -586,10 +586,12 @@ stat_workerStop(void)
nat i;
pthread_t me = pthread_self();
getTimes();
for (i = 0; i < RtsFlags.ParFlags.nNodes; i++) {
if (task_ids[i].id == me) {
task_ids[i].mut_time = usertime() - task_ids[i].gc_time;
task_ids[i].mut_etime = elapsedtime()
task_ids[i].mut_time = CurrentUserTime - task_ids[i].gc_time;
task_ids[i].mut_etime = CurrentElapsedTime
- GCe_tot_time
- task_ids[i].elapsedtimestart;
if (task_ids[i].mut_time < 0.0) { task_ids[i].mut_time = 0.0; }
......@@ -597,6 +599,12 @@ stat_workerStop(void)
}
}
}
long int stat_getElapsedTime ()
{
getTimes();
return CurrentElapsedTime;
}
#endif
/* -----------------------------------------------------------------------------
......
/* -----------------------------------------------------------------------------
* $Id: Stats.h,v 1.14 2001/11/26 16:54:22 simonmar Exp $
* $Id: Stats.h,v 1.15 2002/01/24 07:50:02 sof Exp $
*
* (c) The GHC Team, 1998-1999
*
......@@ -46,3 +46,7 @@ extern double mut_user_time_during_heap_census(void);
extern void statDescribeGens( void );
extern HsInt getAllocations( void );
#ifdef SMP
extern long int stat_getElapsedTime ( void );
#endif
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