User Tools

Site Tools


realtime:documentation:howto:debugging:smi-latency:cyclictest-tracing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
realtime:documentation:howto:debugging:smi-latency:cyclictest-tracing [2018/08/22 10:27]
ebugden [Tracing] Put all ftrace option modification stuff together
realtime:documentation:howto:debugging:smi-latency:cyclictest-tracing [2018/08/23 15:24] (current)
ebugden [Tracing] Add warning about cyclictest smi count
Line 16: Line 16:
  
 Once the CPUs are sure to never idle, a trace can be obtained using Cyclictest with the break trace and the function tracing options. The break trace option (--breaktrace) will stop tracing and end Cyclictest if it detects a latency that is longer than a specified limit. This option is intended to be used with one of the Cyclictest options that enables a specific Ftrace tracer. For this SMI detection technique, the function tracing option (--ftrace) is used so that the trace includes all the kernel function calls. Once the CPUs are sure to never idle, a trace can be obtained using Cyclictest with the break trace and the function tracing options. The break trace option (--breaktrace) will stop tracing and end Cyclictest if it detects a latency that is longer than a specified limit. This option is intended to be used with one of the Cyclictest options that enables a specific Ftrace tracer. For this SMI detection technique, the function tracing option (--ftrace) is used so that the trace includes all the kernel function calls.
 +
 +The steps for obtaining a relevant trace using Cyclictest are explained in detail [[realtime:​documentation:​howto:​tools:​cyclictest:​tracing|here]]. Since the desired tracer (function tracer) has already been selected, the section on the linked page about selecting instrumentation can be skipped.
  
 <WRAP center round info 60%> <WRAP center round info 60%>
-Ftrace might not behave the same way after using the Cyclictest break trace option.  +When using the breaktrace ​option ​along with the [[realtime:​documentation:​howto:​tools:​cyclictest:​options:smi-count|SMI count]] option, the SMI count shown in the Cyclictest output may not increment even if the tracing ​was stopped after a latency caused by an SMI. This is probably because Cyclictest is stopped before ​the visual output of the SMI count is updated.
-When this option is used, Cyclictest changes some Ftrace options to get the desired trace format. The Ftrace options that were set before are not restored after Cyclictest runs. +
-</​WRAP>​ +
- +
-Below is an example of a Cyclictest command that includes the break trace and function tracing options. The '#'​ before the command is to indicate that the command must be run as root, with sudo, or as a member of the realtime group. +
- +
-<code bash> +
-# cyclictest --mlockall --smp --priority=80 --interval=200 --distance=0 --breaktrace=150 --ftrace +
-</​code>​  +
- +
-The combination of options in this example is not appropriate for every test situation. More details about how to choose the right options for measuring a specific latency on a given system can be found in the Cyclictest documentation ​[[realtime:​documentation:​howto:​tools:​cyclictest:​test-design#​option-selection|here]]+
- +
-<WRAP center round important 60%> +
-Remember to adjust for the tracing ​overhead when specifying ​the Cyclictest break trace limit.+
 </​WRAP>​ </​WRAP>​
  
-Function ​tracing ​slows down the execution of the programso the target latency will most likely be longer ​after enabling tracingIt is important ​to adjust for this additional overhead because otherwise ​the tracing may not break on the correct latency and the trace may not contain the latency ​that was supposed to be observed. More details about how to adjust the break trace limit can be found in the documentation about debugging using Cyclictest [[realtime:​documentation:​howto:​tools:​cyclictest:​tracing#​measuring-the-tracing-overhead|here]].+To make sure that the tracing ​stopped at the correct timelook at the break value specified below the Cyclictest output ​after the test stopsThis value should correspond ​to the expected SMI related latency value even if the SMI count on the Cyclictest output is not updated. The latency ​should also have occurred ​in the same conditions as the expected SMI latency.
  
 ===== Analysis ===== ===== Analysis =====
realtime/documentation/howto/debugging/smi-latency/cyclictest-tracing.1534933656.txt.gz · Last modified: 2018/08/22 10:27 by ebugden