ftrace event counters

This topic describes the data that gatord reads from the host ftrace event counters.

The data that is stored in an ftrace tracepoint event can also be read as each event is emitted. Each trace event accessible by perf has a self-defining binary structure, which /sys/kernel/debug/tracing/events/<group>/<event>/format defines. The counter is read from the field in this binary structure that the arg attribute in the XML defines.

ftrace event counters use the event XML syntax that is shown in this example:

<?xml version="1.0" encoding="UTF-8"?>
<category name="Ftrace">
  <event counter="ftrace_power_cpu_idle"
         tracepoint="power/cpu_idle"
         arg="state"
         title="Power"
         name="cpu_idle"
         description="Number of times cpu_idle is entered or exited" />
</category>

The XML syntax for ftrace events is similar to the file system events, but has the following differences:

Note

You can only generate one Streamline counter per tracepoint.