summaryrefslogtreecommitdiff
path: root/rts/Trace.c
diff options
context:
space:
mode:
authorDuncan Coutts <duncan@well-typed.com>2011-05-23 00:10:21 +0100
committerDuncan Coutts <duncan@well-typed.com>2011-05-23 00:10:21 +0100
commit96d64fe2175d829f9499656750d51cf577ff9892 (patch)
treed2f784f6086b830d7429e1b77904f5e500e4e95d /rts/Trace.c
parente7dcbdc7b68275d23debfec5f17074c55212eeb1 (diff)
downloadhaskell-96d64fe2175d829f9499656750d51cf577ff9892.tar.gz
Revert "Add capability sets to the event system. Contains code from Duncan Coutts."
This reverts commit 58532eb46041aec8d4cbb48b054cb5b001edb43c. Turns out it didn't work on Windows and it'll need some non-trivial changes to make it work on Windows. We'll get it in later once that's sorted out.
Diffstat (limited to 'rts/Trace.c')
-rw-r--r--rts/Trace.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/rts/Trace.c b/rts/Trace.c
index fb8e9226af..f2f9e81549 100644
--- a/rts/Trace.c
+++ b/rts/Trace.c
@@ -20,10 +20,6 @@
#include "Threads.h"
#include "Printer.h"
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#ifdef DEBUG
// debugging flags, set with +RTS -D<something>
int DEBUG_sched;
@@ -255,69 +251,6 @@ void traceSchedEvent_ (Capability *cap, EventTypeNum tag,
}
}
-void traceCapsetModify_ (EventTypeNum tag,
- CapsetID capset,
- StgWord32 other,
- StgWord32 other2)
-{
-#ifdef DEBUG
- if (RtsFlags.TraceFlags.tracing == TRACE_STDERR) {
- ACQUIRE_LOCK(&trace_utx);
-
- tracePreface();
- switch (tag) {
- case EVENT_CAPSET_CREATE: // (capset, capset_type)
- debugBelch("created capset %d of type %d\n", capset, other);
- break;
- case EVENT_CAPSET_DELETE: // (capset)
- debugBelch("deleted capset %d\n", capset);
- break;
- case EVENT_CAPSET_ASSIGN_CAP: // (capset, capno)
- debugBelch("assigned cap %d to capset %d\n", other, capset);
- break;
- case EVENT_CAPSET_REMOVE_CAP: // (capset, capno)
- debugBelch("removed cap %d from capset %d\n", other, capset);
- break;
- }
- RELEASE_LOCK(&trace_utx);
- } else
-#endif
- {
- if(eventlog_enabled) postCapsetModifyEvent(tag, capset, other, other2);
- }
-}
-
-extern char **environ;
-
-void traceCapsetDetails_(int *argc, char **argv[]){
- if(eventlog_enabled){
- postCapsetModifyEvent(EVENT_OSPROCESS_PID,
- CAPSET_OSPROCESS_DEFAULT,
- getpid(),
- getppid());
-
- char buf[256];
- snprintf(buf, sizeof(buf), "GHC-%s %s", ProjectVersion, RtsWay);
- postCapsetStrEvent(EVENT_RTS_IDENTIFIER,
- CAPSET_OSPROCESS_DEFAULT,
- buf);
-
- if(argc != NULL && argv != NULL){
- postCapsetVecEvent(EVENT_PROGRAM_ARGS,
- CAPSET_OSPROCESS_DEFAULT,
- *argc,
- *argv);
- }
-
- int env_len;
- for( env_len = 0; environ[env_len] != NULL; env_len++);
- postCapsetVecEvent(EVENT_PROGRAM_ENV,
- CAPSET_OSPROCESS_DEFAULT,
- env_len,
- environ);
- }
-}
-
void traceEvent_ (Capability *cap, EventTypeNum tag)
{
#ifdef DEBUG