#endif
nat thread_index; // a zero based index identifying the thread
- step_workspace ** steps; // 2-d array (gen,step) of workspaces
-
bdescr * free_blocks; // a buffer of free blocks for this thread
// during GC without accessing the block
// allocators spin lock.
+ StgClosure* static_objects; // live static objects
+ StgClosure* scavenged_static_objects; // static objects scavenged so far
+
lnat gc_count; // number of gc's this thread has done
// --------------------
#ifdef USE_PAPI
int papi_events;
#endif
-
+
+ // -------------------
+ // stats
+
+ lnat copied;
+ lnat any_work;
+ lnat no_work;
+ lnat scav_find_work;
+
+ // -------------------
+ // workspaces
+
+ // array of workspaces, indexed by stp->abs_no. This is placed
+ // directly at the end of the gc_thread structure so that we can get from
+ // the gc_thread pointer to a workspace using only pointer
+ // arithmetic, no memory access. This happens in the inner loop
+ // of the GC, see Evac.c:alloc_for_copy().
+ step_workspace steps[];
} gc_thread;
extern nat N;
extern rtsBool major_gc;
+extern nat n_gc_threads;
-extern gc_thread *gc_threads;
+extern gc_thread **gc_threads;
register gc_thread *gct __asm__("%rbx");
// extern gc_thread *gct; // this thread's gct TODO: make thread-local
-extern StgClosure* static_objects;
-extern StgClosure* scavenged_static_objects;
-
extern bdescr *mark_stack_bdescr;
extern StgPtr *mark_stack;
extern StgPtr *mark_sp;
extern long copied;
-#ifdef THREADED_RTS
-extern SpinLock static_objects_sync;
-#endif
-
#ifdef DEBUG
extern nat mutlist_MUTVARS, mutlist_MUTARRS, mutlist_MVARS, mutlist_OTHERS;
#endif