aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code/trace.c
diff options
context:
space:
mode:
authorRichard Kistruck2008-11-12 15:07:04 +0000
committerRichard Kistruck2008-11-12 15:07:04 +0000
commita563a7620470af7fbb079f3d05a12ece141ff86f (patch)
tree0f29d3e1f26a01607701263600503b8ed39f86fe /mps/code/trace.c
parent08fb5a0526c2d6b823505b59d0cc6f6487d972b8 (diff)
downloademacs-a563a7620470af7fbb079f3d05a12ece141ff86f.tar.gz
emacs-a563a7620470af7fbb079f3d05a12ece141ff86f.zip
Mps br/timing: mps_alert_collection_set() -- client sets a callback
function; MPS calls it synchronously on collection start/stop (immediately after posting start/stop message). The callback receives two ints: alertcode (start|stop; see mps.h), and whycode (trace->why). Note: callback is also called for heap walk start/stop. amcss.c: show start/stop alerts. Copied from Perforce Change: 166703 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code/trace.c')
-rw-r--r--mps/code/trace.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mps/code/trace.c b/mps/code/trace.c
index 3614f3157df..69ff0018404 100644
--- a/mps/code/trace.c
+++ b/mps/code/trace.c
@@ -1056,6 +1056,9 @@ static void tracePostMessage(Trace trace)
1056 message->notCondemnedSize = trace->notCondemned; 1056 message->notCondemnedSize = trace->notCondemned;
1057 MessagePost(arena, TraceMessageMessage(message)); 1057 MessagePost(arena, TraceMessageMessage(message));
1058 } 1058 }
1059 if(arena->alertCollection) {
1060 (*arena->alertCollection)(MPS_ALERT_COLLECTION_STOP, trace->why);
1061 }
1059 1062
1060 return; 1063 return;
1061} 1064}
@@ -1859,6 +1862,9 @@ void TraceStart(Trace trace, double mortality, double finishingTime)
1859 if(!MessageOnQueue(message)) { 1862 if(!MessageOnQueue(message)) {
1860 MessagePost(arena, message); 1863 MessagePost(arena, message);
1861 } 1864 }
1865 if(arena->alertCollection) {
1866 (*arena->alertCollection)(MPS_ALERT_COLLECTION_START, trace->why);
1867 }
1862 1868
1863 /* From the already set up white set, derive a grey set. */ 1869 /* From the already set up white set, derive a grey set. */
1864 1870