Private.CtfSourceThis library is used to write event traces in mirage-profile's CTF format.
Each thread/fiber/promise is identified by a unique ID.
Libraries and applications can use these functions to make the traces more useful.
label msg attaches text msg to the current thread.
note_increase counter delta records that counter increased by delta. If delta is negative, this records a decrease.
note_counter_value counter value records that counter is now value.
should_resolve id records that id is expected to resolve, and should be highlighted if it doesn't.
These are normally only called by the scheduler.
note_created t id ty records the creation of id.
note_read src records that promise src's value was read.
note_try_read src records that the current thread wants to read from src (which is not currently ready).
note_hiatus r records that the system will sleep for reason r.
note_resume id records that the system has resumed (used after note_hiatus), and is now running id.
note_fork () records that a new thread has been forked and returns a fresh ID for it.
note_resolved id ~ex records that id is now resolved. If ex = None then id was successful, otherwise it failed with exception ex.