Choosing between wide and fast modes

TraceEvent() gives you much finer control over wide and fast mode than you can get with tracelogger, which can simply set the mode for all events in all traced classes. Using TraceEvent(), you can set fast and wide mode for all classes, a specific class, or a specific event in a class:

  • To set the mode for all classes, use the _NTO_TRACE_SETALLCLASSESWIDE or _NTO_TRACE_SETALLCLASSESFAST command. These commands don't require any additional arguments:
    TraceEvent( _NTO_TRACE_SETALLCLASSESWIDE );
    TraceEvent( _NTO_TRACE_SETALLCLASSESFAST );
    
  • To set the mode for all events in a class, use the _NTO_TRACE_SETCLASSFAST or _NTO_TRACE_SETCLASSWIDE command. These commands require a class as an additional argument:
    TraceEvent(_NTO_TRACE_SETCLASSFAST, int class);
    TraceEvent(_NTO_TRACE_SETCLASSWIDE, int class);
    

    For example:

    TraceEvent(_NTO_TRACE_SETCLASSWIDE, _NTO_TRACE_KERCALLENTER);
    
  • To set the mode for a specific event in a class, use the _NTO_TRACE_SETEVENTFAST or _NTO_TRACE_SETEVENTWIDE command, specifying the class, followed by the event:
    TraceEvent(_NTO_TRACE_SETEVENTFAST, int class, int event)
    TraceEvent(_NTO_TRACE_SETEVENTWIDE, int class, int event)
    

    For example:

    TraceEvent(_NTO_TRACE_SETEVENTFAST, _NTO_TRACE_KERCALLENTER,
               __KER_INTERRUPT_ATTACH);
    
Page updated: