[okl4-developer] What does the "STRING_major" mean?

Guanghui, Cheng cheng.guanghui.ml at gmail.com
Wed Apr 22 12:44:22 EST 2009


On Wednesday 22 April 2009 02:07:36 am Josh Matthews wrote:
> 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).
	Thanks for your reply.
	In the list there are several kinds of trace IDs like this:	event, string, 
interrupt, 	system call.  I don't know what the string means. Can you give me 
some hints?
	Thanks again.
	Best Wishes.
									Cheng Guanghui



More information about the Developer mailing list