Have a go at fixing the heap info DTrace build failue on OSX
authorDuncan Coutts <duncan@well-typed.com>
Tue, 3 Jul 2012 18:57:05 +0000 (19:57 +0100)
committerMikolaj Konarski <mikolaj@well-typed.com>
Tue, 10 Jul 2012 15:53:48 +0000 (17:53 +0200)
This patch will need to be tested by someone on OSX.

Fixed a couple wrong names:
  CapsetID vs EventCapsetID
  gc__sync vs gc__global__sync

rts/RtsProbes.d
rts/Trace.h

index 9be0e66..fd47b75 100644 (file)
@@ -55,14 +55,13 @@ provider HaskellEvent {
   probe gc__idle (EventCapNo);
   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);
- */
+  probe gc__global__sync (EventCapNo);
+  probe gc__stats (EventCapsetID, StgWord, StgWord, StgWord, StgWord, StgWord, StgWord, StgWord);
+  probe heap__info (EventCapsetID, StgWord, StgWord, StgWord, StgWord, StgWord);
+  probe heap__allocated (EventCapNo, EventCapsetID, StgWord64);
+  probe heap__size (EventCapsetID, StgWord);
+  probe heap__live (EventCapsetID, StgWord);
+
   /* capability events */
   probe startup (EventCapNo);
   probe cap__create (EventCapNo);
index 6141003..dcd00b8 100644 (file)
@@ -364,7 +364,6 @@ 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,               \
@@ -389,20 +388,6 @@ INLINE_HEADER void dtraceStartup (int num_caps) {
     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)                      \
@@ -552,9 +537,7 @@ 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)
@@ -653,9 +636,7 @@ 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,