Download NightTrace Manual
Transcript
Tracing the Kernel When ntfilter converts a KernelTrace trace event file into a NightTrace trace event file , it r em ove s the TR_IO_VNODE, TR_ALT_INT_DISPATCH, a nd TR_PROCESS_NAME trace events. TR_ALT_INT_DISPATCH events are converted to appropriate TR_INTERRUPT_ENTRY and/or TR_INTERRUPT_EXIT trace points. For each TR_PROCESS_NAME event, ntfilter extracts the process name from the event and adds the name to its process name table which is subsequently written to the vectors file. The following sections discuss the trace events that you will see in ntrace as a result of logging the default kernel trace points. Context Switch Trace Event 11 There is only one context switch trace event: TR_SWITCHIN arg1 This trace event is logged whenever a process has been switched in and is ready to be run on a specific CPU. Because only one process can run on a given CPU at a time, this trace event also signifies that the process that was running on the CPU immediately prior to the context switch trace event has been switched out and can no longer run. This trace event has one argument: arg1 The numeric 32-bit global process identifier (PID) of the process being switched in. This information is redundant, since it is identical to the PID that is already associated with the trace event. A PID of 0 indicates that the CPU is idle. The 32-bit global process identifier uniquely identifies the running process on the system. This identifier is identical to the return value of the _lwp_global_self() system call. See “pid()” on page 9-22. Interrupt Trace Events 11 There are two trace events associated with interrupts: TR_INTERRUPT_ENTRY arg1 arg2 arg3 This trace event is logged whenever an interrupt is entered. It has three arguments: arg1 The interrupt vector number that indicates the type of interrupt. This is an index into the vector string table that is contained within the vectors file generated by the ntfilter tool. For more information about the vector string table, see “Kernel String Tables” on page 11-32. For more information about the ntfilter tool, see “Converting KernelTrace Trace Event Files with ntfilter” on page 11-21. arg2 The interrupt nesting level used by the pre-defined kernel pages to graph the different heights associated with the nesting level. This 11-3