Skip to content
Snippets Groups Projects
Commit faf62056 authored by Simon Marlow's avatar Simon Marlow
Browse files

fix the new capset events: they were being emitted even without +RTS -Ds.

parent 8e1f5e35
No related merge requests found
...@@ -178,6 +178,14 @@ void traceEventStartup_ (int n_caps); ...@@ -178,6 +178,14 @@ void traceEventStartup_ (int n_caps);
* the capset info events so for simplicity, rather than working out if * the capset info events so for simplicity, rather than working out if
* they're necessary we always emit them. They should be very low volume. * they're necessary we always emit them. They should be very low volume.
*/ */
/*
* Emit a message/event describing the state of a thread
*/
#define traceCapsetModify(tag, capset, other) \
if (RTS_UNLIKELY(TRACE_sched)) { \
traceCapsetModify_(tag,capset,other); \
}
void traceCapsetModify_ (EventTypeNum tag, void traceCapsetModify_ (EventTypeNum tag,
CapsetID capset, CapsetID capset,
StgWord32 other); StgWord32 other);
...@@ -195,7 +203,7 @@ void traceOSProcessInfo_ (void); ...@@ -195,7 +203,7 @@ void traceOSProcessInfo_ (void);
#define debugTraceCap(class, cap, str, ...) /* nothing */ #define debugTraceCap(class, cap, str, ...) /* nothing */
#define traceThreadStatus(class, tso) /* nothing */ #define traceThreadStatus(class, tso) /* nothing */
#define traceEventStartup_(n_caps) /* nothing */ #define traceEventStartup_(n_caps) /* nothing */
#define traceCapsetModify_(tag, capset, other) /* nothing */ #define traceCapsetModify(tag, capset, other) /* nothing */
#define traceOSProcessInfo_() /* nothing */ #define traceOSProcessInfo_() /* nothing */
#endif /* TRACING */ #endif /* TRACING */
...@@ -448,27 +456,27 @@ INLINE_HEADER void traceEventGcDone(Capability *cap STG_UNUSED) ...@@ -448,27 +456,27 @@ INLINE_HEADER void traceEventGcDone(Capability *cap STG_UNUSED)
INLINE_HEADER void traceCapsetCreate(CapsetID capset STG_UNUSED, INLINE_HEADER void traceCapsetCreate(CapsetID capset STG_UNUSED,
CapsetType capset_type STG_UNUSED) CapsetType capset_type STG_UNUSED)
{ {
traceCapsetModify_(EVENT_CAPSET_CREATE, capset, capset_type); traceCapsetModify(EVENT_CAPSET_CREATE, capset, capset_type);
dtraceCapsetCreate(capset, capset_type); dtraceCapsetCreate(capset, capset_type);
} }
INLINE_HEADER void traceCapsetDelete(CapsetID capset STG_UNUSED) INLINE_HEADER void traceCapsetDelete(CapsetID capset STG_UNUSED)
{ {
traceCapsetModify_(EVENT_CAPSET_DELETE, capset, 0); traceCapsetModify(EVENT_CAPSET_DELETE, capset, 0);
dtraceCapsetDelete(capset); dtraceCapsetDelete(capset);
} }
INLINE_HEADER void traceCapsetAssignCap(CapsetID capset STG_UNUSED, INLINE_HEADER void traceCapsetAssignCap(CapsetID capset STG_UNUSED,
nat capno STG_UNUSED) nat capno STG_UNUSED)
{ {
traceCapsetModify_(EVENT_CAPSET_ASSIGN_CAP, capset, capno); traceCapsetModify(EVENT_CAPSET_ASSIGN_CAP, capset, capno);
dtraceCapsetAssignCap(capset, capno); dtraceCapsetAssignCap(capset, capno);
} }
INLINE_HEADER void traceCapsetRemoveCap(CapsetID capset STG_UNUSED, INLINE_HEADER void traceCapsetRemoveCap(CapsetID capset STG_UNUSED,
nat capno STG_UNUSED) nat capno STG_UNUSED)
{ {
traceCapsetModify_(EVENT_CAPSET_REMOVE_CAP, capset, capno); traceCapsetModify(EVENT_CAPSET_REMOVE_CAP, capset, capno);
dtraceCapsetRemoveCap(capset, capno); dtraceCapsetRemoveCap(capset, capno);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment