X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fsm%2FGC.h;h=5d7924ea6beca2d67f0fb6587b796bce0b7fdb37;hb=a84385fa752d8fa800a2155cce95f47c68b74e2b;hp=69fdc10447cd1da5bbe82847fba76cc7ce7aa0d0;hpb=d5bd3e829c47c03157cf41cad581d2df44dfd81b;p=ghc-hetmet.git diff --git a/rts/sm/GC.h b/rts/sm/GC.h index 69fdc10..5d7924e 100644 --- a/rts/sm/GC.h +++ b/rts/sm/GC.h @@ -88,11 +88,7 @@ typedef struct step_workspace_ { // where large objects to be scavenged go bdescr * todo_large_objects; - // Objects that need not be, or have already been, scavenged. The - // block at the front of the list is special: objects that don't - // need to be scavenged are copied directly to this block. - // Completed scan blocks also go on this list; but we put them - // after the head block. + // Objects that need not be, or have already been, scavenged. bdescr * scavd_list; lnat n_scavd_blocks; // count of blocks in this list @@ -110,6 +106,10 @@ typedef struct step_workspace_ { typedef struct gc_thread_ { #ifdef THREADED_RTS OSThreadId id; // The OS thread that this struct belongs to + Mutex wake_mutex; + Condition wake_cond; // So we can go to sleep between GCs + rtsBool wakeup; + rtsBool exit; #endif nat thread_index; // a zero based index identifying the thread @@ -124,7 +124,7 @@ typedef struct gc_thread_ { // -------------------- // evacuate flags - nat evac_gen; // Youngest generation that objects + step *evac_step; // Youngest generation that objects // should be evacuated to in // evacuate(). (Logically an // argument to evacuate, but it's @@ -142,13 +142,18 @@ typedef struct gc_thread_ { lnat thunk_selector_depth; // ummm.... not used as of now +#ifdef USE_PAPI + int papi_events; +#endif + } gc_thread; extern nat N; extern rtsBool major_gc; extern gc_thread *gc_threads; -extern gc_thread *gct; // this thread's gct TODO: make thread-local +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; @@ -165,6 +170,10 @@ extern StgPtr oldgen_scan; extern long copied; extern long scavd_copied; +#ifdef THREADED_RTS +extern SpinLock static_objects_sync; +#endif + #ifdef DEBUG extern nat mutlist_MUTVARS, mutlist_MUTARRS, mutlist_MVARS, mutlist_OTHERS; #endif