Fix RTS build on OS X
authorManuel M T Chakravarty <chak@cse.unsw.edu.au>
Tue, 10 Apr 2012 04:13:40 +0000 (14:13 +1000)
committerManuel M T Chakravarty <chak@cse.unsw.edu.au>
Tue, 10 Apr 2012 04:13:40 +0000 (14:13 +1000)
* The following commits made validate fail on OS X (Lion):
65aaa9b2715c5245838123f3a0fa5d92e0a66bce and c294d95dc04950ab4c5380bf6ce8651f621f8591
* I just commented out all offending code until it validated again. The original authors need to clean this up.

rts/RtsProbes.d
rts/Trace.h

index f5470df..40665ac 100644 (file)
@@ -56,12 +56,13 @@ provider HaskellEvent {
   probe gc__work (EventCapNo);
   probe gc__done (EventCapNo);
   probe gc__sync (EventCapNo);
+/* FIXME: leads to a validate failure on OS X (Lion)
   probe gc__stats (CapsetID, StgWord, StgWord, StgWord, StgWord, StgWord, StgWord, StgWord);
   probe heap__info (CapsetID, StgWord, StgWord, StgWord, StgWord, StgWord);
   probe heap__allocated (EventCapNo, CapsetID, StgWord64);
   probe heap__size (CapsetID, StgWord);
   probe heap__live (CapsetID, StgWord);
-
+ */
   /* capability events */
   probe startup (EventCapNo);
   probe cap__create (EventCapNo);
index c4c4e41..58ce43d 100644 (file)
@@ -352,6 +352,7 @@ INLINE_HEADER void dtraceStartup (int num_caps) {
     HASKELLEVENT_GC_DONE(cap)
 #define dtraceGcGlobalSync(cap)                         \
     HASKELLEVENT_GC_GLOBAL_SYNC(cap)
+/* FIXME: leads to a validate failure on OS X (Lion)
 #define dtraceEventGcStats(heap_capset, gens,           \
                            copies, slop, fragmentation, \
                            par_n_threads,               \
@@ -373,10 +374,23 @@ INLINE_HEADER void dtraceStartup (int num_caps) {
     HASKELLEVENT_HEAP_ALLOCATED(cap, heap_capset,       \
                                 allocated)
 #define dtraceEventHeapSize(heap_capset, size)          \
-    HASKELLEVENT_HEAP_LIVE(heap_capset, size)
+    HASKELLEVENT_HEAP_SIZE(heap_capset, size)
 #define dtraceEventHeapLive(heap_capset, live)          \
     HASKELLEVENT_HEAP_LIVE(heap_capset, live)
-
+ */
+#define dtraceEventGcStats(heap_capset, gens,           \
+                           copies, slop, fragmentation, \
+                           par_n_threads,               \
+                           par_max_copied,              \
+                           par_tot_copied)              
+#define dtraceHeapInfo(heap_capset, gens,               \
+                       maxHeapSize, allocAreaSize,      \
+                       mblockSize, blockSize)           
+#define dtraceEventHeapAllocated(cap, heap_capset,      \
+                                 allocated)             
+#define dtraceEventHeapSize(heap_capset, size)          
+#define dtraceEventHeapLive(heap_capset, live)          
 #define dtraceCapsetCreate(capset, capset_type)         \
     HASKELLEVENT_CAPSET_CREATE(capset, capset_type)
 #define dtraceCapsetDelete(capset)                      \
@@ -517,7 +531,9 @@ INLINE_HEADER void traceEventMigrateThread(Capability *cap     STG_UNUSED,
 INLINE_HEADER void traceCapCreate(Capability *cap STG_UNUSED)
 {
     traceCapEvent(cap, EVENT_CAP_CREATE);
+/* FIXME: leads to a validate failure on OS X (Lion)
     dtraceCapCreate((EventCapNo)cap->no);
+    */
 }
 
 INLINE_HEADER void traceCapDelete(Capability *cap STG_UNUSED)
@@ -616,7 +632,9 @@ INLINE_HEADER void traceEventGcDone(Capability *cap STG_UNUSED)
 INLINE_HEADER void traceEventGcGlobalSync(Capability *cap STG_UNUSED)
 {
     traceGcEvent(cap, EVENT_GC_GLOBAL_SYNC);
+/* FIXME: leads to a validate failure on OS X (Lion)
     dtraceGcGlobalSync((EventCapNo)cap->no);
+    */
 }
 
 INLINE_HEADER void traceEventGcStats(Capability *cap            STG_UNUSED,