Import raw perf data

Streamline can import event data that is created using the Linux perf command-line tools. This event data is then converted to APC format, which can be visualized in the Timeline view.

The perf record command, one of the Linux perf command-line tools, captures an event trace.

To import the event trace, click Import Capture File(s)... import and select the file containing the event trace. The imported event data is converted to APC format, which can be displayed in the different views.

Counters that are in the default events.xml file, which gatord recognizes, are configured as though gatord captured them. Counters that gatord does not recognize are displayed in the default style. If this style is not appropriate for a particular counter, use the chart configuration panel to change the default settings.

Tracepoint events that are not explicitly recognized in events are treated as event counters. The value of the counter is the number of times the tracepoint event occurred. Heat Map mode and Core Map mode require sched:sched_switch tracepoint to be captured.

To emulate gatord, do a global capture of all cores with hardware events configured to be sampled into a group using:

perf record -a -c 1 -e "{sched:sched_switch, cpu-clock/period=<SAMPLE_PERIOD>/, <EVENT_1>, <EVENT_2>...<EVENT_N>}:S"

The parameters for this command are as follows:

sched:sched_switch

Causes the scheduler information to be captured as required for Heat Map mode and Core Map mode, and triggers a sample of the counters on each context switch.

cpu-clock/period=<SAMPLE_PERIOD>/

Configures a periodic sampling event, causing the counters in the group to be sampled periodically. Set this parameter according to the Sample rate as follows:

Sample rate: Normal

cpu_clock/period=1000000/

Sample rate: Low

cpu_clock/period=10000000/

Sample rate: None

Do not include this parameter.

<EVENT_1> ... <EVENT_N>

The counters to be sampled.

An example of this command in use could be:

perf record -a -c 1 -e "{sched:sched_switch, cpu-clock/period=10000000/, branch-instructions, branch-misses}:S"

Extra counters, particularly tracepoints, do not need to be part of the sample group. Sometimes they cannot be part of the same group as perf does not mix counters from different PMUs.

An example for multiple different groups:

perf record -a -c 1 -e "{sched:sched_switch, cpu-clock/period=10000000/, branch-instructions, branch-misses}:S, {cpu-clock/period=10000000/, alignment-faults, page-faults}:S"

An example with more, generally low frequency, events:

perf record -a -c 1 -e "{sched:sched_switch, cpu-clock/period=10000000/, branch-instructions, branch-misses}:S, power:cpu_frequency:S"

Other supported combinations of events and flags are as follows:

Frequency-based sampling

perf record -a -F 1000 -e branch-misses

Single process sampling

perf record -e instructions -- dmesg

The content of the data that is captured using these commands is not as complete as the data captured in the earlier examples. Some of the user interface features are missing as a result. For example, Heat Map mode is incomplete.