Hi Cheng,
On Mon, April 20, 2009 10:44 pm, Guanghui, Cheng wrote:
> In the pistachio/include/traceids.h/traceids.h file, there is a enum :
> enum trace_major_ids {
> EVENT_major = 0,
> STRING_major = 1,
> INTERRUPT_major = 2,
>
> SYSCALL_IPC_major = 3,
> ... ...
> }
>
> I want to know what the STRING means? STRING_IPC or whatever.
This functionality is all related to the tracebuffers feature. Each kernel
event is assigned a unique trace identifier in enum trace_ids.
Additionally, each kernel event is assigned to a group in enum
trace_major_ids (as you copied above).
Calls to tb_log_trace, passing the major (group) identifier and the event
identifier (and potentially other data), are made by the kernel on the
occurrence of each event (in debug and tracebuffer builds of the kernel
only).
The major identifier is useful as it allows you to mask out all events of
particular groups that you are not interested in and focus only on those
groups that you are (see field log_mask in trace_buffer_t, in file
pistachio/include/tracebuffer.h, and see how macro TBUF_RECORD will only
log the event if the bit corresponding to the major number of the event is
active in the log mask).
Best regards,
Josh
_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer