# Introduction to Zephyr OS Tracing and Profiling

DevFeed: [Introduction to Zephyr OS Tracing and Profiling](<https://devfeed.tech/articles/introduction-to-zephyr-os-tracing-and-profiling-13672.md>)

Original publisher: [Read original article](<https://developer.espressif.com/blog/2024/11/zephyr-tracing-and-profiling/>)

Author: John Lee

Published: 2024-11-15T00:00:00Z

Content type: tutorial

Language: en

Sources: [Blog on Developer Portal](<https://devfeed.tech/sources/blog-on-developer-portal.md>)

Topics: [Zephyr RTOS](<https://devfeed.tech/topics/zephyr-rtos.md>), [Embedded Software Dev](<https://devfeed.tech/topics/embedded-software-dev.md>), [tracing](<https://devfeed.tech/topics/tracing.md>), [Embedded Systems](<https://devfeed.tech/topics/embedded-systems.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [ESP32](<https://devfeed.tech/topics/esp32.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [blog](<https://devfeed.tech/tags/blog.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [embedded](<https://devfeed.tech/tags/embedded.md>), [embedded-systems](<https://devfeed.tech/tags/embedded-systems.md>), [esp32](<https://devfeed.tech/tags/esp32.md>), [esp32-c6](<https://devfeed.tech/tags/esp32-c6.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [jtag](<https://devfeed.tech/tags/jtag.md>), [logging](<https://devfeed.tech/tags/logging.md>), [performance](<https://devfeed.tech/tags/performance.md>), [profiling](<https://devfeed.tech/tags/profiling.md>), [python](<https://devfeed.tech/tags/python.md>), [techniques](<https://devfeed.tech/tags/techniques.md>), [threads](<https://devfeed.tech/tags/threads.md>), [tracing](<https://devfeed.tech/tags/tracing.md>), [usb](<https://devfeed.tech/tags/usb.md>), [zephyr](<https://devfeed.tech/tags/zephyr.md>), [zephyr-os](<https://devfeed.tech/tags/zephyr-os.md>)

## AI overview

This article introduces tracing and profiling for embedded systems using Zephyr RTOS. It explains how tracing records execution data from functions, threads, and interrupts, while profiling measures metrics such as execution time, CPU usage, and dynamic memory usage. It also demonstrates Zephyr's native tracing workflow on an ESP32-C6 and introduces Percepio's Tracealyzer as a third-party analysis tool.

## Source excerpt

This is an introduction to the critical embedded system debugging techniques of tracing and profiling within the Zephyr RTOS. After reading this article, you can use Zephyr's native tracing tools to gain a visual, in-depth understanding of system dynamics, helping to evaluate performance, spot timing issues, and diagnose complex problems like memory leaks or thread interaction glitches.