tree: 9da565f923addff3d26892a3ba888b2404f17025 [path history] [tgz]
  1. darwin/
  2. esp32_trace/
  3. json/
  4. multiplexed/
  5. none/
  6. perfetto/
  7. tests/
  8. backend.h
  9. BUILD.gn
  10. log_declares.h
  11. macros.h
  12. metric_event.h
  13. metric_keys.h
  14. metric_macros.h
  15. README.md
  16. registry.cpp
  17. registry.h
  18. tracing_args.gni
src/tracing/README.md

Matter tracing

This library provides a runtime-configurable tracing and logging infrastructure for matter.

Types of data

Tracing

Tracing is mostly intended for following execution flow and measuring time spent for various operations. They are:

  • scoped where separate begin and end events are emitted or

  • instant where a single notable event is emitted, representing a point in time of a notable event

Tracing and instant values MUST be constant strings as some backends rely on that property for caching (e.g. pw_trace would do tokenization and perfetto marks them as perfetto::StaticString)

Data Logging

Data logging provides the tracing module the opportunity to report input/output data for matter data processing.

The data logging is generally limited in count and covers:

  • Messages, specifically sent matter requests and received matter responses

  • DNSSD operations as they are a core component of matter, specifically attempts to discover nodes as well as when a node is discovered or fails discovery.

Usage

Backends are defined by extending chip::Tracing::Backend in backend.h and registering it via functions in registry.h

Actual usage is controlled using macros.h (and for convenience scope.h provides scoped begin/end invocations).

tracing macros can be completely made a noop by setting ``matter_enable_tracing_support=false` when compiling.