Trace events are identified by channels, much like an
oscilloscope displays multiple trace channels. DbgOut can store up to
511 separate channels. These channels are identifed by only the
channel ID, which must be unique across all clients. Each channel
can be assigned a text name and type.
Trace channels require a bit more set up work. The trace channels
are global across all clients and the assignment of channels needs to
be coordinated. I can maintain my own table of channels to make sure
the same channel ID is never reused, or an unused channel ID can be
requested from the DbgOut server.
If the channels are defined using constant values, the user only
needs to set the text name for each channel. For example, I
Trace: Setting the channel name:
#define DBGTRACE_MSGPROC 1
DbgTraceNameA(DBGTRACE_MSGPROC,DBGTRACE_TYPE_HILO,"MsgProc");
Alternatively, I can set the channels dynamically by letting DbgOut
allocate unused channels and storing the allocated channels for use
later.
Channel events are displayed differently depending on which trace
type I assign.
DBGTRACE_TYPE_HILO: On/Off or In/Out events that store only
the time and a binary state and are displayed as a HIGH/LOW trace. Use
events to record the time spent inside a function. Events require the
least amount of data and are the most efficient.
DBGTRACE_TYPE_PLOT: Data events that store the time and a
32bit value that is displayed as a Time/Value plot. These events are
used to record things such as the amount of available memory over
time.
DBGTRACE_TYPE_STATE: Data events that store the time and a
32bit value that labels a time range with the state value. The channel
can be linked to a ID table that lets the viewer translate the state
number to friendly text.
Reference
WebV7 (C)2018 nlited | Rendered by tikope in 33.483ms | 44.220.184.63