This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
realtime:documentation:howto:debugging:debug-steps [2018/08/21 08:54] ebugden Clarify sentence |
realtime:documentation:howto:debugging:debug-steps [2018/08/21 10:54] ebugden [Measure the length] Update link |
||
---|---|---|---|
Line 23: | Line 23: | ||
If it is possible, also pay attention to when the latency happens. If the measured latencies are of a similar length and they happen in similar situations, then they are most likely caused by the same issue. | If it is possible, also pay attention to when the latency happens. If the measured latencies are of a similar length and they happen in similar situations, then they are most likely caused by the same issue. | ||
- | A tool that is frequently used for measuring latencies is [[realtime:documentation:howto:debugging:cyclictest:start|Cyclictest]]. Using Cyclictest correctly can be challenging at first, but if the tool is configured correctly and is run for a sufficient amount of time, then it can provide reasonably accurate measurements for most latencies. The tool does have some limitations which are described in various places in its documentation such as on the Cyclictest [[realtime:documentation:howto:debugging:cyclictest:test-design:start|test design]] page. | + | A tool that is frequently used for measuring latencies is [[realtime:documentation:howto:tools:cyclictest:start|Cyclictest]]. Using Cyclictest correctly can be challenging at first, but if the tool is configured correctly and is run for a sufficient amount of time, then it can provide reasonably accurate measurements for most latencies. The tool does have some limitations which are described in various places in its documentation such as on the Cyclictest [[realtime:documentation:howto:tools:cyclictest:test-design|test design]] page. |
===== Isolate the source ===== | ===== Isolate the source ===== | ||
Line 43: | Line 43: | ||
Having irrelevant information in the trace makes it more difficult to read, so it is good practice to stop the tracing immediately after the latency occurs. This prevents the trace from becoming longer than it needs to be. | Having irrelevant information in the trace makes it more difficult to read, so it is good practice to stop the tracing immediately after the latency occurs. This prevents the trace from becoming longer than it needs to be. | ||
- | One way to do this is by using [[realtime:documentation:howto:debugging:cyclictest:start|Cyclictest]]. Cyclictest has an option that causes tracing to stop after a certain specified latency limit is exceeded. There are instructions in the documentation about how to adjust the latency detection limit as a function of the tracing overhead so that tracing is stopped at the correct time. Additionally, several different types of Ftrace tracers can be used through Cyclictest. | + | One way to do this is by using [[realtime:documentation:howto:tools:cyclictest:tracing|Cyclictest]]. Cyclictest has an option that causes tracing to stop after a certain specified latency limit is exceeded. There are instructions in the documentation about how to adjust the latency detection limit as a function of the tracing overhead so that tracing is stopped at the correct time. Additionally, several different types of Ftrace tracers can be used through Cyclictest. |
Ftrace can also be used by writing to the files in tracefs that are used to control the tracing (e.g. current_tracer, tracing_on). The writes to the files can be added directly to the programs that are running on the system. | Ftrace can also be used by writing to the files in tracefs that are used to control the tracing (e.g. current_tracer, tracing_on). The writes to the files can be added directly to the programs that are running on the system. |