Lines Matching +full:stream +full:- +full:mode

10 your application and allows :ref:`tools` running on a host to visualize the inner-working of
13 Every system has application-specific events to trace out. Historically,
16 1. Determining the application-specific payload,
17 2. Choosing suitable serialization-format,
18 3. Writing the on-target serialization code,
20 5. Writing the PC-side deserializer/parser,
21 6. Writing custom ad-hoc tools for filtering and presentation.
57 formats. This enables tool reuse, of which line-textual (babeltrace) and
61 See `CTF - A Flexible, High-performance Binary Trace Format
71 --------------------
76 - perform actions at transaction-start (e.g. mutex-lock),
77 - process each field in some way (e.g. sync-push emit, concat, enqueue to
78 thread-bound FIFO),
79 - perform actions at transaction-stop (e.g. mutex-release, emit of concat
82 CTF Top-Layer Example
83 ----------------------
100 internally and statically at compile-time in the bottom-layer.
127 :figclass: align-center
136 Percepio TraceRecorder and Stream Ports
137 ---------------------------------------
142 .. code-block:: cfg
149 * Enable :menuselection:`Subsystems and OS Services --> Tracing Support`
150 * Under :menuselection:`Subsystems and OS Services --> Tracing Support --> Tracing Format`, select
154 is to select the right "stream port". This specifies how to output the trace data.
155 As of July 2024, the following stream ports are available in the Zephyr configuration system:
158 * **RTT**: Trace streaming via Segger RTT on J-Link debug probes.
159 * **ITM**: Trace streaming via the ITM function on Arm Cortex-M devices.
162 Select the stream port in menuconfig under
163 :menuselection:`Modules --> percepio --> TraceRecorder --> Stream Port`.
167 .. code-block:: cfg
176 The stream port modules have individual configuration options. In menuconfig these are found
177 under :menuselection:`Modules --> percepio --> TraceRecorder --> (Stream Port) Config`.
178 The most important options for each stream port are described below.
181 ------------------------------------------
183 The "Ring Buffer" stream port keeps the trace data in a RAM buffer on the device.
195 .. code-block:: cfg
205 * Enable :menuselection:`Subsystems and OS Services --> Tracing Support`
206 * Under :menuselection:`Subsystems and OS Services --> Tracing Support --> Tracing Format`, select
208 * Under :menuselection:`Modules --> percepio --> TraceRecorder --> Recorder Start Mode`, select
210 * Under :menuselection:`Modules --> percepio --> TraceRecorder --> Stream Port`, select
212 * Under :menuselection:`Modules --> percepio --> TraceRecorder --> Ring Buffer Config --> Buffer Si…
219 :menuselection:`Subsystems and OS Services --> Tracing Support --> Tracing Configuration`.
227 specified. Open this file in Tracealyzer by selecting :menuselection:`File --> Open --> Open File`.
230 -------------------------------------
232 Tracealyzer has built-in support for SEGGER RTT to receive trace data using a J-Link probe.
236 .. code-block:: cfg
246 * Enable :menuselection:`Subsystems and OS Services --> Tracing Support`
247 * Under :menuselection:`Subsystems and OS Services --> Tracing Support --> Tracing Format`, select
249 * Under :menuselection:`Modules --> percepio --> TraceRecorder --> Recorder Start Mode`, select
251 * Under :menuselection:`Modules --> percepio --> TraceRecorder --> Stream Port`, select
253 * Under :menuselection:`Modules --> percepio --> TraceRecorder --> RTT Config`, set the size of the
258 also on onboard J-Link debuggers (they are not as fast as the stand-alone probes).
259 If you are tight on RAM, you may consider reducing this setting. If using a regular J-Link probe
263 See Creating and Loading Traces -> Percepio TraceRecorder -> Using TraceRecorder v4.6 or later ->
264 Stream ports (or search for RTT).
267 ----------------------------------
269 This stream port is for Arm Cortex-M devices featuring the ITM unit. It is recommended to use a
270 fast debug probe that allows for SWO speeds of 10 MHz or higher. To use this stream port,
273 .. code-block:: cfg
283 * Enable :menuselection:`Subsystems and OS Services --> Tracing Support`
284 * Under :menuselection:`Subsystems and OS Services --> Tracing Support --> Tracing Format`, select
286 * Under :menuselection:`Modules --> percepio --> TraceRecorder --> Recorder Start Mode`, select
288 * Under :menuselection:`Modules --> percepio --> TraceRecorder --> Stream Port`, select
290 * Under :menuselection:`Modules --> percepio --> TraceRecorder --> ITM Config`, set the ITM port to
293 The main setting for the ITM stream port is the ITM port (0-31). A dedicated channel is needed
299 The host-side setup depends on what debug probe you are using. Learn more in the Tracealyzer
301 …selection:`Creating and Loading Traces --> Percepio TraceRecorder --> Using TraceRecorder v4.6 or …
304 ------------------------------------------
306 This stream port is designed for Zephyr tracing in QEMU. This can be an easy way to get started
310 .. code-block:: cfg
320 * Enable :menuselection:`General Architecture Options --> Semihosting support for Arm and RISC-V ta…
321 * Enable :menuselection:`Subsystems and OS Services --> Tracing Support`
322 * Under :menuselection:`Subsystems and OS Services --> Tracing Support --> Tracing Format`, select
324 * Under :menuselection:`Modules --> percepio --> TraceRecorder --> Recorder Start Mode`, select
326 * Under :menuselection:`Modules --> percepio --> TraceRecorder --> Stream Port`, select
331 :menuselection:`File --> Open --> Open File`.
333 Recorder Start Mode
334 -------------------
336 You may have noticed the :guilabel:`Recorder Start Mode` option in the Tracealyzer examples above.
339 Ring Buffer and Semihost stream ports.
346 Custom Stream Ports for Tracealyzer
347 -----------------------------------
349 The stream ports are small modules within TraceRecorder that define what functions to call to
351 It is fairly easy to make custom stream ports to implement your own data transport and
353 COM ports, named pipes and more. Note that additional stream port modules are available in the
357 -------------
367 Zephyr provides built-in support for `SEGGER SystemView`_ that can be enabled in
372 transports, for example UART or using snapshot mode (both still not
376 :ref:`snippet-rtt-tracing` to your build command:
378 .. zephyr-app-commands::
379 :zephyr-app: samples/synchronization
381 :snippets: rtt-tracing
385 SystemView can also be used for post-mortem tracing, which can be enabled with
386 :kconfig:option:`CONFIG_SEGGER_SYSVIEW_POST_MORTEM_MODE`. In this mode, a debugger can
393 :figclass: align-center
396 .. _SEGGER SystemView: https://www.segger.com/products/development-tools/systemview/
416 `Advanced Trouble-shooting Of Real-time Systems
420 User-Defined Tracing
428 - simple toggling of GPIO for external scope tracing while minimizing extra cpu load
429 - generating/outputting trace data in a non-standard or proprietary format that can
434 .. code-block:: c
473 .. zephyr-app-commands::
475 :zephyr-app: samples/subsys/tracing
477 :gen-args: -DCONF_FILE=prj_native_ctf.conf
480 You can then run the resulting binary with the option ``-trace-file`` to generate
485 ./build/zephyr/zephyr.exe -trace-file=data/channel0_0
508 Currently, the top-layer provided here is quite simple and bare-bones,
512 Linux's LTTng and change the top-layer to serialize to the same format.
514 for Linux. Alternatively, LTTng-analyses in TraceCompass could be
516 visibility of Zephyr in a target-agnostic and open source way.
522 - Atomic Push/Produce/Write/Enqueue:
524 - synchronous:
525 means data-transmission has completed with the return of the
528 - asynchronous:
529 means data-transmission is pending or ongoing with the return
533 - buffered:
534 means data-transmissions are copied and grouped together to
536 dequeue) or jitter-mitigation (steady dequeue).
539 - sync unbuffered
540 E.g. PIO via GPIOs having steady stream, no extra FIFO memory needed.
544 - sync buffered
546 Blockingly burst the FIFO when its buffer-waterlevel exceeds threshold.
549 - async unbuffered
550 E.g. DMA, or zero-copying in shared memory.
553 - async buffered
558 - Atomic Pull/Consume/Read/Dequeue:
560 - synchronous:
561 means data-reception has completed with the return of the call.
563 - asynchronous:
564 means data-reception is pending or ongoing with the return of
568 - buffered:
569 means data is copied-in in larger chunks than request-size.
570 Usually for amortizing wait-time.
573 - sync unbuffered
574 E.g. Blocking read-call, ``fread()`` or SPI-read, zero-copying in shared
577 - sync buffered
578 E.g. Blocking read-call with caching applied.
581 - async unbuffered
582 E.g. zero-copying in shared memory.
585 - async buffered
593 - The system has non-atomic write and one shared channel
598 - The system has non-atomic write but many channels
599 E.g. Multi-UART. Lock-free if the bottom-layer maps each Zephyr
605 - The system has atomic write but one shared channel
612 - The system has atomic write and many channels
613 E.g. native_sim or board with multi-channel DMA. Lock-free.
635 Those global variables are the head of each list - they can be traversed