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:
The counter attribute must be a unique identifier code, and must begin with the ftrace_ prefix.
The tracepoint attribute is the source ftrace event to use in the form <group>/<event>, which equates to the path /sys/kernel/debug/tracing/events/<group>/<event> where the tracepoint is defined.
The arg attribute is the event field to read the counter from.
The path and regex attributes do not exist.
Note
You can only generate one Streamline counter per tracepoint.