#include "ParTicky.h" /* ToDo: move into Rts.h */
#include "Profiling.h"
#include "Storage.h"
+#include "Task.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
GC_tot_time += gc_time;
GCe_tot_time += gc_etime;
-#ifdef SMP
+#if defined(SMP)
{
nat i;
pthread_t me = pthread_self();
for (i = 0; i < RtsFlags.ParFlags.nNodes; i++) {
- if (me == task_ids[i].id) {
- task_ids[i].gc_time += gc_time;
- task_ids[i].gc_etime += gc_etime;
+ if (me == taskTable[i].id) {
+ taskTable[i].gc_time += gc_time;
+ taskTable[i].gc_etime += gc_etime;
break;
}
}
stat_workerStop
Called under SMP when a worker thread finishes. We drop the timing
- stats for this thread into the task_ids struct for that thread.
+ stats for this thread into the taskTable struct for that thread.
-------------------------------------------------------------------------- */
#if defined(SMP)
getTimes();
for (i = 0; i < RtsFlags.ParFlags.nNodes; i++) {
- if (task_ids[i].id == me) {
- task_ids[i].mut_time = CurrentUserTime - task_ids[i].gc_time;
- task_ids[i].mut_etime = CurrentElapsedTime
+ if (taskTable[i].id == me) {
+ taskTable[i].mut_time = CurrentUserTime - taskTable[i].gc_time;
+ taskTable[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; }
- if (task_ids[i].mut_etime < 0.0) { task_ids[i].mut_etime = 0.0; }
+ - taskTable[i].elapsedtimestart;
+ if (taskTable[i].mut_time < 0.0) { taskTable[i].mut_time = 0.0; }
+ if (taskTable[i].mut_etime < 0.0) { taskTable[i].mut_etime = 0.0; }
}
}
}
{ nat i;
MutUserTime = 0.0;
for (i = 0; i < RtsFlags.ParFlags.nNodes; i++) {
- MutUserTime += task_ids[i].mut_time;
+ MutUserTime += taskTable[i].mut_time;
}
}
time = MutUserTime + GC_tot_time + InitUserTime + ExitUserTime;
statsPrintf(" Task %2d: MUT time: %6.2fs (%6.2fs elapsed)\n"
" GC time: %6.2fs (%6.2fs elapsed)\n\n",
i,
- TICK_TO_DBL(task_ids[i].mut_time),
- TICK_TO_DBL(task_ids[i].mut_etime),
- TICK_TO_DBL(task_ids[i].gc_time),
- TICK_TO_DBL(task_ids[i].gc_etime));
+ TICK_TO_DBL(taskTable[i].mut_time),
+ TICK_TO_DBL(taskTable[i].mut_etime),
+ TICK_TO_DBL(taskTable[i].gc_time),
+ TICK_TO_DBL(taskTable[i].gc_etime));
}
}
#endif