úÎVµS,(      !"#$%&'None#9;T,(1Simple channels that don't support real blocking.)%The state for an exponential backoff.*Maximum nanoseconds to wait.ÖWe allow logging in O(1) time in String format. In practice string conversions are not that important, because only *thunks* should be logged; the thread printing the logs should deal with forcing those thunks.›This sort of message is chatter and NOT meant to participate in the scheduler-testing framework. | ByteStrMsg { lvl::Int, bbody::ByteString }cSeveral different ways we know to wait for quiescence in the concurrent mutator before proceeding.fUNFINISHED: Dynamically track tasks/workers. The num workers starts at 1 and then is modified with  incrTasks and  decrTasks.BA fixed set of threads must check-in each round before proceeding. æIn this mode, logging calls are non-blocking and return immediately, rather than waiting on a central coordinator. This is what we want if we're simply printing debugging output, not controlling the schedule for stress testing. %How many threads total must check in? ¨Poll how many threads WON'T participate this round. After all *productive* threads have checked in this number must grow to eventually include all other threads.+aA single thread attempting to log a message. It only unblocks when the attached MVar is filled. HA Logger coordinates a set of threads that print debug logging messages.‰Loggers are abstract objects supporting only the operations provided by this module and the non-hidden fields of the Logger data type.,k(private) The thread that chooses which action to unblock next and handles printing to the screen as well. BThe minimum level of messages accepted by this logger (usually 0).6The maximum level of messages accepted by this logger.-?The serialized queue of writers attempting to log dbg messages.](public) A method to complete flushing, close down the helper thread, and generally wrap up..;Where to send output. If empty, messages dropped entirely./‚(private) In-memory buffer of messages, if OutputInMemory is selected. This is stored in reverse-temporal order during execution.BClear buffered log messages and return in the order they occurred.:DebugConfig: what level of debugging support is activated?ùInclusive range of debug messages to accept (i.e. filter on priority level). If Nothing, use the default level, which is (0,N) where N is controlled by the DEBUG environment variable. The convention is to use Just (0,0) to disable logging.$Destinations for debug log messages.jIn additional to logging debug messages, control thread interleaving at these points when this is True.A destination for log messagesOutput via GHC's  traceEvent runtime events.*Printed human-readable output to a handle.7Accumulate output in memory and flush when appropriate.5Convert just the body of the log message to a string.0'Maximum wait for the backoff mechanism.•Create a new logger, which includes forking a coordinator thread. Takes as argument the number of worker threads participating in the computation.1wRun a logging coordinator thread until completion/shutdown. This coordinator manages the interleaving of events that 2 $Undocumented, internal functionalityWSuppress echo'ing of messages that don't actually count for the schedule fuzz testing.0Log a string message at a given verbosity level.4Log a bytestring message at a given verbosity level..Log a Text message at a given verbosity level.uWrite a log message from the current thread, IF the level of the message falls into the range accepted by the given  %, otherwise, the message is ignored.36Create an object used for exponentential backoff; see 4.42Perform the backoff, possibly delaying the thread.5Non-blocking read.60Always succeeds. Asynchronous write to channel. cDebugging flag shared by several modules. This is activated by setting the environment variable  DEBUG=1..5.By convention  DEBUG=100£ turns on full sequentialization of the program and control over the interleavings in concurrent code, enabling systematic debugging of concurrency problems.!´This codifies the convention of keeping fine-grained per-memory-modification messages at higher debug levels. These are used for fuzz testing concurrent interleavings. Setting  in the Y to this value should give you only the messages necessary for stress testing schedules.@()78*9 +:;<= >, -./?0@IWhat inclusive range of messages do we accept? Defaults to `(0,dbgLvl)`.%Where do we write debugging messages?iDo we wait for workers before proceeding sequentially but randomly (fuzz testing event interleavings)?16By which method do we wait for all workers to quiesce?WSet to True (by someone other than the coordinator) when the system should shutdown.5Input queue where the coordinator recvs dbg messages 6Output queue where the coordinator writes out messagesWhere to write log messagesA2B3Maximum delay, nanoseconds4C56D !""   !# !  ()78*9 +:;<= >, -./?0@1A2B34C56D !"E      !"#$%&'()*+,-./01234567*89,:;<=>?@ABC'tslogger-0.2.0.0-GLQqoWNBIIoCH1eKCqgqD2System.Log.TSLoggerLogMsgStrMsg OffTheRecordlvlbodyobodWaitMode WaitDynamicWaitNumDontWait numThreads downThreadsLoggerminLvlmaxLvlcloseIt flushLogsDbgCfgdbgRangedbgDests dbgSchedulingOutDest OutputEventsOutputToOutputInMemorymsgBody newLoggerlogStrLnlogByteStringLn logTextLnlogOndbgLvldefaultMemDbgRange$fShowWaitMode $fShowLogMsg $fEqLogMsg $fOrdLogMsg $fReadLogMsg $fShowBackoffSmplChanBackoffcapWriter coordinator checkPoint loutDestsloggedmaxWaitrunCoordinatorsilenceOffTheRecord newBackoffbackofftryReadSmplChan writeSmplChancurrent totalWaitwhocontinuemsg waitWorkerscatchAllisOffTheRecord dummyMVar newSmplChantheEnv