diff --git a/docs/users_guide/runtime_control.rst b/docs/users_guide/runtime_control.rst index 370593d207e1658478479507ebc1c69c2b780c57..1377db771d0aee52727c629bf6719e513f51428e 100644 --- a/docs/users_guide/runtime_control.rst +++ b/docs/users_guide/runtime_control.rst @@ -1443,6 +1443,7 @@ recommended for everyday use! .. rts-flag:: -Dr DEBUG: sparks .. rts-flag:: -DC DEBUG: compact .. rts-flag:: -Dk DEBUG: continuation +.. rts-flag:: -Do DEBUG: iomanager Debug messages will be sent to the binary event log file instead of stdout if the :rts-flag:`-l ⟨flags⟩` option is added. This might be useful diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index e74499954badb1c1497fc39b5ba6c674f23c571d..b0c6b13beb1ba85e55c17f81484d4d9b4a1e5497 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -486,6 +486,7 @@ usage_text[] = { " -Dr DEBUG: sparks", " -DC DEBUG: compact", " -Dk DEBUG: continuation", +" -Do DEBUG: iomanager", "", " NOTE: DEBUG events are sent to stderr by default; add -l to create a", " binary event log file instead.", @@ -2259,6 +2260,9 @@ static void read_debug_flags(const char* arg) case 'k': RtsFlags.DebugFlags.continuation = true; break; + case 'o': + RtsFlags.DebugFlags.iomanager = true; + break; default: bad_option( arg ); } diff --git a/rts/Trace.h b/rts/Trace.h index a8a51ebe9dd85fb7a7be4e0f64d4f190797f71cb..baca2d5a964b0696214da79f0e6b8729a4dc0612 100644 --- a/rts/Trace.h +++ b/rts/Trace.h @@ -68,6 +68,7 @@ enum CapsetType { CapsetTypeCustom = CAPSET_TYPE_CUSTOM, #define DEBUG_sparks RtsFlags.DebugFlags.sparks #define DEBUG_compact RtsFlags.DebugFlags.compact #define DEBUG_continuation RtsFlags.DebugFlags.continuation +#define DEBUG_iomanager RtsFlags.DebugFlags.iomanager // Event-enabled flags // These semantically booleans but we use a dense packing to minimize their diff --git a/rts/include/rts/Flags.h b/rts/include/rts/Flags.h index ca9520ef8a88c451cf4d9b28d04e41f153e8bdda..63ffccd2f54138ad39fcd369123e8f5170ddd026 100644 --- a/rts/include/rts/Flags.h +++ b/rts/include/rts/Flags.h @@ -117,6 +117,7 @@ typedef struct _DEBUG_FLAGS { bool numa; /* '--debug-numa' */ bool compact; /* 'C' */ bool continuation; /* 'k' */ + bool iomanager; /* 'o' */ } DEBUG_FLAGS; /* See Note [Synchronization of flags and base APIs] */