| 1 |
.. SPDX-License-Identifier: BSD-2-Clause |
| 2 |
.. |
| 3 |
.. Copyright (C) 2024 Linutronix GmbH |
| 4 |
.. Author Kurt Kanzenbach <[email protected]> |
| 5 |
.. |
| 6 |
.. Testbench documentation debug file. |
| 7 |
.. |
| 8 |
|
| 9 |
Debug |
| 10 |
===== |
| 11 |
|
| 12 |
Debugging of real time outliers |
| 13 |
------------------------------- |
| 14 |
|
| 15 |
In case test runs indicate outliers or unusual round-trip times in the statistics, Linux ``ftrace`` |
| 16 |
can be used to find the root cause. This can be done like this: |
| 17 |
|
| 18 |
.. code:: bash |
| 19 |
|
| 20 |
# Start tracing |
| 21 |
trace-cmd start -e sched -e syscalls -e irq |
| 22 |
|
| 23 |
# Set DebugStopTraceOnOutlier to True in reference.yaml or mirror.yaml configuration file |
| 24 |
|
| 25 |
# Start reference and mirror as usual |
| 26 |
|
| 27 |
# The reference application will stop after a round-trip time outlier is hit and will output an |
| 28 |
# information message about it |
| 29 |
|
| 30 |
# The mirror application will stop after a oneway time outlier is hit and will output an |
| 31 |
# information message about it |
| 32 |
|
| 33 |
# Get the trace |
| 34 |
trace-cmd extract -a |
| 35 |
|
| 36 |
# Copy trace.dat to development machine |
| 37 |
|
| 38 |
# Analyze trace.dat with kernelshark or tracecompass to find the issue |