Control loop timing validation

Didn’t I say not use user string events :slight_smile:

Honestly, they are a bad idea™ (as in bad idea jeans, level of a bad idea… vids.myspace.com/index.cfm?fusea … 1813333988)

It will show in the timeline, but only as a hatch mark across the timeline.

As I mentioned earlier, if you use _NTO_TRACE_INSERTCUSEREVENT rather than a string, you can supply the xml that describes your structure to the IDE, and it will decode it all nice like, in the “Trace Event” view.

I got the tau build now btw :slight_smile: I’ll change the string event, and searching for docs on how to build the XML file.

Does anyone know how to build an XML to parse the trace event file? I can not find any docs about this subject. I want my user events to show up in the time line.

You have to be a bit careful when interpreting the results of mapped mode, however, since it essentially does a memcpy of the kernel buffer, running in the kernel context, which no logged event, which will mean an inexplicable delay in your log. If you are concentracing on jitter this can be very confusing!

If you run in normal mode, then at least you can see the scheduling activity of tracelogger, but you will have to run it at a high priority to not drop buffers.

Note that tracelogger has way lower overhead than qconn, even in normal mode.

Colin

Here is a simple example for:

struct {
 char   mynum1;
}

Where the event ID you give it is 8.

<?xml version="1.0" encoding="UTF-8" ?>

<eventdefinitions>
<eventclass id="0x1f" name="User" >
<event id="0x8" name="string" sformat="%Dmynum1" />
</eventclass>
</eventdefinitions>

If you wanted to add a second number to the above struct like this:

struct {
  int    mynum1;
  int    mynum2;
}

The xml would look like this…

<?xml version="1.0" encoding="UTF-8" ?>

<eventdefinitions>
<eventclass id="0x1f" name="User" >
<event id="0x8" name="string" sformat="%Dmynum1 %Dmynum2" />
</eventclass>
</eventdefinitions>

Basically it is a “printf style string” that describes the data in the struct. If you keep everything to 4 byte ints, then it is pretty easy. You can identify the name of the variable just as you see.

Colin, do you know how many the buffers are copied at one time?

Surely, this is negligible, unless you are focussed on very small units of jitter (i.e. sub-microsecond on modern x86 h/w), no?